Skip to main content

Overview

100%
Donut
Pie Chart displays part-to-whole proportions as arc segments. It supports a standard pie, a donut (hollow center for KPI display), and a radial bar variant for progress-style comparisons.

Installation


Usage


Variants

Pie

Donut with Center Label

Radial Bar (Progress Comparison)


API Reference

PieDataItem[]
required
Array of segments: { name: string, value: number, color: string }.
string
default:"donut"
Chart type. Values: pie · donut · radial
number
default:"280"
Chart height in pixels.
string
Label text shown in the center hole (donut only).
string
Value text shown in the center hole (donut only).
number
default:"60"
Inner radius in pixels for donut variant (0 = solid pie).
boolean
default:"false"
Show percentage labels on each segment.
boolean
default:"true"
Show color legend.
boolean
default:"true"
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 centerValue to 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