Skip to main content
100%

Fork of map with legend

✓ Published0🌍 Public
Ccharkaoui
Last edited Jun 22, 2021
Created on Jun 22, 2021
Forked from map with legend

This example visualizes Indian states as a choropleth map, where each state’s color encodes its `AREA_` property using a sequential rainbow interpolator. The map is rendered with React and D3 v6, using `d3.geoMercator` projection and `d3.geoPath` to draw SVG paths from TopoJSON data loaded from a GitHub gist. A color legend is declared via `d3-legend` but is not actually rendered. The visualization updates reactively when the geometry state loads, filling each polygon based on the computed color scale.

AI-generated description

Making map in react d3 method 1

MIT Licensed

Similar vizzes