🌍 Public
Viewing a saved revision (read-only)
1d5d74e42a034cb8a2ff04a707f1b0a6
Making a bar chart
A horizontal bar chart displays the population of the top 10 most populous countries, with country names on the y-axis and a linear population scale on the x-axis. The chart uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position bars and axes, with tick labels formatted like '1.42B'. Data is loaded from a CSV file via `d3.csv` and rendered as SVG rectangles, with a title and axis label added as text elements.
AI-generated descriptionThis bar chart shows population of the top 10 most populous countries