Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customize axes

Public visualization

Customize axes

0 stars1🌍 Public
Ddanish-nix
Last edited May 11, 2021
Created on May 11, 2021

A horizontal bar chart displays the world’s ten most populous countries, with population values formatted in abbreviated units (e.g., “1.42B”) and gridlines extending across the plot. The code loads CSV data with d3.csv, scales population linearly with d3.scaleLinear and countries as bands via d3.scaleBand, then draws axes using d3.axisLeft and d3.axisBottom while stripping axis domains and tick lines. Custom tick formatting with d3.format replaces “G” with “B” for billions, and margins position the title and axis label.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed