Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Visualizing Data with React and D3

Public visualization

Visualizing Data with React and D3

0 stars1🌍 Public
Ddmagarian
Last edited Nov 1, 2021
Created on Nov 1, 2021

This visualization displays the CSS named colors as a donut chart, with each color represented by a wedge whose fill matches the color it encodes. The data comes from a CSV file listing named colors and their hex values, loaded asynchronously via `d3.csv`. React manages the component state and rendering lifecycle, while D3’s `pie` and `arc` functions compute the angular layout and path geometry. The SVG output is generated declaratively in JSX, with React re-rendering once the CSV data arrives.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed