Ep. 22 | Axes with React & D3
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top ten countries by 2020 population, with axes drawn manually using React components and D3 scale functions. The chart loads United Nations World Population Prospects 2019 data via `d3.csv`, then uses `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. Ticks for both axes are rendered as SVG elements, with x-axis tick marks generated by calling `xScale.ticks()`, while bars are positioned and sized through the same scales.
AI-generated descriptionA program that loads in some United Nations World Population Prospects 2019.
MIT Licensed