Skip to main content
100%

Rendering data with react and D3

✓ Published0🌍 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

MIT Licensed

Similar vizzes