Skip to main content
100%

Customize axes

✓ Published1🌍 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
MIT Licensed

Similar vizzes