Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

map with legend

Public visualization

Viewing a saved revision (read-only)

c7ebeb5f1f1b4beead5d597ee57d205b

map with legend

2 stars7🌍 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