dv.23 - refactored bar chart
✓ Published1🌍 Public
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.
MIT Licensed