Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

pie chart react

Public visualization

Viewing a saved revision (read-only)

74d4398f52b4477a9f6a55dfe93cdfb5

pie chart react

0 stars0🌍 Public
SSuperShreejit
Last edited May 15, 2022
Created on May 15, 2022
Forked from React Starter

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 description

React Starter code.