Generate Bar Chart
POST/generate/chart/bars
This endpoint generates a bar chart image based on the provided data, labels, and customization options.
Request
Header Parameters
ipaas string
- application/json
Bodyrequired
datanumber[]required
Data points for the bar chart.
labelsstring[]required
Labels corresponding to the data points.
getAsUrlboolean
If true, returns a URL instead of the chart image.
widthnumber
Width of the chart image.
heightnumber
Height of the chart image.
backgroundColorstring
Background color of the chart image.
bordersColorsstring[]
Colors for the borders of the bars.
barsColorsstring[]
Colors for the bars in the chart.
borderWidthnumber
Width of the borders around the bars.
titlestring
Title of the chart.
options object
Additional configuration options for Chart.js.
object
fileNamestring
Optional filename for the generated chart image.
Responses
- 200
- 400
Success
- application/json
- application/octet-stream
- Schema
- Example (auto)
Schema
urlstringrequired
The result image URL.
{
"url": "string"
}
- Schema
Schema
Bad Request
- application/json
- Schema
- Example (auto)
Schema
statusnumber
errorMessagestring
{
"status": 0,
"errorMessage": "string"
}