About this endpoint
What it does
Generates a bar chart image from the request body and returns the rendered image as binary content. The chart is configured with a required title and bar data, plus optional styling and layout options.
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 # if provided. |
| 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 # if provided. |
| 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 layout and styling 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 the chart image as a binary payload in the response body. The output schema is a binary string, so there is no JSON object wrapper or named response field to read.