Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axis

Public visualization

Viewing a saved revision (read-only)

59249b886c6f4b37b6821e269c40d4d0

Customizing Axis

0 stars1🌍 Public
Pprincit
Last edited Apr 28, 2020
Created on Mar 24, 2020
Forked from Making a Bar Chart

This example shows the top 12 most populous countries using horizontal bars ordered by population. It uses d3.csv to load population data (in thousands, converted to raw counts), d3.scaleBand for the categorical country axis, and d3.scaleLinear for the numerical population axis. Customized axes include removed domain lines, formatted tick labels with abbreviations (e.g., "1.41B"), and a custom axis title, all rendered as SVG. D3’s axisLeft and axisBottom generate the ticks and grid lines.

AI-generated description