Fork of Axes with React & D3
✓ Published0🌍 Public
This example renders a horizontal bar chart of the top 10 most populous countries using React and D3. The chart displays a bar for each country’s 2020 population from the United Nations World Population Prospects 2019 dataset, retrieved via `d3.csv`. It manually constructs axes without D3’s axis components, using `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and generating tick lines and text labels from `xScale.ticks()`. The visualization is rendered as SVG with React state management and `useEffect` for data loading.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed