🌍 Public
Viewing a saved revision (read-only)
692ebf8935624b1386cb1f5b103860cc
Making a Bar chart
A bar chart displays population figures for ten countries, from China's 1.4 million to Mexico's 130 thousand, using a linear scale for values and a band scale for categorical country labels. The example loads data from a CSV file via `d3.csv` and renders the bars as SVG rectangles, with axes positioned using D3's `scaleLinear` and `scaleBand`. The visualization relies on D3 v5's `select`, `csv`, `max`, and scale utilities to size and position each bar within a fixed 960-by-500 SVG canvas.
AI-generated description