Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart (Outtake)

Public visualization

Viewing a saved revision (read-only)

520a39b0cece4ed7b11035b9501edac0

Making a Bar Chart (Outtake)

0 stars0🌍 Public
Vvaynexie
Last edited Dec 26, 2019
Created on Dec 26, 2019

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 description

This bar chart shows the population of each continent. The data comes from Wikipedia: List of continents by population.