Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
Jjay
Last edited Feb 10, 2020
Created on Feb 1, 2020
Forked from HTML Starter

This example visualizes the populations of the world’s ten most populous countries as a horizontal bar chart, with circles rendered per country using SVG. D3’s `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs load the data, map population counts to bar lengths, and position country labels along the y-axis. The code removes default axis domain lines, formats tick labels with `format('.3s')` (replacing “G” with “B” for billions), and applies custom CSS styling. Data comes from `data.csv`.

AI-generated description
MIT Licensed

Similar vizzes