🌍 Public
Viewing a saved revision (read-only)
7633f30b753b49fc8a55fd9ac3ad90c1
Baby's first bar chart
This example shows a horizontal bar chart of the world’s most populous countries, scaled from a CSV file so that population values are displayed in thousands. It uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position bars and axes, with SVG `rectangles` styled in steel blue. The data is loaded via `d3.csv` and multiplied by a constant, while margins are applied to an inner chart group for readable labels and a clean layout.
AI-generated descriptionTutorial.