🌍 Public
Viewing a saved revision (read-only)
3ec90f6af35d4450b049c906e2e5cfdc
Rendering Data with React & D3
This example renders a pie chart of CSS color names using React and D3. It loads color data from a CSV file via D3’s `csv` function and maps each row to a pie slice using D3’s `pie` and `arc` utilities. The SVG output uses React’s `useState` and `useEffect` hooks to asynchronously fetch and store the data, then renders each slice as a colored path. The visualization displays the distribution of named colors with their hex values directly as fill colors.
AI-generated descriptionA program that loads data with D3 react