Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Customizing Axes

0 stars0🌍 Public
Ccoconan
Last edited Aug 11, 2019
Created on Aug 11, 2019
Forked from Customizing Axes

This example shows the top 10 most populous countries from the 2018 United Nations World Population Prospects estimate as a horizontal bar chart, using population values multiplied by 1,000. It highlights how to customize D3 v5 axes, including removing axis frames, adjusting tick marks, and formatting tick labels to convert G (giga) to B (billion) with `format('.3s')`. The chart is rendered as SVG using `d3.scaleLinear` and `d3.scaleBand`, with styles for tick text, lines, and title defined in CSS.

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.

Comments

Sign in to join the discussion.

MIT Licensed