Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Viewing a saved revision (read-only)

7a9ec063417947ef8611921472e5e325

Fork of Rendering Data with React & D3

0 stars0🌍 Public
BBELLOUCH EL HASSAN
Last edited Sep 7, 2021
Created on Sep 7, 2021

This example shows a radial burst of every named CSS color, with each wedge rendered as a slice of a pie chart. It loads color data from a CSV file using `d3.csv`, then uses React hooks (`useState`, `useEffect`) to manage the asynchronous data fetch and render the SVG paths. D3’s `pie()` generator computes the angles, while `arc().innerRadius(0).outerRadius(width)` creates the full-radius wedges, with each path’s fill set to its corresponding hex value.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!