🌍 Public
Viewing a saved revision (read-only)
c695ba1f84204284985e7c1241bc1955
Making a bar chart
This example shows a horizontal bar chart of the ten most populous countries, using population data from a CSV file rendered as SVG. The chart uses D3 v5 APIs including `d3.csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map country names to y-positions and population values to bar widths. Bars appear in steel blue with a left margin of 200 pixels for labels, and the population values are multiplied by 1000 on load.
AI-generated description