Skip to main content
100%

playground #2

✓ Published0🌍 Public
Bbart
Last edited Jul 24, 2021
Created on Jul 24, 2021
Forked from React Starter

This example shows a donut chart with three randomly sized and colored slices rendered as SVG paths. The code uses React to build the component, while D3 v7 provides the `pie` generator and `arc` generator to compute the angular layout and path geometry. Slice values come from `d3.randomUniform`, and each color is generated as a random hexadecimal string. The chart is centered in a fixed 900 by 600 viewport with an inner radius of 60 and outer radius of 200.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes