Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Visualize data in React & D3 - use Pie chart

Public visualization

Viewing a saved revision (read-only)

3a6c7e906e2a4effb1ff71e1313d9bae

Fork of Visualize data in React & D3 - use Pie chart

0 stars1🌍 Public
Ssmile2git
Last edited May 27, 2021
Created on May 27, 2021

This example shows a pie chart of CSS named colors, where each slice represents one color and is filled with its corresponding RGB hex value. The chart is built by combining React for component structure and state management with D3 utilities for data loading and geometry. It uses `d3.csv` to fetch the color data from a GitHub gist, `d3.pie` to compute slice angles, and `d3.arc` to generate SVG path commands. The visualization renders as an SVG, centered on a full-screen canvas, with each slice equally sized because `pie().value(1)` assigns a constant weight.

AI-generated description

Loads data with D3 utilities and uses React to render the data.