About this endpoint
What it does
Generates a stacked bar chart and returns a link to the generated chart image. The request body contains the chart definition, including the required title and data fields, plus optional theme and styling options.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object Array | Yes | Array of stacked bar groups. Each item must include name and values; width is optional. Each values item contains a label and value, and may include color as a 6-character hex string without the leading #. |
| data[].name | String | Yes | Group label, such as a quarter name. |
| data[].width | Integer | No | Bar width in pixels. Minimum: 1. |
| data[].values | Object Array | Yes | Array of stacked segments for the bar. Each item must include label and value; color is optional. |
| data[].values[].color | String | No | 6-character hex color without the leading #. 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. |
| title | String | Yes | Chart title. Minimum length: 1. |
| options | Object | No | Chart display options. Includes width, height, spacing, bar_width, canvas_color, background_padding, and nested style objects for axes and title. See schema for nested fields. |
| 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. font_size is in pixels; font_color is a 6-character hex string without the leading #. |
| 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 #. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.y_axis | Object | No | Y-axis styling options. font_size is in pixels; font_color is a 6-character hex string without the leading #. |
| 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 #. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.spacing | Integer | No | Spacing between bars. Minimum: 0. |
| options.bar_width | Integer | No | Bar width in pixels. Minimum: 1. |
| options.title_style | Object | No | Title styling options. padding is in pixels; font_size is in pixels; font_color is a 6-character hex string without the leading #. |
| 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 #. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.canvas_color | String | No | 6-character hex color without the leading #. Pattern: ^[A-Fa-f0-9]{6}$. |
| options.background_padding | Integer | No | Padding around the chart background in pixels. Minimum: 0. |
Response
Returns a JSON object with a data string field. The data value is a URI that points to the generated chart image.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | String | Yes | Pre-signed URL for the generated chart image. |