Skip to main content
100%

formatting axes

✓ Published1🌍 Public
Mmoowaffles
Last edited Feb 14, 2021
Created on Feb 14, 2021
Forked from making a barchart

This example visualizes the top 13 most populous countries using a horizontal bar chart, with animated bars that grow from zero to their final population values over two seconds. It demonstrates axis formatting techniques by using a `d3.scaleLinear` for the x-axis with a custom tick formatter that converts large numbers to abbreviated units (e.g., "B" for billions). The chart applies `d3.axisBottom` and `d3.axisLeft` to render grid lines and labels, while removing default domain paths for a cleaner look. Population data is loaded from a CSV file and scaled by a factor of 1,000.

AI-generated description
MIT Licensed

Similar vizzes