Pie Chart component
Datatype: "pie"Pie and donut charts from a single data series, with slice labels, percentages and a legend — proportions at a glance.
Design JSON
{
"title": "Pie chart sample",
"description": "A dynamic pie chart",
"dimensions": {
"width": 800,
"height": 420
},
"background": {
"color": "#ffffff"
},
"components": [
{
"id": "sample-pie",
"key": "share",
"type": "pie",
"position": {
"x": 250,
"y": 60
},
"rotation": 0,
"size": {
"width": 300,
"height": 300
},
"dynamic": true,
"properties": {
"variant": "pie",
"data": [
40,
30,
20,
10
],
"labels": [
"North",
"South",
"East",
"West"
],
"colors": [],
"showValues": true,
"labelType": "percent",
"showLegend": true,
"legendPosition": "bottom",
"opacity": 1
}
}
]
}Like what you built? The full editor — canvas, templates and the render API — is free to start.
Open the editorPie Chart examples
Real renders of the pie chart — each one is the same component with different property values, and the API payload below each preview reproduces it exactly.
Traffic sources breakdown
Visitor share by acquisition channel, percent-labeled per slice.
API overrides for this example
{
"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.
API overrides for this example
{
"share.data": [
1200,
650,
400,
350
],
"share.labels": [
"Rent",
"Food",
"Transport",
"Other"
],
"share.colors": [
"#10B981",
"#F59E0B",
"#6366F1",
"#94A3B8"
],
"share.labelType": "value"
}All pie chart styles
Every style rendered live — each is just a different set of property values on the same component, and each has its own page with a dedicated preview, use cases and API example.
Use cases
What developers typically build with the pie chart component.
- 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
Use it dynamically via the API
Update slice values with '<key>.data' (or just '<key>') and names with '<key>.labels'; variant and colors are overridable too.
Full API request with the sample design's current values — the playground above sends only the properties you change
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"share.variant": "pie",
"share.data": [
40,
30,
20,
10
],
"share.labels": [
"North",
"South",
"East",
"West"
],
"share.colors": [],
"share.showValues": true,
"share.labelType": "percent",
"share.showLegend": true,
"share.legendPosition": "bottom",
"share.opacity": 1
}'Only send the properties you want to change — everything else keeps its design value. See the API documentation for all languages.
Property reference
Every property the pie chart component accepts — in the editor, in design JSON, and as API overrides.
| Property | Type | Edits as | Default | Description |
|---|---|---|---|---|
| variant | 'pie' | 'donut' | piedonut | "pie" | Full pie or donut with a hole. |
| data | number[] | text | [] | Slice values. |
| labels | string[] | text | [] | Slice names. |
| colors | color[] | text | [] | Slice color palette (falls back to built-in palette). |
| innerRadius | number | 0.6 | 0.6 | Donut hole radius as a fraction of the pie radius. |
| showValues | boolean | true | true | Print a label on each slice. |
| labelType | 'percent' | 'value' | percentvalue | "percent" | Whether slice labels show percentages or raw values. |
| showLegend | boolean | true | true | Show the slice legend. |
| legendPosition | 'top' | 'right' | 'bottom' | toprightbottom | "bottom" | Where the legend is placed. |
| textColor | color | #52514e | "#52514e" | Color of labels and legend text. |
| opacity | number | 1 | 1 | Overall component opacity from 0 (transparent) to 1 (opaque). |
| borderWidth | number | 0 | 0 | Border thickness in pixels around the component. |
| borderColor | color | transparent | "transparent" | Border color (any CSS color). |
| borderStyle | 'solid' | 'dashed' | 'dotted' | 'double' | 'none' | soliddasheddotteddoublenone | "solid" | Border line style. |
| borderRadius | number | 0 | 0 | Corner radius in pixels. |
| boxShadow | string | text | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |