Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Render Data with React & D3

Public visualization

Viewing a saved revision (read-only)

ebcc7bd11fcc4f5f96fc352a3f2d582a

Render Data with React & D3

0 stars1🌍 Public
NNoelle Huchette
Last edited Jan 14, 2023
Created on Jan 13, 2023
Forked from MouseFollower

This example renders a donut chart of named CSS colors using React and D3. It loads color data from a CSV file via `d3.csv`, then uses `d3.pie` and `d3.arc` to generate SVG paths. React’s `useState` and `useEffect` hooks manage the asynchronous data loading, displaying a loading message until the data arrives. Each color is represented as a slice filled with its corresponding hex value from the dataset.

AI-generated description

Renders data with D3, uses react state to keep track of data