About this endpoint
What it does
Generates a bar chart and returns a pre-signed URL for the generated chart image. The request body includes the chart title, bar data, and optional styling/options; the response returns the URL in a JSON object.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| title | String | Yes | Chart title. |
| data | Object Array | Yes | Canonical list of bar values. Each item must include label and value; color is optional and must be a 6-character hex color without the leading # symbol. |
| data[].color | String | No | 6-character hex color without the leading # symbol. |
| data[].label | String | Yes | Bar label. |
| data[].value | Number | Yes | Bar value. |
| bars | Object Array | No | Deprecated alias for data. Use either data or bars, not both. Each item must include label and value; color is optional and must be a 6-character hex color without the leading # symbol. |
| bars[].color | String | No | 6-character hex color without the leading # symbol. |
| bars[].label | String | Yes | Bar label. |
| bars[].value | Number | Yes | Bar value. |
| theme | ENUM | No | Chart theme. Allowed values: light, dark. Default: light. |
| options | Object | No | Chart styling and layout 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. |
| 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. |
| options.spacing | Integer | No | Spacing in pixels. Minimum: 0. |
| options.bar_width | Integer | No | Bar width in pixels. Minimum: 1. |
| options.background | Object | No | Background styling options. |
| options.background.color | String | No | 6-character hex color without the leading # symbol. |
| options.background.padding | Integer | No | Padding in pixels. Minimum: 0. |
| 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. |
| options.canvas_color | String | No | 6-character hex color without the leading # symbol. |
Response
Returns a JSON object with a data string field. The data value is a URI for the generated chart image.
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| data | String | Yes | Pre-signed URL for the generated chart image. |