<ChoroplethChart aspectRatio="2 / 1" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>
<ChoroplethGraticule />
<ChoroplethFeatureComponent getFeatureColor={getVisitorColor} />
<ChoroplethTooltip getFeatureValue={getVisitorValue} valueLabel="Visitors" />
</ChoroplethChart><ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>
<ChoroplethGraticule />
<ChoroplethFeatureComponent fill="var(--chart-3)" />
<ChoroplethTooltip />
</ChoroplethChart><ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>
<ChoroplethFeatureComponent getFeatureColor={getVisitorColor} />
<ChoroplethTooltip
getFeatureValue={getVisitorValue}
valueLabel="Visitors"
/>
</ChoroplethChart><ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>
<ChoroplethGraticule stroke="rgba(255,255,255,0.15)" />
<ChoroplethFeatureComponent fill="var(--chart-1)" />
<ChoroplethTooltip />
</ChoroplethChart><ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>
<ChoroplethFeatureComponent
patterns={<PatternPreset id="pattern-americas" preset="diagonal-up" color="var(--chart-1)" strokeWidth={1.5} />}
getFeaturePattern={(feat) => `pattern-${getRegion(feat)}`}
/>
<ChoroplethTooltip />
</ChoroplethChart>const cities = [
{ label: "London", coordinates: [-0.13, 51.51] },
{ label: "New York", coordinates: [-74.01, 40.71] },
{ label: "Tokyo", coordinates: [139.69, 35.69] },
{ label: "São Paulo", coordinates: [-46.63, -23.55] },
{ label: "Sydney", coordinates: [151.21, -33.87] },
];
<ChoroplethChart
aspectRatio="16 / 9"
clickToZoom
data={geojson}
perspective={{ focus: { view: "auto", tilt: 24 } }}
>
<ChoroplethGraticule stroke="var(--chart-grid)" />
<ChoroplethFeatureComponent getFeatureColor={getVisitorColor} />
{cities.map((city) => (
<ChoroplethMarker key={city.label} {...city} />
))}
<ChoroplethTooltip getFeatureValue={getVisitorValue} valueLabel="Visitors" />
</ChoroplethChart>const cities = [
{ label: "London", coordinates: [-0.13, 51.51] },
{ label: "New York", coordinates: [-74.01, 40.71] },
{ label: "Tokyo", coordinates: [139.69, 35.69] },
{ label: "São Paulo", coordinates: [-46.63, -23.55] },
{ label: "Sydney", coordinates: [151.21, -33.87] },
];
<ChoroplethChart
aspectRatio="16 / 9"
clickToZoom
data={geojson}
focusMaxZoom={2}
perspective={{
overview: { tilt: 30 },
focus: { view: "auto", yaw: 10, tilt: 24 },
}}
>
<ChoroplethDotGrid
edgeFade={20}
fadedOpacity={0.5}
getFeatureColor={getVisitorColor}
oceanOpacity={0.35}
/>
{cities.map((city) => (
<ChoroplethMarker color="var(--chart-2)" key={city.label} size={12} {...city} />
))}
<ChoroplethTooltip getFeatureValue={getVisitorValue} valueLabel="Visitors" />
</ChoroplethChart>const cities = [
{ label: "London", coordinates: [-0.13, 51.51] },
{ label: "New York", coordinates: [-74.01, 40.71] },
{ label: "Tokyo", coordinates: [139.69, 35.69] },
{ label: "São Paulo", coordinates: [-46.63, -23.55] },
{ label: "Sydney", coordinates: [151.21, -33.87] },
];
<ChoroplethChart
aspectRatio="16 / 9"
clickToZoom
data={geojson}
perspective={{
overview: { view: "pointer", yaw: 14, tilt: 18 },
focus: { view: "auto", tilt: 28 },
}}
>
<ChoroplethBackground hideOnFocus pattern="dots" />
<ChoroplethFeatureComponent fill="var(--chart-scale-02)" />
{cities.map((city) => (
<ChoroplethMarker
color="var(--chart-1)"
glow={6}
key={city.label}
pulse="always"
shape="pin"
size={10}
{...city}
/>
))}
<ChoroplethTooltip />
</ChoroplethChart>