Skip to main content
100%

Fork of Axes with React & D3

✓ Published0🌍 Public
SSpuddy2884
Last edited Sep 14, 2021
Created on Sep 14, 2021

This example visualizes the top 10 most populous countries as horizontal bars using React and D3, with data from the United Nations World Population Prospects 2019. The chart includes both x-axis ticks from `xScale.ticks()` and y-axis country labels, though it lacks axis lines. D3’s `scaleBand` and `scaleLinear` map the data to SVG rectangles, while React’s `useState` and `useEffect` manage asynchronous CSV loading via `d3.csv`. The SVG is rendered directly through React, making it a hybrid of declarative components and D3 scales.

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.

MIT Licensed

Similar vizzes