---
title: "Dark World Map API — Choropleth maps on dark | Imejis"
description: "Generate dark-mode choropleth world-map images — a bright ramp on a dark card, shaded by country. Fresh data per API call. Create map graphics free with Imejis."
url: "https://www.imejis.io/components/map/dark"
---

# Dark World Map API — Choropleth maps on dark | Imejis

A choropleth on a dark card with a bright ramp — built for social.

## Use cases

- Dark-theme geographic dashboards
- Year-in-review and launch graphics on dark backgrounds
- Social cards with a world-map breakdown

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `data` | `object[]` | `[]` | Regions: array of { id, value, label? } — id is an ISO-3166 code or name. |
| `basemap` | `'world' \| 'us-states' \| 'canada-provinces' \| 'germany-states' \| 'australia-states' \| 'brazil-states' \| 'india-states'` | `"world"` | Which bundled basemap to draw: 'world' countries, 'us-states', 'canada-provinces', 'germany-states', 'australia-states', 'brazil-states' or 'india-states'. |
| `mode` | `'choropleth' \| 'bubble'` | `"choropleth"` | 'choropleth' shades regions by value; 'bubble' draws a flat map with a proportional circle at each region's center. |
| `projection` | `'equirectangular' \| 'mercator'` | `"equirectangular"` | Map projection: 'equirectangular' (flat) or 'mercator'. |
| `matchBy` | `'auto' \| 'iso2' \| 'iso3' \| 'name'` | `"auto"` | How a row's id joins to a region: 'auto', 'iso2', 'iso3' or 'name'. |
| `colorMode` | `'ramp' \| 'diverging' \| 'categorical'` | `"ramp"` | 'ramp' shades by intensity in one hue; 'diverging' colors +/− values; 'categorical' colors by each row's category. |
| `colors` | `color[]` | `[]` | Ramp swatches (lightest→darkest); also the palette for categorical mode. |
| `baseColor` | `color` | `"#2563eb"` | Ramp hue used when no swatches are given. |
| `emptyColor` | `color` | `"#e5e7eb"` | Fill for regions with no matching data value. |
| `positiveColor` | `color` | `"#16a34a"` | Positive color in diverging mode. |
| `negativeColor` | `color` | `"#dc2626"` | Negative color in diverging mode. |
| `scaleMax` | `number` | `0` | Value mapped to the most saturated color (0 = auto from the data). |
| `levels` | `number` (min 1) | `5` | Number of intensity buckets in ramp mode. |
| `strokeColor` | `color` | `"#ffffff"` | Color of region borders. |
| `strokeWidth` | `number` (min 0) | `0.5` | Width of region borders (px). |
| `bubbleColor` | `color` | `"#2563eb"` | Fill for the proportional bubbles in bubble mode. |
| `bubbleSize` | `number` (min 0) | `1` | Bubble size multiplier in bubble mode (1 = default). |
| `showLabels` | `boolean` | `false` | Draw a label on each region that has data (value or name). |
| `labelField` | `'value' \| 'name'` | `"value"` | What each region label shows: 'value' or the region 'name'. |
| `labelSize` | `number` (min 0) | `1` | Per-region label size multiplier (1 = default). |
| `showLegend` | `boolean` | `true` | Draw a low→high legend strip. |
| `labelColor` | `color` | `"#64748b"` | Legend + label text color. |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Design JSON (this variant)

