Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with react and D3

Public visualization

Rendering data with react and D3

0 stars0🌍 Public
KKIRRAN P L
Last edited Dec 3, 2023
Created on Dec 3, 2023

A donut chart renders the CSS named colors dataset, loaded from a GitHub gist as CSV, with each color name represented by a slice colored by its RGB hex value. The React component uses the `useState` and `useEffect` hooks to fetch and store the data asynchronously, then maps it through D3's `pie()` layout and `arc()` generator to produce SVG paths. All slices have equal value, creating a uniform ring, and the chart appears at the center of a 960×500 SVG canvas.

AI-generated description

Visualizing data with react and D3

Comments

Sign in to join the discussion.

MIT Licensed