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)

ca661d2778aa47b6ba5869c408e6793b

Fork of Rendering Data with React & D3

0 stars0🌍 Public
Yynwc2006
Last edited Jan 11, 2022
Created on Jan 11, 2022

This example visualizes the CSS named colors dataset as a radial burst, where each color is represented by a pie slice arranged around a central point. It loads the data from a CSV file using `d3.csv` and renders the visualization as SVG through React components. The code leverages `d3.pie` and `d3.arc` to compute the slice angles and paths, filling each path with the corresponding hex value from the dataset. React’s `useState` and `useEffect` hooks manage asynchronous data loading and trigger the rendering once the data arrives.

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!