Making a bar chart
✓ Published1🌍 Public
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 descriptionMIT Licensed