Skip to main content
100%

Fork of Rendering Data with React

✓ Published1🌍 Public
LLisa Wagner
Last edited Aug 24, 2021
Created on Aug 24, 2021

This example shows a horizontal bar chart of the top 10 countries by population as of 2020, using React to render SVG rectangles. The chart loads CSV data with `d3.csv` and use `d3.scaleBand` and `d3.scaleLinear` to map countries and population values to screen coordinates. The data is fetched asynchronously via `useEffect`, stored in React state, and displayed after a brief "Loading..." message. React’s `useState` and `useCallback` manage the data flow, while `d3.max` determines the scale domain.

AI-generated description

A program that loads in some data about CSS named colours using D3 utilities, and uses React to render the data as a radial burst!

MIT Licensed

Similar vizzes