🌍 Public
Viewing a saved revision (read-only)
4edacd9be36c45f6b07713e0fe2cd07d
Axes with react D3
This example shows a horizontal bar chart of the top 10 countries by population in 2020, using React to render SVG elements and D3 to handle data loading and scales. The code loads CSV data from a remote URL with `d3.csv`, then uses `scaleBand` for the country axis, `scaleLinear` for the population axis, and manually creates tick marks and labels for both axes. Each country is represented as a `rect` whose width corresponds to its population.
AI-generated descriptionA program that loads in some data data about CSS named colors with D3 utilities, and uses React to render the data as a radial burst.