Skip to main content
100%

Fork of Axes with React & D3

✓ Published0🌍 Public
XXudong Zhang
Last edited Apr 3, 2021
Created on Apr 1, 2021

This example uses React and D3 to render a horizontal bar chart of the top 10 most populous countries from the United Nations World Population Prospects 2019 dataset. It shows the population values as bars with x- and y-axis tick marks and labels, generated manually using `xScale.ticks()`, `scaleBand`, and `scaleLinear`. The chart is drawn as an SVG, with loading state handled via React hooks (`useState`, `useEffect`) and data fetched asynchronously with `d3.csv`.

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