Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a bar chart with D3.js!

Public visualization

Viewing a saved revision (read-only)

2089d6d13bf14dfd8c3e7ad315ecf8ef

Let's make a bar chart with D3.js!

0 stars0🌍 Public
AAloap
Last edited Sep 21, 2020
Created on Sep 21, 2020

A bar chart maps country populations from a CSV file to horizontal rectangles. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to position and size bars, with population values multiplied by 1,000 and rendered as SVG `rect` elements. Data loading relies on `d3.csv`, and the layout is fixed at 960 by 500 pixels. The example focuses on the fundamental steps of binding data to SVG shapes and encoding values through a linear scale.

AI-generated description