Customize axes
✓ Published1🌍 Public
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 descriptionMIT Licensed