Skip to main content
100%

Customizing Axis

✓ Published0🌍 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
MIT Licensed

Similar vizzes