Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
Ddavid-fon
Last edited Dec 6, 2020
Created on Dec 6, 2020
Forked from Customizing Axes

This example displays the populations of the world’s top billionaires as a horizontal bar chart, using data from a sample CSV with United Nations estimates. It builds on a basic bar chart by customizing both axes: the left y-axis labels are cleaned of tick lines and the domain, while the bottom x-axis uses `scaleLinear` and `axisBottom` with a custom tick format that converts billions to "B". The chart is rendered in SVG using D3 v5, with margins and labels styled via external CSS.

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