Skip to main content
100%

Formatting axes

✓ Published3🌍 Public
Bbertieip
Last edited Jun 22, 2020
Created on Jun 12, 2020
Forked from Making a barchart

This example displays a bar chart of the populations of the ten most populous countries, sorted by rank. The chart uses a formatted y-axis that converts raw numbers into human-readable values with the suffix "B" for billions, and a categorical x-axis for country names. The visualization is rendered as an SVG using React and D3 v5, with scales created via `d3.scaleLinear` and `d3.scaleBand`. Axes are drawn with `d3.axisLeft` and `d3.axisBottom`, and tick labels are formatted using `d3.format`. The data is loaded from a CSV file using `d3.csv`, with population values multiplied by 1000 during preprocessing.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes