🌍 Public
Viewing a saved revision (read-only)
f0c9d141dc2f44f1b09b48d913507f35
Fork of Refactored Bar Chart
This example displays the top 10 most populous countries as horizontal bars, using React for component structure and D3 v5 for scales and data loading. The chart renders as SVG, with `d3.scaleBand` positioning categorical country labels on the y-axis and `d3.scaleLinear` mapping population values to bar widths. Axis components (`AxisBottom`, `AxisLeft`) draw tick marks and labels from the scales, while `Marks` generates each rectangle. Data comes from the United Nations World Population Prospects 2019 CSV, loaded asynchronously with D3’s `csv` function.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.