Customizing Axes
This example displays a horizontal bar chart of the top 10 most populous countries, based on 2018 United Nations estimates loaded from a CSV file. It demonstrates extensive D3 axis customization using `d3.axisBottom`, `d3.axisLeft`, and a linear scale. The x-axis uses a custom tick formatter to abbreviate values (e.g., converting kilometers to billions) and renders gridlines, while the y-axis removes its domain line and ticks. Axis labels, titles, and styling are applied via CSS classes.
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.