Fork of Axes with React & D3
✓ Published0🌍 Public
This example displays a horizontal bar chart of the top 10 most populous countries, using data from the United Nations World Population Prospects 2019. The chart renders as SVG via React, with D3’s `scaleBand` and `scaleLinear` computing the bar positions, while custom React components draw the axis ticks and labels. Axis lines and text are generated manually using `xScale.ticks()` and `yScale.domain()`, without relying on D3’s axis component. The code loads CSV data with `d3.csv` and manages state through React hooks.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed