Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
Pphdiamantino
Last edited Sep 18, 2020
Created on Sep 18, 2020
Forked from Customizing Axes

This bar chart shows the populations of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects. The example demonstrates how to customize D3 axes, including formatting tick labels to abbreviate numbers (e.g., turning billions into "B") and removing default axis lines and domain marks. It uses D3 v5 APIs such as `scaleBand`, `scaleLinear`, `axisBottom`, and `axisLeft`, with styled tick text, gridlines, and labels. The SVG rendering includes margins, a title, and an x‑axis label.

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