🌍 Public
Viewing a saved revision (read-only)
9933cdf6b14a424dae1dd9020158bfca
Axes with React & D3
A horizontal bar chart displays population data for ten countries in 2020, loaded via D3's `d3.csv` from a GitHub gist. React renders the SVG, while D3's `scaleBand` and `scaleLinear` position bars and axes. The code builds custom tick marks and labels using `xScale.ticks()` and manual SVG text elements, avoiding D3's axis components. React hooks manage the asynchronous data loading, and the chart updates when the fetched dataset becomes available.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.