Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie chart in React & D3 - 1st attempt

Public visualization

Fork of Pie chart in React & D3 - 1st attempt

0 stars0🌍 Public
Cchengfengmf
Last edited May 5, 2021
Created on May 4, 2021

This example demonstrates a four-slice pie chart created with React and D3.js v6, rendered as SVG elements. The chart divides a circle into colored arcs, with each slice’s color interpolated between two RGB values using D3’s `interpolateRgb` API. The pie geometry is computed via D3’s `pie` and `arc` functions, while React components (`SimplePieChart`, `Slice`) manage the rendering. An unused `Check` component shows a color ramp test using a five-item array.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed