Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with react

Public visualization

Viewing a saved revision (read-only)

bf1b724350be4172a8ee11d0b2341690

Rendering data with react

0 stars0🌍 Public
Ssabredefable
Last edited Apr 14, 2021
Created on Apr 9, 2021

An interactive donut chart renders a dataset of CSS named colors fetched as CSV via React’s `useEffect` hook and `d3.csv`. Each color is represented as a slice using `d3.pie` and `d3.arc`, with the slice’s fill set to its corresponding RGB hex value. The React component manages loading state and maps the pie-arc data to SVG `<path>` elements, creating a full-circle visualization where every color appears once with no gaps. ReactDOM mounts the component into the page.

AI-generated description

see shit