Generate Line Chart
POST/generate/chart/line
This endpoint generates a line 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 line 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 line.
barsColorsstring[]
Colors for the line in the chart.
fillboolean
Fill the color under the line.
tensionnumber
Tension of the line.
borderWidthnumber
Width of the borders around the line.
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"
}