# XWUIChartCartogram

A cartogram (a thematic map whose regions are resized or distorted in proportion to a data variable rather than to their true geographic area, so magnitude jumps out visually): a fixed-type wrapper around `XWUIChart` that scales each mapped value into its rendered shape. Pass each region group as a `series` of `{ x, y }` values plus a `block` preset (1-4) and `size` (`sm` / `md` / `lg`); the shared block config also exposes legend, grid, axis, data-label, and tooltip-formatter toggles. Use it to show how a quantity is distributed across regions at a glance.

## Basic Usage

Two monthly `{ x, y }` series, "Series A" and "Series B", standing in as region values at the md size preset.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A cartogram sizing regions from two monthly series of illustrative values.
```

## Electoral Votes by State

Eight large US states sized by their Electoral College votes, with grid values and on-shape data labels for exact counts.

```example
file: examples/ElectoralVotes.ts
html: examples/ElectoralVotes.html
title: Electoral Votes by State
description: A cartogram distorting US states in proportion to their electoral vote totals.
```

## CO2 Emissions by Country

The top CO2-emitting countries distorted by annual megatonnes, formatted with a `" Mt"` unit on the block-2 preset.

```example
file: examples/CarbonEmissions.ts
html: examples/CarbonEmissions.html
title: CO2 Emissions by Country
description: A cartogram sizing countries by their annual CO2 emissions in megatonnes.
```

```api
```
