Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
JJames Swank
Last edited Oct 17, 2019
Created on Oct 17, 2019

This example shows a horizontal bar chart of population figures for the world’s most populous countries, drawn as an SVG. It uses d3.csv to load the data, multiplying each population value by 1000, then maps values with d3.scaleLinear and d3.scaleBand. Axes are added via d3.axisLeft and d3.axisBottom, while rectangles are appended for each bar.

AI-generated description
MIT Licensed

Similar vizzes