Fork of Rendering Data with React & D3
✓ Published1🌍 Public
This example shows a horizontal bar chart of the ten most populous countries in 2020, using a bar width proportional to each country’s population. It loads CSV data from a GitHub gist via `d3.csv`, then maps each row’s population string to a number. The React component uses `useState` and `useEffect` to fetch and store the data, while `d3.scaleBand` and `d3.scaleLinear` position and size the rectangles. React renders the final SVG, with each country’s name on the y-axis and its population scaled along the x-axis.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed