Customizing Axes
This example shows a bar chart of the top 10 most populous countries, using 2018 population estimates from the United Nations World Population Prospects. The visualization demonstrates customized D3 axes, including a bottom axis with tick labels formatted in abbreviated units (converting "G" to "B") and tick lines spanning the full chart height, while the left axis removes its domain and tick lines entirely. The chart is rendered as SVG using D3 v5, with scales from `d3.scaleLinear` and `d3.scaleBand`, and axes from `d3.axisBottom` and `d3.axisLeft`. Labels are styled via external CSS.
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.