Fork of Customizing Axes
This bar chart displays the top 10 most populous countries based on 2018 estimates from the United Nations World Population Prospects, with population values scaled in thousands. The visualization showcases customized D3 v5 axes: the y-axis uses `scaleBand` for country labels, while the x-axis employs `scaleLinear` with a tick formatter that converts millions to billions. The code uses `axisLeft` and `axisBottom` to render axes, removes default domain lines, and adds custom axis labels and a title via SVG text elements.
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.