🌍 Public
Viewing a saved revision (read-only)
d22887bb636849b188da29c35bc1a85a
Making a Bar Chart
This example shows a horizontal bar chart of the top 10 most populous countries, with country names on the y-axis and population counts on the x-axis, rendered as SVG rectangles filled with steel blue. The code uses D3 v5, specifically the `select` and `csv` APIs, to load population data from a CSV file and attach it to the chart. The static SVG container is sized 960 by 500 pixels, with rectangles styled via CSS, though the chart is currently incomplete as it only logs the loaded data to the console.
AI-generated description