Making a Bar Chart (Outtake)
✓ Published0🌍 Public
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.
MIT Licensed