Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
Yynot-krats
Last edited Jul 19, 2020
Created on Jul 19, 2020
Forked from Customizing Axes

This example shows a horizontal bar chart of the top 10 most populous countries using 2018 United Nations population estimates, with custom tick formatting and axis styling. It builds on a basic bar chart by using D3’s `axisBottom` and `axisLeft` to render axes, while removing default domain lines and tick lines. The x-axis ticks use `format('.3s')` to abbreviate numbers and replace ‘G’ with ‘B’ for billions, and a custom label is appended. The chart also removes the y-axis’s domain and tick lines, leaving only country labels.

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