Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

2ae115839460442096454ece0886c422

Customizing Axes

0 stars0🌍 Public
TTouha Zohair
Last edited May 8, 2020
Created on May 8, 2020
Forked from Customizing Axes

This example displays a bar chart of the top 10 most populous countries in 2018, using data from the United Nations World Population Prospects. The chart customizes D3 axes by removing default domain lines and tick lines, applying a custom tick format that converts G to B for billions, and styling tick labels, axis labels, and the title via CSS. It uses `d3.scaleLinear` and `d3.scaleBand` to map population and country names, with `d3.axisBottom` and `d3.axisLeft` to render the axes.

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.