Fork of Fork of Customizing Axes
This bar chart visualizes the populations of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. It demonstrates D3 axis customization, using `d3.scaleLinear` for the population axis and `d3.scaleBand` for country labels, which are abbreviated to their first three letters. The code employs `d3.axisLeft` with a custom tick formatter that converts large numbers into abbreviated units like “B” for billions, and `d3.axisBottom` for the categorical axis. SVGs render the bars in steelblue with a minimal, clean design.
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.