Data
- Components
- Data
- Pie chart
Pie Chart
type: "pie"4 styles · 16 propertiesPie and donut charts from a single data series, with slice labels, percentages and a legend — proportions at a glance.
Updated




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 itExamples
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.
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.pngconst res = await fetch(`https://render.imejis.io/v1/${process.env.IMEJIS_DESIGN_ID}`, {
method: "POST",
headers: {
"dma-api-key": process.env.IMEJIS_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"share.data": [55, 20, 15, 10]
}),
})
if (!res.ok) throw new Error(`render failed: ${res.status}`)
const image = Buffer.from(await res.arrayBuffer())import os
import requests
response = requests.post(
f"https://render.imejis.io/v1/{os.environ['IMEJIS_DESIGN_ID']}",
headers={
"dma-api-key": os.environ["IMEJIS_API_KEY"],
"Content-Type": "application/json",
},
json={
"share.data": [55, 20, 15, 10]
},
)
response.raise_for_status()
with open("image.png", "wb") as f:
f.write(response.content)Properties
Every property works the same in the editor, in design JSON and as an API override.
16 properties shown
| Property | Type | Default | What it does |
|---|---|---|---|
| Data | |||
variant | 'pie' | 'donut' | "pie" | Full pie or donut with a hole. |
data | number[] | [] | Slice values. |
labels | string[] | [] | Slice names. |
| Look | |||
colors | color[] | [] | Slice color palette (falls back to built-in palette). |
innerRadius | number | 0.6 | Donut hole radius as a fraction of the pie radius. |
textColor | color | "#52514e" | Color of labels and legend text. |
| Axes, values and legend | |||
showValues | boolean | true | Print a label on each slice. |
labelType | 'percent' | 'value' | "percent" | Whether slice labels show percentages or raw values. |
showLegend | boolean | true | Show the slice legend. |
legendPosition | 'top' | 'right' | 'bottom' | "bottom" | Where the legend is placed. |
| Frame | |||
opacity | number | 1 | Overall component opacity from 0 (transparent) to 1 (opaque). |
borderWidth | number | 0 | Border thickness in pixels around the component. |
borderColor | color | "transparent" | Border color (any CSS color). |
borderStyle | 'solid' | 'dashed' | 'dotted' | 'double' | 'none' | "solid" | Border line style. |
borderRadius | number | 0 | Corner radius in pixels. |
boxShadow | string | — | 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.
Where the pie chart component fits
Free tools built on it, guides that use it, and the components that sit beside it.