pie chart react
✓ Published0🌍 Public
This example loads a CSV of CSS color names and their RGB hex values from a GitHub gist, then renders each row as a slice of a pie chart using React and D3’s `pie` and `arc` generators. The chart fills each path with the color’s hex value, producing a full circle of distinct hues. Data is fetched asynchronously with `csv` and stored in React state via `useState` and `useEffect`. The SVG output scales to the full window size, with the pie centered and a fixed outer radius of 250 pixels.
AI-generated descriptionReact Starter code.
MIT Licensed