Skip to main content
100%

Fork of Customizing Axes

✓ Published0🌍 Public
NNoobSaiyan
Last edited Jan 9, 2021
Created on Jan 9, 2021
Forked from Customizing Axes

A horizontal bar chart displays the top 10 most populous countries from 2018 United Nations data, with a custom x-axis that formats population numbers in abbreviated units (e.g., "1.42B"). Using D3 v5 with SVG rendering, the example extends a basic bar chart by applying `scaleLinear`, `scaleBand`, and `axisBottom` with a custom tick format via `format('.3s')`, while removing axis domain lines and styling labels. The y-axis uses `axisLeft` with all ticks removed, and bars are sized using `xScale` and `yScale`.

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