🌍 Public
Viewing a saved revision (read-only)
7cf9854d26c04f0f818d0dee82b3664b
Making a Bar Chart
A horizontal bar chart displays the top 10 most populous countries, with population values in millions. The chart uses D3 v5 (via the `d3` object) and SVG rendering. The code loads data from `data.csv`, scales the population values by 1000, and uses `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. It generates axes with `axisLeft` and `axisBottom`, applies a tick formatter converting G (giga) to B (billion), and removes default domain lines.
AI-generated description