🌍 Public
Viewing a saved revision (read-only)
8a78b22525134873ac2e2cc090cdec13
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