Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of map with legend

Public visualization

Fork of map with legend

0 stars0🌍 Public
Bbindhureddy98
Last edited Apr 2, 2022
Created on Apr 2, 2022
Forked from map with legend

This example renders a choropleth map of Indian states, coloring each state by its `AREA_` attribute using a sequential rainbow color scale. The map is drawn as SVG paths via `d3.geoPath` with a `d3.geoMercator` projection fit to the window size. State boundaries come from a TopoJSON file loaded with `d3.json` and converted to GeoJSON using `topojson.feature`. React manages the component lifecycle, while `d3.scaleSequential` maps data extents to colors; a separate SVG element is prepared for a legend, though the legend itself is not implemented in the visible code.

AI-generated description

Making map in react d3 method 1

Comments

Sign in to join the discussion.

MIT Licensed