Customizing Axes
This bar chart displays the population of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. It visualizes both bars and circles for each country while demonstrating how to customize D3 axes. Using D3 v5, the code applies `d3.scaleLinear` and `d3.scaleBand` for scales, `d3.axisBottom` and `d3.axisLeft` to generate axes, and custom tick formatting with `d3.format` to abbreviate numbers. Axis gridlines extend across the chart, and the default axis lines and ticks are removed for a cleaner look.
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.