Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Viewing a saved revision (read-only)

d2a3933b6b4a444192aee5af05d0c6a7

Fork of Loading Data with React & D3

0 stars0🌍 Public
Jjth500
Last edited Apr 23, 2023
Created on Apr 23, 2023

A circular pie chart visualizes CSS named colors, rendered as an SVG with React and D3. The code loads color data from a CSV file using D3's `csv` utility and stores it in React state via `useState`. Each color is drawn as a pie slice using D3's `arc` function, with the fill color set from the hex value in the data. The chart is centered in the browser window, with a loading message displayed until the data is fetched.

AI-generated description

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