🌍 Public
Viewing a saved revision (read-only)
9e7246a60a1c4652be5878de0ad36851
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