About this endpoint
What it does
Generates a donut chart image from the chart configuration sent in the request body and returns the image as binary data.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| title | String | Yes | Chart title. Minimum length 1. |
| theme | ENUM | No | Chart theme. Allowed values: light, dark. Default: light. |
| data | Object Array | Yes | Chart data points to render. At least 1 item required. |
| data[].color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| data[].label | String | Yes | Slice label. |
| data[].value | Number | Yes | Slice value. Must be 0 or greater. |
| slices | Object Array | No | Alias for data. Deprecated. Use either data or slices, not both. At least 1 item required. |
| slices[].color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| slices[].label | String | Yes | Slice label. |
| slices[].value | Number | Yes | Slice value. Must be 0 or greater. |
Response
Returns a binary file response containing the generated chart image.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| binary | String | Yes | Binary image data returned by the endpoint. |