Customizing Axes
This example displays a bar chart of the populations of the top 10 most populous countries, using data from the United Nations’ 2017 World Population Prospects. It shows the core grammar of D3 axes: a linear scale maps population values to bar widths, while a band scale positions the categorical country labels. The axes are heavily customized via `d3.axisLeft` and `d3.axisBottom`, including formatted tick labels, removal of domain lines, and custom tick marks that span the plot area.
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.