🌍 Public
Lendo dados com React & D3
This example shows a donut chart of CSS named colors, where each color is represented by a wedge filled with its own RGB hex value. The visualization loads color data from a CSV file using D3’s `csv` utility and manages the asynchronous data with React’s `useState` and `useEffect` hooks. Each wedge is rendered as an SVG `path` computed with D3’s `arc` generator, using angles proportional to the data index. The chart appears inside a React component that displays a loading message until the data arrives.
AI-generated descriptionA 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








Comments
Sign in to join the discussion.