Overview
100%
Installation
Usage
Variants
Pie
Donut with Center Label
Radial Bar (Progress Comparison)
API Reference
Array of segments:
{ name: string, value: number, color: string }.Chart type. Values:
pie · donut · radialChart height in pixels.
Label text shown in the center hole (donut only).
Value text shown in the center hole (donut only).
Inner radius in pixels for donut variant (0 = solid pie).
Show percentage labels on each segment.
Show color legend.
Show interactive hover tooltips.
Accessibility
- SVG chart includes
<title>and<desc>with a text summary of the proportions - Provide a data table fallback — pie charts are purely visual
- Use sufficient color contrast between adjacent segments (minimum 3:1 ratio)
- Do not rely solely on color to distinguish segments — use labels or patterns
Do’s & Don’ts
Do
- Use Pie/Donut charts for showing proportions summing to 100%
- Limit to 5–6 segments maximum — more becomes unreadable
- Use the Donut variant with
centerValueto highlight the total metric - Sort segments from largest to smallest, starting at 12 o’clock
Don't
- Don’t use Pie Chart for comparing exact values — use Bar Chart instead
- Don’t use more than 6 segments — group small values into “Other”
- Don’t use 3D pie charts — they distort proportional perception
- Don’t use similar colors for adjacent segments