About this endpoint
What it does
Generates a pie chart and returns a pre-signed URL for the rendered chart image. The request body lets you provide the chart data, title, theme, and optional sizing/style settings.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object Array | Yes | Pie chart slices. Each item must include label and value; color is optional. Use data or the deprecated pies alias, but not both. |
| 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. Minimum: 0. |
| pies | Object Array | No | Deprecated alias for data. Use either data or pies, not both. Each item has the same shape as data[]. |
| pies[].color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| pies[].label | String | Yes | Slice label. |
| pies[].value | Number | Yes | Slice value. Minimum: 0. |
| theme | ENUM | No | Chart theme. Allowed values: light, dark. Default: light. |
| title | String | Yes | Chart title. Must be at least 1 character long. |
| options | Object | No | Optional chart layout and styling settings. |
| options.width | Integer | No | Chart width in pixels. Minimum: 1. |
| options.height | Integer | No | Chart height in pixels. Minimum: 1. |
| options.title_style | Object | No | Title styling settings. |
| options.title_style.padding | Integer | No | Padding in pixels. Minimum: 0. |
| options.title_style.font_size | Number | No | Font size in pixels. Minimum: 1. |
| options.title_style.font_color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.canvas_color | String | No | Canvas color as a 6-character hex value without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
Response
Returns a JSON object with a data string field containing a URI. The data value is a pre-signed URL for the generated chart image.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | String | Yes | Pre-signed URL for the generated chart image. |