🌍 Public
Viewing a saved revision (read-only)
84e1d8f44b76434c92b242e91f527c91
Axes with React & D3
This example shows a horizontal bar chart of the ten most populous countries in 2020, using population data from a CSV file loaded via D3’s `csv` utility. React renders the SVG elements, while D3’s `scaleBand` and `scaleLinear` position the bars and axes, and `xScale.ticks()` generates the gridline values. The chart displays country labels on the left and tick marks with numeric population values along the bottom, with styles set through inline React props and attributes.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities and uses React to render the data as a radial burst!