Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
Jjeffcampbell1999
Last edited May 14, 2019
Created on May 14, 2019
Forked from Customizing Axes

This bar chart shows the top 10 most populous countries using 2018 United Nations population estimates, with a custom horizontal axis that formats numbers in compact notation (e.g., “1.4B” instead of “1,415,046”). Built with D3 v5, the visualization uses `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to render SVG bars, while removing default axis domain lines and adding custom tick formatting, axis labels, and a title. The code loads data from a CSV file with `d3.csv` and scales population values by 1,000 for accurate display.

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