-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin.json
More file actions
179 lines (179 loc) · 7.35 KB
/
Copy pathplugin.json
File metadata and controls
179 lines (179 loc) · 7.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{
"id": "render_chart",
"uuid": "9cff2e31-1e10-4b45-b2b7-87edc20865bc",
"title": "Render Chart",
"iconURL": "https://custom.typingmind.com/assets/plugins/render-chart.webp",
"openaiSpec": {
"name": "render_chart",
"parameters": {
"type": "object",
"required": ["title", "chartType", "data", "options"],
"properties": {
"title": {
"type": "string",
"description": "The title of the chart"
},
"chartType": {
"enum": [
"line",
"bar",
"doughnut",
"pie",
"radar",
"polarArea",
"bubble",
"scatter"
],
"type": "string",
"description": "Type of the chart to render"
},
"data": {
"type": "object",
"required": ["labels", "datasets"],
"properties": {
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Labels for the chart"
},
"datasets": {
"type": "array",
"items": {
"type": "object",
"required": ["label", "data"],
"properties": {
"data": {
"type": "array",
"items": {
"type": "number"
},
"description": "Data points for the dataset"
},
"label": {
"type": "string",
"description": "Label for the dataset"
},
"fill": {
"type": "object",
"description": "Both line and radar charts support a fill option on the dataset object which can be used to create space between two datasets or a dataset and a boundary, i.e. the scale"
},
"borderColor": {
"type": "array",
"items": {
"type": "string",
"description": "Border color of the item"
},
"description": "Border color for the dataset"
},
"borderWidth": {
"type": "number",
"description": "Border width for the dataset"
},
"backgroundColor": {
"type": "array",
"items": {
"type": "string",
"description": "Color of the item"
},
"description": "Background color for the dataset"
},
"borderSkipped": {
"type": "string",
"description": "This setting is used to avoid drawing the bar stroke at the base of the fill, or disable the border radius. In general, this does not need to be changed except when creating chart types that derive from a bar chart."
},
"borderRadius": {
"type": "number",
"description": "If this value is a number, it is applied to all corners of the rectangle (topLeft, topRight, bottomLeft, bottomRight), except corners touching the borderSkipped. If this value is an object, the topLeft property defines the top-left corners border radius. Similarly, the topRight, bottomLeft, and bottomRight properties can also be specified. Omitted corners and those touching the borderSkipped are skipped. For example if the top border is skipped, the border radius for the corners topLeft and topRight will be skipped as well."
},
"stepped": {
"type": "string",
"enum": ["false", "true", "before", "after", "middle"],
"description": "false: No Step Interpolation (default); true: Step-before Interpolation (eq. before); 'before': Step-before Interpolation; 'after': Step-after Interpolation; 'middle': Step-middle.\n InterpolationIf the stepped value is set to anything other than false, tension will be ignored."
},
"tension": {
"type": "number",
"description": "Bezier curve tension of the line. Set to 0 to draw straightlines. This option is ignored if monotone cubic interpolation is used."
}
}
},
"description": "Datasets to be rendered in the chart"
}
},
"description": "Data to be rendered in the chart"
},
"options": {
"type": "object",
"description": "Additional options for the Chart.js chart",
"properties": {
"responsive": {
"type": "boolean",
"description": "When true, the chart will re-render if the browser window is resized."
},
"maintainAspectRatio": {
"type": "boolean",
"description": "When true, the chart maintains the original canvas aspect ratio (width/height) when resizing."
},
"aspectRatio": {
"type": "number",
"description": "Canvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas). Note that this option is ignored if the height is explicitly defined either as attribute or via the style. The default value varies by chart type; Radial charts (doughnut, pie, polarArea, radar) default to 1 and others default to 2."
},
"scales": {
"type": "object",
"description": "Configuration for chart scales",
"properties": {
"y": {
"type": "object",
"properties": {
"beginAtZero": {
"type": "boolean"
}
}
},
"x": {
"type": "object",
"properties": {
"beginAtZero": {
"type": "boolean"
}
}
}
}
},
"plugins": {
"type": "object",
"properties": {
"legend": {
"type": "object",
"properties": {
"display": {
"type": "boolean",
"description": "Is the legend shown? default = true"
},
"position": {
"type": "string",
"enum": ["top", "left", "right", "bottom", "chartArea"],
"description": "Position of the legend. When using the 'chartArea' option the legend position is at the moment not configurable, it will always be on the left side of the chart in the middle."
}
}
},
"tooltip": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"description": "Generate a Chart.js chart"
},
"implementationType": "javascript",
"outputType": "render_html"
}