🌍 Public
Viewing a saved revision (read-only)
88b46f25cbd3426591b2df6212a41ba1
Making a bar chart
This example shows a horizontal bar chart ranking the ten most populous countries, with population values scaled along the x-axis and country names on the y-axis. It loads data from a CSV file and renders the bars as SVG rectangles using D3 v5’s `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs. The bars are styled with a steelblue fill via CSS, and axes labels are positioned with margins for readability.
AI-generated description