Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axis

Public visualization

Customizing Axis

0 stars1🌍 Public
CCarloGato
Last edited Dec 3, 2019
Created on Dec 3, 2019
Forked from Making a Barchart

This example displays a horizontal bar chart of countries with over 100 million inhabitants, using population data from a CSV file. The chart shows a highly customized axis: the y-axis has its tick lines and domain removed entirely, while the x-axis uses a custom tick formatter that abbreviates numbers (e.g., converting 1.4G to 1.4B) and displays gridlines across the full chart height. The code leverages D3 v5 functions like `scaleBand`, `scaleLinear`, `axisBottom`, `axisLeft`, and `format` to achieve these modifications.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed