Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Pie Chart with React & D3

Public visualization

Viewing a saved revision (read-only)

e2cc77881b3e467ead4e76a2b56900b7

Rendering Pie Chart with React & D3

0 stars1🌍 Public
MMorgan Worrell
Last edited Aug 31, 2023
Created on Aug 30, 2023

This example visualizes CSS named colors as a pie chart, with each slice representing one color and filled with its corresponding hex value. The chart uses React to manage component state and rendering, while D3 utilities handle data loading and geometry: `d3.csv` fetches the color data, and `d3.pie` and `d3.arc` compute the slice angles and paths. The visualization initially displays a loading message until the data arrives, then renders an SVG with equal-sized slices arranged in a full circle.

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 radio burst.