Skip to main content

DonutChart

DonutChart — Prism component.

Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggle
Live demo
Open ↗

When to use

DonutChart — Prism component.

Accessibility

Each chart ships an accessible fallback (a visually-hidden data table / aria-label summary) so the data is available to screen readers, not just sighted users. Colour is paired with shape/label, never used alone.

Import

const { DonutChart } = window.PrismDesignSystem_39d121;

Examples

With center label

<DonutChart data={mix} centerValue="766" centerLabel="SKUs" />

Props

PropTypeRequiredDescription
dataDonutDatum[]Yes
sizenumber
thicknessnumber
centerValueReact.ReactNode
centerLabelReact.ReactNode
showLegendboolean
formatValue(v: number) =&gt; React.ReactNode
captionstring