🌍 Public
Viewing a saved revision (read-only)
89e72fd08d49438abc0045d1d72b8495
Making a bar chart
This example shows a horizontal bar chart of population figures for the world’s most populous countries, using a CSV dataset where values are multiplied by 1,000. The chart uses an SVG container and D3 v5’s `scaleLinear` for the population axis, `scaleBand` for the country categories, and `axisLeft`/`axisBottom` to render tick marks. Rectangles are appended via a data join, with width mapped to population and height set to the band’s bandwidth.
AI-generated description