🌍 Public
Viewing a saved revision (read-only)
9f306944b8264eec836d64fb2f975254
Axes with React And D3
This example shows a horizontal bar chart of the top 10 most populous countries in 2020, rendered as SVG elements created by React components. It loads UN population data from a CSV file using D3’s `csv` utility, then maps that data to scales built with `scaleBand` and `scaleLinear`. Axes are drawn manually by iterating over `xScale.ticks()` and `yScale.domain()`, producing grid lines and text labels. React manages state for the asynchronous data loading, while D3 provides the quantitative and categorical scales.
AI-generated descriptionA program tha loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!