Customizing Axes
This bar chart displays the populations of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The visualization demonstrates customized D3 axes, including a band scale for countries and a linear scale for population, with formatted tick labels that abbreviate numbers using the `.3s` format and replace 'G' with 'B'. Both axes have their domain lines and tick lines removed or restyled, with the y-axis labels and gridlines fully customized via CSS. The chart also adds a title and axis label, and draws steel-blue rectangles for each bar using D3's `scaleBand`, `scaleLinear`, `axisBottom`, and `axisLeft` APIs.
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.