Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
DDaniel Korosi
Last edited Jan 30, 2020
Created on Jan 30, 2020
Forked from Customizing Axes

This bar chart displays the top 10 most populous countries using 2018 United Nations population estimates, with country names on the y-axis and population values on the x-axis. The code customizes D3 v5 axes by removing domain lines, hiding tick lines on the y-axis, and formatting x-axis ticks to abbreviate numbers with a custom formatter that replaces “G” with “B.” It uses `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` from D3, rendering to SVG.

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