Skip to content
Menu

Charts

Donut share chart

Donut share chart: A five slice donut with a hollow centre and hairline gaps that sweeps open on mount and lifts whichever slice the pointer is over.

Using Donut share chart

Donut share chart uses the card preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
accentcolor#FF6A1FNo additional limit in the metadata.
hueRangenumber90From 20 to 180; step 5
holeRationumber0.55From 0.2 to 0.75; step 0.05
gapnumber2From 0 to 6; step 0.5
showTooltipbooleantrueNo additional limit in the metadata.
Which frameworks are available for Donut share chart?

Donut share chart is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Donut share chart depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx, tailwind-merge.

What accessibility details are visible in Donut share chart?

The React source for Donut share chart includes: attributes and handlers (aria-hidden, aria-label, aria-live, aria-pressed, onKeyDown, tabIndex); explicit roles (button, group); key comparisons (ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Enter, Escape, Space). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Donut share chart handle reduced motion?

Donut share chart reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: opacity: drawn || reduce ? 1 : 0; transitionDelay: reduce ? "0ms" : `${SWEEP_MS}ms`; transitionDelay: reduce ? "0ms, 0ms, 0ms" : `${delay}ms, 0ms, 0ms`. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components