Customizing Axis
✓ Published1🌍 Public
This example displays the populations of the top 10 most populous countries from the 2018 United Nations World Population Prospects dataset. It uses d3.csv to load the data and d3.scaleLinear and d3.scaleBand to map population and country names to bar positions. Custom tick formatting converts abbreviations like G to B, and d3.axisBottom and d3.axisLeft render the axes with custom margins and tick sizes. The SVG bars highlight on hover.
AI-generated descriptionThis chart shows the population of the top 10 most populated countries. The data comes from the year 2018 estimate in "United Nations: 2018 World Population Prospects".
MIT Licensed