Skip to content
Menu

Charts

Donut with total

Donut with total: A donut chart that puts the running total in its own hole and swaps that readout to whichever slice is hovered or focused.

Using Donut with total

Donut with total 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#9BE15DNo additional limit in the metadata.
captiontextSessionsUp to 24 characters
holeRationumber0.58From 0.35 to 0.75; step 0.02
hueRangenumber90From 20 to 180; step 5
countUpbooleantrueNo additional limit in the metadata.
Which frameworks are available for Donut with total?

Donut with total 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 with total depend on?

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

What accessibility details are visible in Donut with total?

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

How does Donut with total handle reduced motion?

Donut with total reads the motion preference in its React source through matchMedia(prefers-reduced-motion). 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