Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customising Axes of a Bar Chart

Public visualization

Viewing a saved revision (read-only)

1010ec34ffb8432294775b6583ef4175

Customising Axes of a Bar Chart

0 stars1🌍 Public
Aavirathtib
Last edited Dec 31, 2021
Created on Dec 30, 2021

This example shows a horizontal bar chart of the ten most populous countries, using population values from a CSV file. The chart customizes its axes by removing the default domain lines and tick lines from the categorical y-axis, and by applying a custom tick formatter to the linear x-axis that abbreviates large numbers (e.g., converting "G" to "B"). The visualization is built with D3 v7, using `scaleLinear` and `scaleBand` for scales, `axisBottom` and `axisLeft` for axes, and SVG rendering.

AI-generated description