# Donut with total

https://fieldbook.lizardi.mx/components/donut-with-total

Category: Charts
![Still of the Donut with total component, a Fieldbook UI component in Charts.](https://fieldbook.lizardi.mx/thumbs/donut-with-total.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/donut-with-total-568dfaad46.mp4 (5 s, silent)

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.

## Frameworks

react, vue, svelte, astro, html

## Preview controls

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

| Name | Type | Default | Options or constraints |
| --- | --- | --- | --- |
| accent | color | #9BE15D | No additional limit in the metadata. |
| caption | text | Sessions | Up to 24 characters |
| holeRatio | number | 0.58 | From 0.35 to 0.75; step 0.02 |
| hueRange | number | 90 | From 20 to 180; step 5 |
| countUp | boolean | true | No additional limit in the metadata. |

## Usage notes

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

### 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.

## Install through MCP

Connect your client, call get_component to retrieve the implementation, then get_install_command for installation instructions. Choose a listed framework, integrate the returned source and verify it in your application.

```json
{
  "tool": "get_component",
  "arguments": {
    "slug": "donut-with-total",
    "framework": "react"
  }
}
```

[For agents](https://fieldbook.lizardi.mx/docs/agents)
[MCP](https://fieldbook.lizardi.mx/api/mcp)

## Related open components

- [Donut share chart](https://fieldbook.lizardi.mx/components/donut-share-chart)
- [Raised Slice Donut](https://fieldbook.lizardi.mx/components/raised-slice-donut)
- [Engraved label pie](https://fieldbook.lizardi.mx/components/engraved-label-pie)
- [Leader line pie](https://fieldbook.lizardi.mx/components/leader-line-pie)
- [Metric switch bar chart](https://fieldbook.lizardi.mx/components/metric-switch-bar-chart)
- [Outside Value Pie](https://fieldbook.lizardi.mx/components/outside-value-pie)
