🌍 Public
Viewing a saved revision (read-only)
4a5f3b6ba97845b192a5e171e881d6b1
Make a bar chart!
A horizontal bar chart displays the population of ten countries, sourced from data.csv, with China and India leading. The SVG chart is built using D3 v5, where `scaleLinear` maps population values to bar widths and `scaleBand` positions each country's bar vertically. The code reads the CSV, multiplies populations by 1000, and appends `rect` elements to the SVG, with bar height derived from the band width.
AI-generated description