- Components
- Pie chart
- Donut
Donut Pie Chart
Generate donut chart images with a configurable hole for a centered metric — slice data updated on every API call. Create donut chart images free.
Updated

What this style sets
A style is the pie chart component with a few properties set. Send these, or start from the style in the editor.
{
"share.variant": "donut",
"share.innerRadius": 0.6
}Good for
- KPI share visuals with a number in the middle
- Storage or budget usage breakdowns
- Modern dashboard-style report images
Try your own data
Change the donut 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.
Examples
Each example is the same donut pie chart with different values. The JSON is what you send.
Storage usage by file type
Photos, video, documents and other as a donut for a usage report email.
{
"share.variant": "donut",
"share.innerRadius": 0.6,
"share.data": [48, 27, 15, 10],
"share.labels": ["Photos", "Video", "Docs", "Other"],
"share.colors": ["#6366F1", "#0EA5E9", "#F59E0B", "#94A3B8"]
}Portfolio allocation
An investment mix across four asset classes with a roomy center hole.
{
"share.variant": "donut",
"share.innerRadius": 0.65,
"share.data": [55, 25, 12, 8],
"share.labels": ["Stocks", "Bonds", "Cash", "Crypto"],
"share.colors": ["#10B981", "#6366F1", "#94A3B8", "#F59E0B"]
}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],
"share.variant": "donut",
"share.innerRadius": 0.6
}' \
-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],
"share.variant": "donut",
"share.innerRadius": 0.6
}),
})
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],
"share.variant": "donut",
"share.innerRadius": 0.6
},
)
response.raise_for_status()
with open("image.png", "wb") as f:
f.write(response.content)Other pie chart styles
Donut Pie Chart questions
What does the Donut style change on the pie chart component?
A pie with a hole — leaves room for a centered metric. It sets 2 properties on the pie chart component: variant, innerRadius. Everything else keeps the component's defaults, so your data and layout carry over.
How do I render the donut pie chart through the API?
Add a pie chart component to a design, then send its data together with the style's properties as flat overrides (for example share.variant and share.innerRadius) in the render request. Each render can carry different data while keeping the Donut look.
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.
Where the pie chart component fits
Free tools built on it, guides that use it, and the components that sit beside it.


