About this endpoint
What it does
Generates a bar chart image from the chart configuration in the request body and returns the image as binary data.
Request Body
| Parameter | Type | Description |
|---|---|---|
| data | Object Array | Canonical list of bar values. Each item supports label and value, and may include color. Requires at least 1 item. |
| data[].color | String | 6-character hex color without the leading # symbol. |
| data[].label | String | Bar label. |
| data[].value | Number | Bar value. |
| bars | Object Array | Alias for data. Deprecated. Use either data or bars, not both. Each item supports label and value, and may include color. |
| bars[].color | String | 6-character hex color without the leading # symbol. |
| bars[].label | String | Bar label. |
| bars[].value | Number | Bar value. |
| theme | ENUM | Chart theme. Allowed values: light, dark. Default: light. |
| title | String | Chart title. Must be at least 1 character. |
| options | Object | Chart layout and styling options. |
| options.width | Integer | Chart width in pixels. Minimum: 1. |
| options.height | Integer | Chart height in pixels. Minimum: 1. |
| options.x_axis | Object | X-axis styling options. |
| options.x_axis.font_size | Number | Font size in pixels. Minimum: 1. |
| options.x_axis.font_color | String | 6-character hex color without the leading # symbol. |
| options.y_axis | Object | Y-axis styling options. |
| options.y_axis.font_size | Number | Font size in pixels. Minimum: 1. |
| options.y_axis.font_color | String | 6-character hex color without the leading # symbol. |
| options.spacing | Integer | Spacing in pixels. Minimum: 0. |
| options.bar_width | Integer | Bar width in pixels. Minimum: 1. |
| options.background | Object | Background styling options. |
| options.background.color | String | 6-character hex color without the leading # symbol. |
| options.background.padding | Integer | Padding in pixels. Minimum: 0. |
| options.title_style | Object | Title styling options. |
| options.title_style.padding | Integer | Padding in pixels. Minimum: 0. |
| options.title_style.font_size | Number | Font size in pixels. Minimum: 1. |
| options.title_style.font_color | String | 6-character hex color without the leading # symbol. |
| options.canvas_color | String | 6-character hex color without the leading # symbol. |
Response
Returns a binary response body containing the generated chart image.
Notes
bars is a deprecated alias for data. Use one or the other, not both.



