🌍 Public
Viewing a saved revision (read-only)
8dd69639ea534dbdb17668bd4c9fb5c9
Making a Bar Chart!
This example shows a horizontal bar chart of the top 10 most populous countries in South America, using population figures from a CSV file. The code loads data with `d3.csv` and renders bars as SVG rectangles, scaled with `d3.scaleLinear` and `d3.scaleBand`. Axes are generated using `d3.axisLeft` and `d3.axisBottom`, with tick labels formatted via `format('.3s')`. A title and axis label are added as SVG text elements, and the chart includes grid lines through the x-axis tick size setting.
AI-generated description