Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of map with legend

Public visualization

Viewing a saved revision (read-only)

41032818655f4572a7feb74d757ec2cc

Fork of map with legend

0 stars0🌍 Public
SSoorena
Last edited Jul 24, 2021
Created on Jul 24, 2021
Forked from map with legend

This example displays a choropleth map of Indian states, using a sequential rainbow color scale to encode the `AREA_` property of each state. The map is rendered as SVG within a React component, with geographic paths generated using `d3.geoPath` and a Mercator projection fitted to the viewport via `d3.geoMercator().fitSize`. State boundaries come from a TopoJSON file loaded with `d3.json`, and the color mapping uses `d3.scaleSequential` with `d3.interpolateRainbow`. The code includes a legend SVG element but does not currently render a legend.

AI-generated description

Making map in react d3 method 1