Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart Rendering Data with React and D3 - CSS Named Colors

Public visualization

Pie Chart Rendering Data with React and D3 - CSS Named Colors

0 stars1🌍 Public
AAriana
Last edited Jul 20, 2021
Created on Jul 20, 2021

This example uses React and D3 to render a pie chart of CSS named colors, with each slice colored by its corresponding hex value. D3’s `csv` loader fetches color data from a GitHub gist, while the `pie` and `arc` generators compute the slice angles and SVG paths. React manages the component state and renders the SVG, updating from a loading message to the visualization once data arrives. The chart displays all named colors as equal-weight slices radiating from the center, creating a full circular burst.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed