Skip to main content
100%

Fork of Customizing Axes

✓ Published1🌍 Public
Sshubhamsingh173
Last edited Jun 1, 2021
Created on Jun 1, 2021
Forked from Customizing Axes

This bar chart displays the populations of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects 2017. The code uses d3.scaleLinear for the population axis and d3.scaleBand for the categorical country axis, with customized axes via d3.axisLeft and d3.axisBottom. It formats tick labels to abbreviate large numbers, adds a title and axis label, and removes default axis lines for a cleaner look. The bars are rendered as SVG rectangles with a fixed steelblue fill.

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