Skip to main content
100%

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

✓ Published0🌍 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
MIT Licensed

Similar vizzes