Fork of Axes with React & D3
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 10 most populous countries for 2020, with population values from the United Nations World Population Prospects 2019 dataset. The chart includes labeled axes: the y-axis shows country names using a band scale, while the x-axis shows population ticks with grid lines. Built with React hooks and D3 v5, the code uses `scaleBand`, `scaleLinear`, and `csv` to fetch and scale the data. The bars and axes are rendered as SVG elements, with tick generation handled through `xScale.ticks()`.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed