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)

29d9840087a6496385e04731e04e309e

Fork of Loading Data with React & D3

0 stars0🌍 Public
RRod* Wilhelmy
Last edited Dec 28, 2021
Created on Dec 28, 2021

This example renders the CSS named colors dataset as a pie chart. Each color is represented by a slice whose fill matches its RGB hex value, providing a visual catalog of the data. The code loads the CSV using D3’s `csv` utility and manages state with React’s `useState` and `useEffect`. The pie layout and arc paths are generated via D3’s `pie` and `arc` functions, with the SVG output produced declaratively through React.

AI-generated description

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