This is a GROWI scirpt plugin to generate chart/graph by QuickChart.
If you want to show the chart/graph on the page, using quickchart
on code block.
Almost parameters depend on QuickChart API. Please refer to QuickChart API.
And you should set url
parameter to https://quickchart.io/chart
.
```quickchart
{
"type": "bar",
"data": {
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
"datasets": [{
"label": "# of Votes",
"data": [12, 19, 3, 5, 2, 3],
"backgroundColor": ["red", "blue", "yellow", "green", "purple", "orange"]
}]
}
}
```
If you want to use your quickchart server, you can set url
parameter to your server. The default value is https://quickchart.io/chart
.
```quickchart
{
"url": "https://your-quickchart-server/chart",
"type": "bar",
"data": {
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
"datasets": [{
"label": "# of Votes",
"data": [12, 19, 3, 5, 2, 3],
"backgroundColor": ["red", "blue", "yellow", "green", "purple", "orange"]
}]
}
}
```
And you alse set width
and height
parameters to change the size of the chart/graph. The default value is 100%
and auto
.
```quickchart
{
"url": "https://your-quickchart-server/chart",
"width": "500",
"height": "300",
"type": "bar",
"data": {
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
"datasets": [{
"label": "# of Votes",
"data": [12, 19, 3, 5, 2, 3],
"backgroundColor": ["red", "blue", "yellow", "green", "purple", "orange"]
}]
}
}
```
MIT