Customising Axes
This bar chart shows the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The example demonstrates axis customization with D3 v5, applying a custom tick formatter that converts large numbers to abbreviated units like “B” for billion. It uses `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the categorical y-axis, and customizes `d3.axisBottom` and `d3.axisLeft` by removing domain lines and adjusting tick sizes. The SVG rendering includes styled axis labels and a chart title.
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.