Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
Jjunge870214
Last edited Jan 21, 2019
Created on Jan 21, 2019
Forked from Customizing Axes

This bar chart shows the populations of the top 10 most populous countries in 2018, sourced from the United Nations World Population Prospects. The horizontal bars are ordered by country name, with a linear x-axis and a banded y-axis. The code uses D3 v5’s `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to draw axes, while custom tick formatting converts large numbers into abbreviated units like “B” for billions. The x-axis gridlines extend across the chart via negative tick sizes, and the axis labels and title are styled with CSS.

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.

MIT Licensed

Similar vizzes