CarsXE

Search docs

Search pages, components, and skills.

World Map Chart

A responsive CarsXE choropleth for country-level values. Pass ISO alpha-2, alpha-3, or numeric codes; bundled world geometry, accessible keyboard inspection, selection, tooltips, and theme-aware colors are handled for you.

Global coverage

Vehicle report volume

Completed vehicle reports across active CarsXE markets. Hover a country or use the arrow keys to inspect the route.

Completed vehicle reports across active CarsXE markets.

Use the arrow keys to preview countries. Press Enter or Space to select one. Press Escape to dismiss the preview.

Select a country to inspect its report volume.

Installation

Import from the package. Do not run shadcn add in your app.

tsx
import { WorldMapChart } from "@carsxe/design-system/components/world-map-chart"

Usage

tsx
import { WorldMapChart } from "@carsxe/design-system/components/world-map-chart"

<WorldMapChart
  ariaLabel="Vehicle report volume by country"
  data={[{ countryCode: "US", value: 18420 }]}
/>

Controlled country selection

Use the arrow keys to preview countries. Press Enter or Space to select one. Press Escape to dismiss the preview.

Selected market: DE

Custom CarsXE scale

Use the arrow keys to preview countries. Press Enter or Space to select one. Press Escape to dismiss the preview.

Empty and invalid data

Use the arrow keys to preview countries. Press Enter or Space to select one. Press Escape to dismiss the preview.

Add country report data to draw the map.

API Reference

PropTypeDefault
ariaLabelstring—
dataWorldMapDatum[]—
descriptionstring—
heightnumber360
colorsstring[]CarsXE chart tokens (5 levels)
missingColorstringvar(--border)
showLegendbooleantrue
valueFormatter(value, datum) => stringvalue.toLocaleString()
selectedCountryCodestring—
defaultSelectedCountryCodestring—
onCountrySelect(country: WorldMapCountry) => void—
emptyMessagestring"No map data available."