```json
{
  "title": "Map sample",
  "description": "A choropleth world map shaded by value",
  "dimensions": {
    "width": 860,
    "height": 460
  },
  "background": {
    "color": "#0d1117"
  },
  "components": [
    {
      "id": "sample-map",
      "key": "map",
      "type": "map",
      "position": {
        "x": 20,
        "y": 20
      },
      "rotation": 0,
      "size": {
        "width": 820,
        "height": 420
      },
      "dynamic": true,
      "properties": {
        "data": [
          {
            "id": "US",
            "value": 920
          },
          {
            "id": "CA",
            "value": 410
          },
          {
            "id": "MX",
            "value": 250
          },
          {
            "id": "BR",
            "value": 300
          },
          {
            "id": "AR",
            "value": 160
          },
          {
            "id": "CL",
            "value": 120
          },
          {
            "id": "CO",
            "value": 140
          },
          {
            "id": "GB",
            "value": 610
          },
          {
            "id": "FR",
            "value": 540
          },
          {
            "id": "DE",
            "value": 700
          },
          {
            "id": "ES",
            "value": 300
          },
          {
            "id": "IT",
            "value": 340
          },
          {
            "id": "PT",
            "value": 130
          },
          {
            "id": "NL",
            "value": 260
          },
          {
            "id": "SE",
            "value": 180
          },
          {
            "id": "NO",
            "value": 150
          },
          {
            "id": "PL",
            "value": 210
          },
          {
            "id": "UA",
            "value": 120
          },
          {
            "id": "RU",
            "value": 480
          },
          {
            "id": "TR",
            "value": 260
          },
          {
            "id": "EG",
            "value": 190
          },
          {
            "id": "ZA",
            "value": 230
          },
          {
            "id": "NG",
            "value": 210
          },
          {
            "id": "KE",
            "value": 110
          },
          {
            "id": "MA",
            "value": 100
          },
          {
            "id": "SA",
            "value": 280
          },
          {
            "id": "AE",
            "value": 240
          },
          {
            "id": "IN",
            "value": 480
          },
          {
            "id": "CN",
            "value": 700
          },
          {
            "id": "JP",
            "value": 560
          },
          {
            "id": "KR",
            "value": 320
          },
          {
            "id": "ID",
            "value": 260
          },
          {
            "id": "TH",
            "value": 180
          },
          {
            "id": "VN",
            "value": 190
          },
          {
            "id": "AU",
            "value": 340
          },
          {
            "id": "NZ",
            "value": 120
          }
        ],
        "basemap": "world",
        "projection": "equirectangular",
        "colorMode": "ramp",
        "baseColor": "#2563eb",
        "emptyColor": "#1e293b",
        "showLegend": true,
        "opacity": 1,
        "strokeColor": "#0f172a",
        "labelColor": "#94a3b8",
        "colors": [
          "#0e7490",
          "#0891b2",
          "#06b6d4",
          "#22d3ee",
          "#67e8f9"
        ]
      }
    }
  ]
}
```

## Examples

### Dark sales map

Global sales in a cyan ramp on a near-black card.

API overrides that reproduce this example:

```json
{
  "map.data": [
    {
      "id": "US",
      "value": 920
    },
    {
      "id": "CA",
      "value": 410
    },
    {
      "id": "MX",
      "value": 250
    },
    {
      "id": "BR",
      "value": 300
    },
    {
      "id": "AR",
      "value": 160
    },
    {
      "id": "CL",
      "value": 120
    },
    {
      "id": "CO",
      "value": 140
    },
    {
      "id": "GB",
      "value": 610
    },
    {
      "id": "FR",
      "value": 540
    },
    {
      "id": "DE",
      "value": 700
    },
    {
      "id": "ES",
      "value": 300
    },
    {
      "id": "IT",
      "value": 340
    },
    {
      "id": "PT",
      "value": 130
    },
    {
      "id": "NL",
      "value": 260
    },
    {
      "id": "SE",
      "value": 180
    },
    {
      "id": "NO",
      "value": 150
    },
    {
      "id": "PL",
      "value": 210
    },
    {
      "id": "UA",
      "value": 120
    },
    {
      "id": "RU",
      "value": 480
    },
    {
      "id": "TR",
      "value": 260
    },
    {
      "id": "EG",
      "value": 190
    },
    {
      "id": "ZA",
      "value": 230
    },
    {
      "id": "NG",
      "value": 210
    },
    {
      "id": "KE",
      "value": 110
    },
    {
      "id": "MA",
      "value": 100
    },
    {
      "id": "SA",
      "value": 280
    },
    {
      "id": "AE",
      "value": 240
    },
    {
      "id": "IN",
      "value": 480
    },
    {
      "id": "CN",
      "value": 700
    },
    {
      "id": "JP",
      "value": 560
    },
    {
      "id": "KR",
      "value": 320
    },
    {
      "id": "ID",
      "value": 260
    },
    {
      "id": "TH",
      "value": 180
    },
    {
      "id": "VN",
      "value": 190
    },
    {
      "id": "AU",
      "value": 340
    },
    {
      "id": "NZ",
      "value": 120
    }
  ],
  "map.emptyColor": "#1e293b",
  "map.strokeColor": "#0f172a",
  "map.labelColor": "#94a3b8",
  "map.colors": [
    "#0e7490",
    "#0891b2",
    "#06b6d4",
    "#22d3ee",
    "#67e8f9"
  ]
}
```

