Skip to content

Pie Chart

type: "pie"4 styles · 16 properties

Pie and donut charts from a single data series, with slice labels, percentages and a legend — proportions at a glance.

Updated

Open in the editor
Preview · DefaultReal render, 1200 × 630
Pie Chart component, Default style, sample render
The pie chart component’s default look.

Try your own data

Change the pie chart here with the same controls the editor shows. The preview updates as you type, and you get the API request for your changes.

4 styles

Pick one to preview it

Examples

Each example is the same pie chart with different values. The JSON is what you send.

Traffic sources breakdown

Visitor share by acquisition channel, percent-labeled per slice.

{
  "share.data": [46, 27, 17, 10],
  "share.labels": ["Organic", "Direct", "Social", "Referral"],
  "share.colors": ["#6366F1", "#0EA5E9", "#F59E0B", "#94A3B8"]
}

Monthly budget split

A household budget by category with raw dollar amounts on the slices.

{
  "share.data": [1200, 650, 400, 350],
  "share.labels": ["Rent", "Food", "Transport", "Other"],
  "share.colors": ["#10B981", "#F59E0B", "#6366F1", "#94A3B8"],
  "share.labelType": "value"
}

Good for

  • Market or traffic share visuals in automated reports
  • Budget and spend breakdown images for finance emails
  • Poll and survey result cards for social media
  • Portfolio allocation snapshots

New values, every render

Update slice values with '<key>.data' and names with '<key>.labels'; variant and colors are overridable too. Send only the properties you want to change; everything else keeps its design value. The API guides cover every language.

Or ask your AI agent“Using imejis, make a 1200 × 630 image with a Pie chart component (type "pie") filled with my data, then give me a render link I can call with new values.”
curl -X POST "https://render.imejis.io/v1/$IMEJIS_DESIGN_ID" \
  -H "dma-api-key: $IMEJIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "share.data": [55, 20, 15, 10]
  }' \
  -o image.png

Properties

Every property works the same in the editor, in design JSON and as an API override.

16 properties shown

PropertyTypeDefaultWhat it does
Data
variant'pie' | 'donut'"pie"Full pie or donut with a hole.
datanumber[][]Slice values.
labelsstring[][]Slice names.
Look
colorscolor[][]Slice color palette (falls back to built-in palette).
innerRadiusnumber0.6Donut hole radius as a fraction of the pie radius.
textColorcolor"#52514e"Color of labels and legend text.
Axes, values and legend
showValuesbooleantruePrint a label on each slice.
labelType'percent' | 'value'"percent"Whether slice labels show percentages or raw values.
showLegendbooleantrueShow the slice legend.
legendPosition'top' | 'right' | 'bottom'"bottom"Where the legend is placed.
Frame
opacitynumber1Overall component opacity from 0 (transparent) to 1 (opaque).
borderWidthnumber0Border thickness in pixels around the component.
borderColorcolor"transparent"Border color (any CSS color).
borderStyle'solid' | 'dashed' | 'dotted' | 'double' | 'none'"solid"Border line style.
borderRadiusnumber0Corner radius in pixels.
boxShadowstring—CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)".

Pie chart questions

Can I change the slices per API call?

Yes — '<key>.data' sets the slice values and '<key>.labels' the names; colors and the pie/donut variant are overridable too.

How do I make a donut chart?

Set variant to 'donut' and tune innerRadius (a fraction of the pie radius) to size the hole — leaving room for a centered metric.

Can slices show raw values instead of percentages?

Yes — labelType switches slice labels between 'percent' and 'value', and showValues toggles the labels entirely.

Do I control the slice colors?

Pass a colors array to map your palette onto the slices in order; omit it to fall back to the built-in palette.

Free tools built on it, guides that use it, and the components that sit beside it.