Charts

Copy-paste chart examples for every Bklit UI component.

Choropleth Chart - Interactive

Visitor traffic by country

<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>

Trending up by 5.2% this month

Choropleth Chart

World map with single fill color and graticule

<ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>  <ChoroplethGraticule />  <ChoroplethFeatureComponent fill="var(--chart-3)" />  <ChoroplethTooltip /></ChoroplethChart>

Trending up by 5.2% this month

Choropleth Chart - Analytics

Color scale based on visitor traffic by country

<ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>  <ChoroplethFeatureComponent getFeatureColor={getVisitorColor} />  <ChoroplethTooltip    getFeatureValue={getVisitorValue}    valueLabel="Visitors"  /></ChoroplethChart>

Trending up by 5.2% this month

Choropleth Chart - Graticule

Visible latitude and longitude grid lines

<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>

Trending up by 5.2% this month

Choropleth Chart - Patterns

Diagonal line patterns colored by region

<ChoroplethChart aspectRatio="16 / 9" data={geojson} margin={{ top: 8, right: 8, bottom: 40, left: 8 }}>  <ChoroplethFeatureComponent    patterns={<PatternLines id="p-americas" stroke="var(--chart-1)" ... />}    getFeaturePattern={(feat) => `pattern-${getRegion(feat)}`}  />  <ChoroplethTooltip /></ChoroplethChart>

Trending up by 5.2% this month