### Dark coverage map

Where the product is available, in a violet ramp on dark.

API overrides that reproduce this example:

```json
{
  "map.data": [
    {
      "id": "US",
      "value": 100
    },
    {
      "id": "CA",
      "value": 100
    },
    {
      "id": "MX",
      "value": 40
    },
    {
      "id": "BR",
      "value": 100
    },
    {
      "id": "AR",
      "value": 40
    },
    {
      "id": "CL",
      "value": 40
    },
    {
      "id": "CO",
      "value": 40
    },
    {
      "id": "GB",
      "value": 100
    },
    {
      "id": "FR",
      "value": 100
    },
    {
      "id": "DE",
      "value": 100
    },
    {
      "id": "ES",
      "value": 100
    },
    {
      "id": "IT",
      "value": 100
    },
    {
      "id": "PT",
      "value": 40
    },
    {
      "id": "NL",
      "value": 100
    },
    {
      "id": "SE",
      "value": 40
    },
    {
      "id": "NO",
      "value": 40
    },
    {
      "id": "PL",
      "value": 40
    },
    {
      "id": "UA",
      "value": 40
    },
    {
      "id": "RU",
      "value": 100
    },
    {
      "id": "TR",
      "value": 100
    },
    {
      "id": "EG",
      "value": 40
    },
    {
      "id": "ZA",
      "value": 40
    },
    {
      "id": "NG",
      "value": 40
    },
    {
      "id": "KE",
      "value": 40
    },
    {
      "id": "MA",
      "value": 40
    },
    {
      "id": "SA",
      "value": 100
    },
    {
      "id": "AE",
      "value": 40
    },
    {
      "id": "IN",
      "value": 100
    },
    {
      "id": "CN",
      "value": 100
    },
    {
      "id": "JP",
      "value": 100
    },
    {
      "id": "KR",
      "value": 100
    },
    {
      "id": "ID",
      "value": 100
    },
    {
      "id": "TH",
      "value": 40
    },
    {
      "id": "VN",
      "value": 40
    },
    {
      "id": "AU",
      "value": 100
    },
    {
      "id": "NZ",
      "value": 40
    }
  ],
  "map.emptyColor": "#1e293b",
  "map.strokeColor": "#0f172a",
  "map.labelColor": "#94a3b8",
  "map.colors": [
    "#4c1d95",
    "#6d28d9",
    "#8b5cf6",
    "#a78bfa",
    "#c4b5fd"
  ]
}
```

## API overrides

