🌍 Public
Viewing a saved revision (read-only)
36606f3408884ed9bb0cf5e2227b6a55
dv.23 - refactored bar chart
This example shows the top 20 most populous countries as horizontal bars, with country names on the left axis and population values on the bottom axis. The React app loads CSV data from the UN World Population Prospects 2019, sorts by 2020 population, and renders SVG rectangles using d3.scaleBand for the y-axis and d3.scaleLinear for the x-axis. Axis labels and tick marks are generated by custom React components that use d3 scale methods to position text and lines. The chart updates automatically when the data loads asynchronously via d3.csv.
AI-generated descriptionA program that shows the top 20 most populous countries with axes and labels.