Customizing Axes Test
This bar chart displays the populations of the top 10 most populous countries in 2018, based on data from the United Nations World Population Prospects. It emphasizes customizing D3 axes: the x-axis uses tick formatting to abbreviate numbers (e.g., “B” for billions), while grid lines extend across the plot via `tickSize`. The y-axis labels remain unformatted. Built with D3 v5, the SVG chart uses `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft`, with custom text elements for the title and axis label. Population values are multiplied by 1000 in the code.
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.