Push fresh regions per render with '<key>.data' (or just '<key>') as [{ id, value }]; id is an ISO-3166 code (US, FRA) or country name, and the map recolors to match.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "map.data": [
    {
      "id": "US",
      "value": 920
    },
    {
      "id": "CA",
      "value": 410
    },
    {
      "id": "MX",
      "value": 250
    },
    {
      "id": "BR",
      "value": 300
    },
    {
      "id": "AR",
      "value": 160
    },
    {
      "id": "CL",
      "value": 120
    },
    {
      "id": "CO",
      "value": 140
    },
    {
      "id": "GB",
      "value": 610
    },
    {
      "id": "FR",
      "value": 540
    },
    {
      "id": "DE",
      "value": 700
    },
    {
      "id": "ES",
      "value": 300
    },
    {
      "id": "IT",
      "value": 340
    },
    {
      "id": "PT",
      "value": 130
    },
    {
      "id": "NL",
      "value": 260
    },
    {
      "id": "SE",
      "value": 180
    },
    {
      "id": "NO",
      "value": 150
    },
    {
      "id": "PL",
      "value": 210
    },
    {
      "id": "UA",
      "value": 120
    },
    {
      "id": "RU",
      "value": 480
    },
    {
      "id": "TR",
      "value": 260
    },
    {
      "id": "EG",
      "value": 190
    },
    {
      "id": "ZA",
      "value": 230
    },
    {
      "id": "NG",
      "value": 210
    },
    {
      "id": "KE",
      "value": 110
    },
    {
      "id": "MA",
      "value": 100
    },
    {
      "id": "SA",
      "value": 280
    },
    {
      "id": "AE",
      "value": 240
    },
    {
      "id": "IN",
      "value": 480
    },
    {
      "id": "CN",
      "value": 700
    },
    {
      "id": "JP",
      "value": 560
    },
    {
      "id": "KR",
      "value": 320
    },
    {
      "id": "ID",
      "value": 260
    },
    {
      "id": "TH",
      "value": 180
    },
    {
      "id": "VN",
      "value": 190
    },
    {
      "id": "AU",
      "value": 340
    },
    {
      "id": "NZ",
      "value": 120
    }
  ],
  "map.basemap": "world",
  "map.projection": "equirectangular",
  "map.colorMode": "ramp",
  "map.baseColor": "#2563eb",
  "map.emptyColor": "#e5e7eb",
  "map.showLegend": true,
  "map.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "map.data": [
        {
            "id": "US",
            "value": 920
        },
        {
            "id": "CA",
            "value": 410
        },
        {
            "id": "MX",
            "value": 250
        },
        {
            "id": "BR",
            "value": 300
        },
        {
            "id": "AR",
            "value": 160
        },
        {
            "id": "CL",
            "value": 120
        },
        {
            "id": "CO",
            "value": 140
        },
        {
            "id": "GB",
            "value": 610
        },
        {
            "id": "FR",
            "value": 540
        },
        {
            "id": "DE",
            "value": 700
        },
        {
            "id": "ES",
            "value": 300
        },
        {
            "id": "IT",
            "value": 340
        },
        {
            "id": "PT",
            "value": 130
        },
        {
            "id": "NL",
            "value": 260
        },
        {
            "id": "SE",
            "value": 180
        },
        {
            "id": "NO",
            "value": 150
        },
        {
            "id": "PL",
            "value": 210
        },
        {
            "id": "UA",
            "value": 120
        },
        {
            "id": "RU",
            "value": 480
        },
        {
            "id": "TR",
            "value": 260
        },
        {
            "id": "EG",
            "value": 190
        },
        {
            "id": "ZA",
            "value": 230
        },
        {
            "id": "NG",
            "value": 210
        },
        {
            "id": "KE",
            "value": 110
        },
        {
            "id": "MA",
            "value": 100
        },
        {
            "id": "SA",
            "value": 280
        },
        {
            "id": "AE",
            "value": 240
        },
        {
            "id": "IN",
            "value": 480
        },
        {
            "id": "CN",
            "value": 700
        },
        {
            "id": "JP",
            "value": 560
        },
        {
            "id": "KR",
            "value": 320
        },
        {
            "id": "ID",
            "value": 260
        },
        {
            "id": "TH",
            "value": 180
        },
        {
            "id": "VN",
            "value": 190
        },
        {
            "id": "AU",
            "value": 340
        },
        {
            "id": "NZ",
            "value": 120
        }
    ],
    "map.basemap": "world",
    "map.projection": "equirectangular",
    "map.colorMode": "ramp",
    "map.baseColor": "#2563eb",
    "map.emptyColor": "#e5e7eb",
    "map.showLegend": true,
    "map.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Related

- [Map component](https://www.imejis.io/components/map.md) — full reference and FAQs
- [Diverging](https://www.imejis.io/components/map/diverging.md) — Signed values on a diverging red→green scale — for growth and change.
- [US states](https://www.imejis.io/components/map/us-states.md) — A US state choropleth (Albers-USA, Alaska & Hawaii as insets).
- [Country regions](https://www.imejis.io/components/map/country-regions.md) — Province / state choropleths for Canada, Germany, Australia, Brazil and India.
- [Bubble](https://www.imejis.io/components/map/bubble.md) — Proportional-symbol map — a circle at each region sized by value, on a flat basemap.
- [Categorical](https://www.imejis.io/components/map/categorical.md) — Color regions by a category (not a number) — for groupings like sales regions.
