Bar Chart: Population of 20 countries in 2010
✓ Published1🌍 Public
A horizontal bar chart ranks the 20 most populous countries in 2010, with each bar’s length proportional to population. The chart uses D3 v7’s `scaleLinear` and `scaleBand` to map population values and country names to pixels. Data is loaded from a CSV via `d3.csv`, processed with `d3.autoType`, and sorted using `d3.descending`. Bars are rendered as SVG `<rect>` elements with a hover color change, and axes are drawn using `d3.axisBottom` and `d3.axisLeft`.
AI-generated descriptionMIT Licensed