Skip to main content
100%

map with legend

✓ Published7🌍 Public
AAnimesh Nautiyal
Last edited Jun 5, 2021
Created on May 14, 2021

This example displays a choropleth map of Indian states, colored according to the area of each state using a sequential rainbow color scale. The map is rendered with React and D3 v6, using `d3.geoMercator` with `fitSize` for projection and `d3.geoPath` to draw SVG paths. State boundaries come from a TopoJSON file loaded via `d3.json`, and the color mapping uses `d3.scaleSequential` with `d3.interpolateRainbow`. The accompanying legend is prepared with the `d3-legend` library, though the legend rendering is commented out.

AI-generated description

Making map in react d3 method 1

MIT Licensed

Similar vizzes