Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Axes with React & D3

Public visualization

Viewing a saved revision (read-only)

382853d29e78466f938b230f081f89a6

Fork of Axes with React & D3

0 stars0🌍 Public
AAnthony Le
Last edited Aug 17, 2024
Created on Aug 17, 2024

This example displays the top 10 most populous countries as a bar chart with custom axes, rendered as SVG. It uses React hooks (`useState`, `useEffect`) to load data from a CSV of UN World Population Prospects 2019, then builds band and linear scales with `d3.scaleBand` and `d3.scaleLinear` to position bars and ticks. The chart manually draws axis lines and labels using React elements, bypassing D3’s axis generator, and updates live as data loads.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.