Generate Doughnut Chart
POST/generate/chart/doughnut
This endpoint generates a doughnut 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 doughnut 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 doughnut.
barsColorsstring[]
Colors for the doughnut in the chart.
borderWidthnumber
Width of the borders around the doughnut.
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"
}