🌍 Public
Viewing a saved revision (read-only)
f767a4f64cbb488c8e7c1c1924414f10
Fork of Axes with React & D3
This example visualizes the top 10 most populous countries as horizontal bars using React and D3, with data from the United Nations World Population Prospects 2019. The chart includes both x-axis ticks from `xScale.ticks()` and y-axis country labels, though it lacks axis lines. D3’s `scaleBand` and `scaleLinear` map the data to SVG rectangles, while React’s `useState` and `useEffect` manage asynchronous CSV loading via `d3.csv`. The SVG is rendered directly through React, making it a hybrid of declarative components and D3 scales.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.