🌍 Public
Viewing a saved revision (read-only)
c3d733757d654f73ae12bf43a1e27249
Refactored Bar Chart
This horizontal bar chart displays the population of five countries using D3’s `scaleBand` and `scaleLinear` utilities within a React component. The SVG rendering separates axes and marks into reusable modules (`AxisBottom`, `AxisLeft`, `Marks`), while `useData` fetches a CSV via D3’s `csv` and formats values with `format(".2s")`. The visualization retrieves data from a GitHub gist, applying a Poppins font and a teal fill to the bars.
AI-generated descriptionA program that loads in some data using D3 utilities, and uses React state to keep track of the data.