Customizing Axes
This bar chart displays the population of the top 10 most populous countries using 2018 data from the United Nations World Population Prospects, with values multiplied by 1,000. It highlights D3 axis customization, using `d3.axisBottom` and `d3.axisLeft` with tick formatting that converts large numbers to abbreviations like "B" for billions. The chart removes default axis lines and gridlines, adding custom tick styling and labels via CSS. It uses D3’s `scaleBand` for Y-axis categories and `scaleLinear` for X-axis values, rendered as an SVG.
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.