Customizing Axes
This example displays a bar chart of the top 10 most populous countries, with data from United Nations’ World Population Prospects 2017. The chart shows population values on the x-axis and country names on the y-axis, using D3’s `scaleLinear` and `scaleBand`. It customizes axes by removing domain lines and ticks from the left axis, formatting x-axis labels with `format('.3s')` to show billions, and adding a custom axis label and title. The visualization is rendered as SVG using D3 v5.
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.