🌍 Public
Viewing a saved revision (read-only)
54853c40cd78483f97ed7d9016aabd1a
Making a Bar Chart
This example shows a horizontal bar chart of country populations from a CSV file, with bars sized using d3.scaleLinear and positioned with d3.scaleBand. The SVG rendering is driven by d3.csv loading and parsing the data, converting population strings to numbers, then appending rectangles. The code relies on D3 v5’s select, csv, scaleLinear, max, and scaleBand APIs to build the chart without axes or labels, as the stylesheet defines no text elements.
AI-generated description