Customizing Axes
This example displays a bar chart of the top 10 most populous countries using 2018 estimates from the United Nations World Population Prospects 2017. It customizes D3 axes by removing the domain lines, styling tick text and lines, and formatting population values with `d3.format` to abbreviate numbers like “1.4B”. The chart uses `d3.scaleBand` for countries and `d3.scaleLinear` for population, with `d3.axisLeft` and `d3.axisBottom` to render axes.
AI-generated descriptionThis bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.