Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

playground #2

Public visualization

Viewing a saved revision (read-only)

ccb7c1f8c48a40f08a261b3cd27d33cf

playground #2

0 stars0🌍 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.