Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

3e09265d66074bb7956ccc2d43474d4a

Making a Bar Chart

0 stars0🌍 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