Skip to main content
100%

Donut chart

✓ Published0🌍 Public
BBhavyatulasi
Last edited Jul 23, 2020
Created on Jul 23, 2020
Forked from Donut chart

A donut chart displays a single numeric value of 47 as a proportion of 100, rendered with 20 equal arc segments around a central hole. Blue segments represent the value, while grey segments show the remainder, with a partial blue arc for the fractional part. Built with React and D3 v5, the code uses the `d3.arc` API to generate SVG paths, setting inner and outer radii from the SVG height, and computes angles via `Math.PI` divisions. The SVG element is selected with `d3.select`, and strokes create separation between segments.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes