Geo Area Chart

A geo area chart visualizes data by geographic regions (countries, states, provinces, etc.) as filled polygons on a map (choropleth map). It is a convenience wrapper over Geo Chart for the single-area-layer scenario.

Structure

import "@gooddata/sdk-ui-geo/styles/css/main.css";
import { GeoAreaChart } from "@gooddata/sdk-ui-geo";

<GeoAreaChart
    area={<attribute>}
    color={<measure>}
    segmentBy={<attribute>}
    config={<geo-area-config>}
    filters={<filters>}
/>

Example

import "@gooddata/sdk-ui-geo/styles/css/main.css";
import { GeoAreaChart } from "@gooddata/sdk-ui-geo";
import * as Md from "./md/full";

const config = {
    viewport: {
        area: "continent_eu",
    },
    areas: {
        fillOpacity: 0.6,
        borderColor: "#333333",
        borderWidth: 2,
    },
    legend: {
        position: "bottom-right",
    },
};

<div style={{ height: 600, width: 900 }}>
    <GeoAreaChart area={Md.Country.Name} color={Md.Revenue.Sum} segmentBy={Md.Region} config={config} />
</div>;

Properties

NameRequired?TypeDescription
areatrueAttributeOrPlaceholderAttribute or placeholder whose values represent geographic regions
colorfalseAttributeMeasureOrPlaceholderMeasure or attribute used for color encoding
segmentByfalseAttributeOrPlaceholderOptional segment attribute that categorizes the regions
filtersfalseNullableFiltersOrPlaceholdersGlobal filters applied to the primary layer and any additionalLayers
sortByfalseSortsOrPlaceholdersSorting applied to the primary area layer
configfalseIGeoAreaChartConfigArea wrapper configuration
additionalLayersfalseIGeoLayer[]Extra layers rendered after the primary area layer (for example a pushpin overlay)
backendfalseIAnalyticalBackendBackend used for data execution
workspacefalsestringWorkspace identifier
localefalsestringLocale used for UI localization. Defaults to en-US
drillableItemsfalseExplicitDrill[]Drill configuration for regions and attribute values
ErrorComponentfalseComponentTypeComponent rendered when the visualization is in an error state
LoadingComponentfalseComponentTypeComponent rendered while the visualization is loading
onErrorfalseOnErrorCallback fired when loading or rendering fails
onExportReadyfalseOnExportReadyCallback fired when export functions become available
onLoadingChangedfalseOnLoadingChangedCallback fired when the loading state changes
onDrillfalseOnFiredDrillEventCallback fired when drilling is triggered
onCenterPositionChangedfalseCenterPositionChangedCallbackCallback fired when the map center changes
onZoomChangedfalseZoomChangedCallbackCallback fired when the map zoom level changes
onBoundsChangedfalseBoundsChangedCallbackCallback fired when the visible map bounds change
onViewportInteractionEndfalseViewportInteractionEndCallbackCallback fired when a user-triggered viewport interaction finishes

Geo Config

NameRequired?TypeDescription
centerfalseIGeoLngLatInitial map center. Defaults to auto-centering based on data
zoomfalsenumberInitial zoom level in the 0-22 range. Defaults to auto-fit
boundsfalseIGeoLngLatBoundsBounding box for a custom viewport. Takes priority over center and zoom
isExportModefalsebooleanExport mode that disables gestures and preserves the drawing buffer
legendfalseIGeoChartLegendConfigLegend configuration
limitfalsenumberMaximum number of rendered data points
mapStylefalsestring | StyleSpecificationCustom MapLibre style URL or inline style specification
basemapfalseGeoBasemapAlpha. Basemap style identifier such as "standard-light" or "satellite"
maxZoomLevelfalsenumber | nullMaximum zoom level. undefined keeps the default, null removes the limit
separatorsfalseISeparatorsCustom number separators used for formatting
viewportfalseIGeoChartViewportViewport preset or advanced navigation configuration
areasfalseIGeoAreasConfigConfiguration for area styling (opacity, borders)
colorsfalsestring[]Simple color palette expressed as CSS color strings
colorPalettefalseIColorPaletteStructured color palette compatible with color mapping GUIDs
colorMappingfalseIColorMapping[]Explicit color mapping overrides
showLabelsfalsebooleanDisplays data labels on the map when supported
cooperativeGesturesfalsebooleanWhen true, requires Ctrl/Cmd + scroll to zoom (useful inside scroll containers)

For additional examples of colors, separators, or legend behavior, see Chart Config.

Areas Config

NameRequired?TypeDescription
fillOpacityfalsenumberOpacity of filled areas (0–1). Default: 0.7.
borderColorfalsestringColor of area borders. Default: "#FFFFFF".
borderWidthfalsenumberWidth of area borders in pixels. Default: 1.

Viewport Config

NameRequired?TypeDescription
areafalseIGeoChartViewportAreaViewport preset: "auto" (default) | "custom" | "world" | "continent_af" | "continent_as" | "continent_au" | "continent_eu" | "continent_na" | "continent_sa"
frozenfalsebooleanLocks user interaction (pan and zoom) when true. Defaults to false.
navigationfalseIGeoChartViewportNavigationFine-grained control: { pan?: boolean, zoom?: boolean }. Defaults to both true.

Legend Config

NameRequired?TypeDescription
enabledfalsebooleanEnables legend rendering. Defaults to true.
positionfalseGeoLegendPosition | LegacyGeoLegendPosition"auto" (default), "top-left", "top-right", "bottom-left", or "bottom-right". Legacy edge values are deprecated.
responsivefalseboolean | "autoPositionWithPopup"true enables responsive legend layout. Legacy "autoPositionWithPopup" preserves older automatic legend placement behavior in smaller containers. Defaults to false.

Notes

  • GeoAreaChart is a convenience wrapper over GeoChart for the single-area-layer scenario.
  • Use the additionalLayers prop to overlay pushpin layers on top of the area layer.
  • For full API documentation, see the TypeScript definitions.