Custom Axis
✓ Published1🌍 Public
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 descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed