Skip to main content
100%

Fork of Customizing Axes

✓ Published0🌍 Public
Eendlesstory
Last edited Feb 14, 2024
Created on Feb 14, 2024
Forked from Customizing Axes

This visualization displays the population of the top 10 most populous countries as horizontal bars, using data from the 2018 United Nations World Population Prospects estimate. It demonstrates custom axis styling with D3 v5, including tick formatting, tick line removal, and axis labels styled via CSS. The code uses `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` from the D3 module, and the axis tick labels are formatted from billions to the short scale (e.g., “G” replaced by “B”). Data is loaded from a CSV file and rendered as SVG with steelblue rectangles.

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