Customizing Axes
A bar chart displays the top 10 most populous countries from United Nations 2018 estimates, with population values in thousands. The visualization customizes D3 axes using `axisBottom` and `axisLeft`, removing domain lines and formatting tick labels via `format('.3s')` to convert billions to "B". D3 v5's `scaleLinear` and `scaleBand` position bars, while custom styling sets large fonts and tick colors. SVG rendering with a left margin accommodates lengthy country names, and a title and axis label are added as 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.