Skip to main content
100%

Customize axis

✓ Published1🌍 Public
Mmichielpunt86
Last edited Jul 23, 2020
Created on Jul 23, 2020
Forked from Customize axis

This example shows a horizontal bar chart of country populations using a linear scale for the x-axis and a band scale for the y-axis. The code imports `d3.select`, `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.max`, `d3.axisLeft`, `d3.axisBottom`, and `d3.format` to load `data.csv`, compute the domain, and render SVG rectangles. The bottom axis is customized with a `.2s` tick format, abbreviating population values (e.g., 1.4M).

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes