Skip to content

Geographic heatmap

Show spatial concentration through geographic heat points. Chart ID: geographicHeatmap.

This is an optional geographic capability from @revolist/charts/geographic. It uses an application-supplied provider and pack.render(...). It is separate from the native createChart(...) catalog and the Pivot chart picker.

Live example

Sample demand · Portugal, Spain and France

Loading example map…

Simplified mainland outlines with illustrative values, using an equirectangular projection. Islands are omitted. This example supplies its own geometry; use a map provider and licensed assets for production.

CountrySample demand
Portugal42
Spain85
France120

Reading the chart

Warmer and stronger spots indicate higher sample demand at the supplied points. This example contains only three points; it does not estimate a continuous country-wide distribution or aggregate raw observations.

Click a mark or focus it with the keyboard and press Enter to inspect its sample value. The table supplies a text alternative.

Data requirements

Supply a revisioned chart dataset, geographic and value bindings, and a provider implementing load(request, { signal }). The response must match the request revision and chart type and include a projection identifier.

Return points with longitude/latitude positions, projected viewport positions, values, and positive radii in viewport pixels.

The application owns geometry, projection, assets and attribution. This local example uses original, approximate mainland outlines and synthetic demand values; it needs no external map downloads.

Create this chart

Follow the installation guide. Use chart.ts for the direct setup and save the sample provider beside it as geographic-examples.ts. The Vue tab is optional and shows responsive resizing, theme updates and framework cleanup.

<div id="chart" style="width:100%;height:360px"></div>
Chart setup and provider source
import { createChartGeographicCapabilityPack } from '@revolist/charts/geographic';
import { geographicDataset, geographicProvider } from './geographic-examples';
const container = document.getElementById('chart')!;
const pack = createChartGeographicCapabilityPack(geographicProvider);
const chart = pack.render({
container,
request: {
chartId: 'map', chartType: 'geographicHeatmap', dataset: geographicDataset,
bindings: { geographic: ['pivot:category'], value: ['value'] },
theme: 'light', viewport: { width: container.clientWidth, height: 360 },
},
localeText: {
chartAriaLabel: () => 'Sample demand by country',
loading: 'Loading map', loadError: error => error.message,
regionAriaLabel: (label, value) => label + ': ' + value,
symbolAriaLabel: (label, value) => label + ': ' + value,
heatPointAriaLabel: value => 'Demand: ' + value,
formatValue: value => value === null ? 'Missing' : String(value),
},
});
await chart.ready;

For other frameworks, create the pack with createChartGeographicCapabilityPack(provider) after the host mounts, call pack.render(input), await instance.ready, and use instance.update(input) for new requests. Disconnect observers and call instance.destroy() on unmount; superseded and destroyed loads are cancelled by the renderer.

Related geographic charts

Explore the live catalog · Data & Configuration

The response can include layers (at most 128): background SVG paths, regions, symbols, heatmap points or lines routes. Backgrounds paint before the base series; other overlays paint afterward in declared order. Routes supply their projected path, stable ID/label, genuine categoryId/seriesId and source value, plus an optional non-negative size. These are provider-projected paths, not a built-in geographic routing or projection engine.

The request viewport has positive finite width/height and optional positive pixelRatio. The provider owns projected positions and paths on resize. Heat point radius is optional (18 viewport units when omitted); an authored radius must be positive. projectionId, response type and dataset revision are validated; source-bound overlay values must match the canonical dataset.

Pass rendererOptions on pack.render and each complete instance.update input for theme, fonts, class names, element styles/formatters, diagnostics and onRender. See geographic customization. Locale callbacks format values, accessibility and load states. Click or Enter/Space activation returns { chartType, datum, originalEvent } through onNodeClick; application code decides what to do with the provider datum. The capability instance exposes ready, update, focus and destroy; it does not expose native chart model, CSV/image export or navigation methods.