About this endpoint
What it does
Generates a link for a stacked bar chart from the chart configuration in the request body. The response returns a JSON object containing a data URI string for the generated chart image.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| title | String | Yes | Chart title. |
| data | Object Array | Yes | Stacked bar chart groups. Each item must include name and values; width is optional. |
| data[].name | String | Yes | Group label for the bar category, such as a quarter name. |
| data[].width | Integer | No | Bar width in pixels. Minimum: 1. |
| data[].values | Object Array | Yes | Stacked segments for the group. Each item must include label and value; color is optional. |
| data[].values[].color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| data[].values[].label | String | Yes | Segment label. |
| data[].values[].value | Number | Yes | Segment value. |
| theme | ENUM | No | Chart theme. Allowed values: light, dark. Default: light. |
| options | Object | No | Chart rendering options. See nested fields below. |
| options.width | Integer | No | Chart width in pixels. Minimum: 1. |
| options.height | Integer | No | Chart height in pixels. Minimum: 1. |
| options.x_axis | Object | No | X-axis styling options. |
| options.x_axis.font_size | Number | No | Font size in pixels. Minimum: 1. |
| options.x_axis.font_color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.y_axis | Object | No | Y-axis styling options. |
| options.y_axis.font_size | Number | No | Font size in pixels. Minimum: 1. |
| options.y_axis.font_color | String | No | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.spacing | Integer | No | Spacing in pixels between bars. Minimum: 0. |
| options.bar_width | Integer | No | Bar width in pixels. Minimum: 1. |
| options.title_style | Object | No | Title styling options. |
| 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 | 6-character hex color without the leading # symbol. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.background_padding | Integer | No | Background padding in pixels. Minimum: 0. |
Response
Returns a JSON object with a required data string field. The data value is a URI pointing to the generated chart image.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | String | Yes | Pre-signed URL for the generated chart image. Format: URI. |
Notes
The request body supports both data and the deprecated bar field as aliases for the chart series, but they should not be sent together.