Skip to main content
100%

Custom Axis

✓ Published1🌍 Public
DdeafMother
Last edited Jan 18, 2020
Created on Jan 18, 2020
Forked from MAKING BARS

This example visualizes country populations with a horizontal bar chart, using a custom axis that formats large numbers (e.g., converting gigabytes to billions) via D3’s `format` API. The bar lengths are scaled by `d3.scaleLinear`, while country names are positioned using `d3.scaleBand`. The chart is rendered as SVG with React, importing `csv`, `scaleLinear`, `scaleBand`, `max`, `axisLeft`, `axisBottom`, and `format` from D3 v5. Data comes from `data.csv`, with gridlines and axis labels styled through CSS.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes