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)

65e17083c6aa46e6868830c731db8c1b

Fork of Rendering Data with React & D3

0 stars0🌍 Public
JJanet Li
Last edited Aug 14, 2021
Created on Aug 14, 2021

This example renders a radial burst of CSS named colors as an SVG, with each color represented by a slice of a pie chart. The code loads color data from a CSV file using D3’s `csv` utility, then uses React’s `useState` and `useEffect` hooks to fetch and store the data. D3’s `pie` and `arc` generators compute the slice geometry, while React maps each data entry to a colored `<path>` element. The visualization demonstrates a hybrid approach where D3 handles data loading and layout calculations, and React manages the DOM rendering.

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!