Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
Jjlspangl
Last edited May 21, 2021
Created on May 21, 2021

This example shows the ten most populous countries in 2018 as a horizontal bar chart, with population values converted to billions and labeled on a custom x-axis. The chart uses D3 v5’s `d3.csv`, `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to render SVG rectangles, while the axes are styled by removing domain lines and tick marks via `selectAll`. Population data comes from the United Nations’ World Population Prospects 2017 estimate, and the tick labels are formatted with `d3.format`.

AI-generated description

This bar chart shows population of the 10 most populous countries. The data comes from the year 2018 estimate in [United Nations: World Population Prospects 2017] (https://population.un.org/wpp/Download/Standard/Population/)

MIT Licensed

Similar vizzes