🌍 Public
Viewing a saved revision (read-only)
1e92869b97e5463889157260f672a283
Making a Bar Chart (Outtake)
This example shows a horizontal bar chart of continental populations in 2018, with each continent labeled with its total population. The chart renders as SVG rectangles sized by a `d3.scaleLinear` x-axis and positioned by a `d3.scaleBand` y-axis, with text labels added via SVG `<text>` elements. Data is parsed from an embedded CSV string using `d3.csvParse`, with population numbers cleaned via string replacement and numeric conversion. The data originates from Wikipedia’s list of continents by population.
AI-generated descriptionThis bar chart shows the population of each continent. The data comes from Wikipedia: List of continents by population.