🌍 Public
Viewing a saved revision (read-only)
ec5b019520154d99bb8fbe83985a28a0
Making a Bar Chart
This example demonstrates a horizontal bar chart of the ten most populous countries, using population data loaded from a CSV file by the D3 `csv` function. The visualization maps population counts to bar widths with `d3.scaleLinear` and countries to vertical positions with `d3.scaleBand`, rendered as SVG rectangles. Axes are added using `d3.axisLeft` and `d3.axisBottom`, with the initial SVG canvas defined in the HTML and styled via CSS.
AI-generated description