Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axis

Public visualization

Customizing Axis

0 stars0🌍 Public
Rrebeccayc
Last edited Jan 20, 2020
Created on Jan 20, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart ranking the ten most populous countries, with population values on a linear axis and country names on a categorical band axis. The SVG rendering uses D3 v5’s `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` APIs, while a custom `format` function converts large numbers to abbreviated labels (e.g., “B” for billions). Axis grid lines extend across the plot area, and the country label axis removes its domain and tick lines for a cleaner look. Data comes from a local CSV file containing population figures per country.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed