Skip to main content
100%

Fork of Rendering data with react

✓ Published0🌍 Public
SSreekar Reddy
Last edited May 15, 2021
Created on May 15, 2021

This example renders a horizontal bar chart of the top 10 countries by 2020 population from a UN dataset. The chart uses Unicode text as a loading message before the data arrives. The implementation employs D3 v5 utilities like `csv`, `scaleBand`, `scaleLinear`, and `max` to load and scale the data, while the React `useState` and `useEffect` hooks manage the asynchronous data fetching and SVG rendering. The code also includes an unused `pieArc` defined with D3's `arc` function.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes