Customizing Axes
This example displays a bar chart of the top 10 most populous countries using 2018 United Nations population estimates, with customized axes. It builds on a basic bar chart by applying D3’s `axisBottom` with a tick format that abbreviates large numbers (e.g., converting billions to “B”) and removing default axis domain lines. The left axis uses `axisLeft` with its domain and tick lines stripped. The visualization uses `d3.scaleLinear` and `d3.scaleBand` for scales, with SVG rendering, and includes styled axis labels and a title via 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.