Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

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

Comments

Sign in to join the discussion.

MIT Licensed