Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React & D3

Public visualization

Rendering Data with React & D3

0 stars0🌍 Public
GGregS1290
Last edited Oct 27, 2021
Created on Oct 25, 2021

This example visualizes the 148 named CSS colors as a donut chart, with each slice filled by its corresponding RGB hex value. Using React state to manage data loading, it fetches a CSV via `d3.csv` and renders an SVG through `ReactDOM`. The pie layout is computed with `d3.pie`, while each segment’s path is generated by `d3.arc`, producing a colorful circular spectrum that maps each color name to its visual representation.

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.

Comments

Sign in to join the discussion.

MIT Licensed