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)

38c14d40ed4a4926bf64700d9bf65e55

Fork of Rendering data with React & D3

0 stars1🌍 Public
Jjbruzzo
Last edited Jun 30, 2022
Created on Jun 30, 2022

A React component loads a CSV of named CSS colors via d3.csv and renders a pie chart as SVG paths. The chart uses the d3.arc and d3.pie functions, with each slice filled by its corresponding RGB hex value from the data. React’s useState and useEffect manage the asynchronous data loading, showing a “Loading…” message until the data arrives. The visualization displays all colors equally weighted in a single circular layout.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.