🌍 Public
Viewing a saved revision (read-only)
6e124d103a7d48bb96d2418c44807671
Fork of Refactored Bar chart with React & D3
This fork of the refactored bar chart example uses React with D3 v7 to render a horizontal bar chart of US city populations. The code defines reusable components for axes and marks, using `d3.scaleLinear` and `d3.scaleBand` to map population values and city names, while data is embedded and parsed via `d3.csvParse` from a local CSV string. Bars are drawn as SVG `rect` elements with hover opacity changes, and gridlines are created through a D3 axis call.
AI-generated description