Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

2ebedf97317349f59cfee263aeac317b

Customizing Axes

0 stars0🌍 Public
RRiccardo Pressiani
Last edited Oct 1, 2019
Created on Oct 1, 2019
Forked from Customizing Axes

This example shows a horizontal bar chart of the top 10 most populous countries, with population values displayed in billions on a custom axis. The code uses d3.csv to load data, d3.scaleLinear and d3.scaleBand for scales, and d3.axisBottom with a custom tick format that abbreviates numbers (e.g., converting "G" to "B"). The left axis hides its domain and tick lines, while a title and axis label are added as SVG text elements.

AI-generated description