Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
MMEHMETHAN YAGCI
Last edited Jul 9, 2020
Created on Jul 9, 2020
Forked from Customizing Axes

This bar chart displays the top 10 most populous countries using population estimates from the 2018 United Nations World Population Prospects. It highlights axis customization in D3 v5, showing how tick formats convert large numbers into abbreviated labels using `format('.3s')` and replacing 'G' with 'B' for billions. The axes are rendered as SVG elements with `axisBottom` and `axisLeft`, while gridlines, tick styling, and axis labels are adjusted through CSS and appended text elements. Population values are loaded from a CSV file and scaled linearly, with countries positioned by `scaleBand`.

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