Fork of Axes with React & D3
✓ Published0🌍 Public
This example displays the top 10 most populous countries as a horizontal bar chart with axes, using React state and hooks alongside D3 for data loading and scales. The `d3.csv` function fetches UN population data from 2019, while `d3.scaleBand` and `d3.scaleLinear` position bars and ticks. SVG rendering is managed by React, with D3’s `max` computing the domain. The code manually draws axis tick marks and labels, creating the grid lines shown in red.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed