Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
BBrett Cunningham
Last edited Nov 16, 2019
Created on Nov 16, 2019
Forked from Customizing Axes

This bar chart displays the population of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. It shows how to customize D3 axes by removing the default domain lines, styling tick lines in a light gray, and formatting x-axis labels to abbreviate large numbers (e.g., converting gigas to billions) via tickFormat. The chart is rendered as an SVG, built with D3 v5, using scaleLinear for the x-axis, scaleBand for the y-axis, and axisBottom to generate the customized axes.

AI-generated description

This 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.

MIT Licensed

Similar vizzes