em-kit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -2
- package/dist/ai.d.ts +1896 -0
- package/dist/ai.js +2699 -0
- package/dist/ai.js.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.js +56 -0
- package/dist/build.js.map +1 -0
- package/dist/chunks/EditorCard.d-CcLiXQ7c.d.ts +469 -0
- package/dist/chunks/pies.utils-CneQQ7wE.js +7900 -0
- package/dist/chunks/pies.utils-CneQQ7wE.js.map +1 -0
- package/dist/index.d.ts +1376 -0
- package/dist/index.js +8364 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.js +6 -0
- package/package.json +104 -4
package/dist/ai.d.ts
ADDED
|
@@ -0,0 +1,1896 @@
|
|
|
1
|
+
/** A root-object JSON Schema, the shape tool APIs accept (no top-level anyOf/oneOf). */
|
|
2
|
+
type ToolInputSchema = {
|
|
3
|
+
type: 'object';
|
|
4
|
+
properties: Record<string, unknown>;
|
|
5
|
+
required: string[];
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
/** The ChartSpec union as JSON Schema 2020-12, one `anyOf` branch per spec type. Validates a spec. */
|
|
9
|
+
declare const chartSpecSchema: {
|
|
10
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
11
|
+
readonly title: "ChartSpec";
|
|
12
|
+
readonly description: "A chart to render. `chart` selects the kind and which other fields apply. A field (`dimension`, `measure`, `measures`, `xAxis`, ...) is a bare row-key string or a { name, ... } object. Options use vertical orientation for every kind: `xAxis`/`xAxisLabel` is the category axis and `yAxisRange*` the value range, even for horizontal variants. Set `granularity` on the chart, never on a field, when the category axis is a time field. `rows` is long format with zone-less ISO time strings.";
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly $ref: "#/$defs/BarSpec";
|
|
15
|
+
}, {
|
|
16
|
+
readonly $ref: "#/$defs/BarGroupedSpec";
|
|
17
|
+
}, {
|
|
18
|
+
readonly $ref: "#/$defs/LineSpec";
|
|
19
|
+
}, {
|
|
20
|
+
readonly $ref: "#/$defs/LineGroupedSpec";
|
|
21
|
+
}, {
|
|
22
|
+
readonly $ref: "#/$defs/LineWithKpiTabsSpec";
|
|
23
|
+
}, {
|
|
24
|
+
readonly $ref: "#/$defs/LineComparisonSpec";
|
|
25
|
+
}, {
|
|
26
|
+
readonly $ref: "#/$defs/LineComparisonWithKpiTabsSpec";
|
|
27
|
+
}, {
|
|
28
|
+
readonly $ref: "#/$defs/AreaSpec";
|
|
29
|
+
}, {
|
|
30
|
+
readonly $ref: "#/$defs/BarLineSpec";
|
|
31
|
+
}, {
|
|
32
|
+
readonly $ref: "#/$defs/PieSpec";
|
|
33
|
+
}, {
|
|
34
|
+
readonly $ref: "#/$defs/DonutLabelSpec";
|
|
35
|
+
}, {
|
|
36
|
+
readonly $ref: "#/$defs/ScatterSpec";
|
|
37
|
+
}, {
|
|
38
|
+
readonly $ref: "#/$defs/BubbleSpec";
|
|
39
|
+
}, {
|
|
40
|
+
readonly $ref: "#/$defs/KpiSpec";
|
|
41
|
+
}, {
|
|
42
|
+
readonly $ref: "#/$defs/KpiComparisonSpec";
|
|
43
|
+
}, {
|
|
44
|
+
readonly $ref: "#/$defs/TableSpec";
|
|
45
|
+
}, {
|
|
46
|
+
readonly $ref: "#/$defs/HeatMapSpec";
|
|
47
|
+
}, {
|
|
48
|
+
readonly $ref: "#/$defs/PivotSpec";
|
|
49
|
+
}];
|
|
50
|
+
readonly $defs: {
|
|
51
|
+
readonly AreaSpec: {
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly additionalProperties: false;
|
|
54
|
+
readonly properties: {
|
|
55
|
+
readonly chart: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly const: "area";
|
|
58
|
+
};
|
|
59
|
+
readonly xAxis: {
|
|
60
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
61
|
+
};
|
|
62
|
+
readonly groupBy: {
|
|
63
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
64
|
+
readonly description: "Stacking dimension. Omit for a single-series area.";
|
|
65
|
+
};
|
|
66
|
+
readonly measure: {
|
|
67
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
68
|
+
};
|
|
69
|
+
readonly granularity: {
|
|
70
|
+
readonly $ref: "#/$defs/Granularity";
|
|
71
|
+
};
|
|
72
|
+
readonly options: {
|
|
73
|
+
readonly type: "object";
|
|
74
|
+
readonly additionalProperties: false;
|
|
75
|
+
readonly properties: {
|
|
76
|
+
readonly showTooltips: {
|
|
77
|
+
readonly type: "boolean";
|
|
78
|
+
};
|
|
79
|
+
readonly showValueLabels: {
|
|
80
|
+
readonly type: "boolean";
|
|
81
|
+
};
|
|
82
|
+
readonly showLogarithmicScale: {
|
|
83
|
+
readonly type: "boolean";
|
|
84
|
+
};
|
|
85
|
+
readonly xAxisLabel: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
88
|
+
};
|
|
89
|
+
readonly yAxisLabel: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
readonly description: "Value-axis label.";
|
|
92
|
+
};
|
|
93
|
+
readonly yAxisRangeMin: {
|
|
94
|
+
readonly type: "number";
|
|
95
|
+
readonly description: "Value-axis range.";
|
|
96
|
+
};
|
|
97
|
+
readonly yAxisRangeMax: {
|
|
98
|
+
readonly type: "number";
|
|
99
|
+
};
|
|
100
|
+
readonly reverseXAxis: {
|
|
101
|
+
readonly type: "boolean";
|
|
102
|
+
readonly description: "Reverse the category order.";
|
|
103
|
+
};
|
|
104
|
+
readonly xAxisMaxItems: {
|
|
105
|
+
readonly type: "number";
|
|
106
|
+
readonly description: "Cap on rendered categories.";
|
|
107
|
+
};
|
|
108
|
+
readonly showLegend: {
|
|
109
|
+
readonly type: "boolean";
|
|
110
|
+
};
|
|
111
|
+
readonly maxLegendItems: {
|
|
112
|
+
readonly type: "number";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
readonly title: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
};
|
|
119
|
+
readonly description: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
};
|
|
122
|
+
readonly rows: {
|
|
123
|
+
readonly type: "array";
|
|
124
|
+
readonly items: {
|
|
125
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
126
|
+
};
|
|
127
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
128
|
+
};
|
|
129
|
+
readonly loading: {
|
|
130
|
+
readonly type: "boolean";
|
|
131
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
132
|
+
};
|
|
133
|
+
readonly error: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly required: readonly ["chart", "measure", "xAxis"];
|
|
139
|
+
};
|
|
140
|
+
readonly BarGroupedSpec: {
|
|
141
|
+
readonly type: "object";
|
|
142
|
+
readonly additionalProperties: false;
|
|
143
|
+
readonly properties: {
|
|
144
|
+
readonly chart: {
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
readonly enum: readonly ["barGrouped", "barGroupedHorizontal", "barStacked", "barStackedHorizontal"];
|
|
147
|
+
};
|
|
148
|
+
readonly xAxis: {
|
|
149
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
150
|
+
readonly description: "Category axis dimension (renders on y for horizontal variants).";
|
|
151
|
+
};
|
|
152
|
+
readonly groupBy: {
|
|
153
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
154
|
+
readonly description: "Dimension that splits each category into grouped/stacked bars.";
|
|
155
|
+
};
|
|
156
|
+
readonly measure: {
|
|
157
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
158
|
+
};
|
|
159
|
+
readonly granularity: {
|
|
160
|
+
readonly $ref: "#/$defs/Granularity";
|
|
161
|
+
readonly description: "When `xAxis` is a time field: its bucket size.";
|
|
162
|
+
};
|
|
163
|
+
readonly options: {
|
|
164
|
+
readonly type: "object";
|
|
165
|
+
readonly additionalProperties: false;
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly showTotalLabels: {
|
|
168
|
+
readonly type: "boolean";
|
|
169
|
+
};
|
|
170
|
+
readonly showTooltips: {
|
|
171
|
+
readonly type: "boolean";
|
|
172
|
+
};
|
|
173
|
+
readonly showValueLabels: {
|
|
174
|
+
readonly type: "boolean";
|
|
175
|
+
};
|
|
176
|
+
readonly showLogarithmicScale: {
|
|
177
|
+
readonly type: "boolean";
|
|
178
|
+
};
|
|
179
|
+
readonly xAxisLabel: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
182
|
+
};
|
|
183
|
+
readonly yAxisLabel: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
readonly description: "Value-axis label.";
|
|
186
|
+
};
|
|
187
|
+
readonly yAxisRangeMin: {
|
|
188
|
+
readonly type: "number";
|
|
189
|
+
readonly description: "Value-axis range.";
|
|
190
|
+
};
|
|
191
|
+
readonly yAxisRangeMax: {
|
|
192
|
+
readonly type: "number";
|
|
193
|
+
};
|
|
194
|
+
readonly reverseXAxis: {
|
|
195
|
+
readonly type: "boolean";
|
|
196
|
+
readonly description: "Reverse the category order.";
|
|
197
|
+
};
|
|
198
|
+
readonly xAxisMaxItems: {
|
|
199
|
+
readonly type: "number";
|
|
200
|
+
readonly description: "Cap on rendered categories.";
|
|
201
|
+
};
|
|
202
|
+
readonly showLegend: {
|
|
203
|
+
readonly type: "boolean";
|
|
204
|
+
};
|
|
205
|
+
readonly maxLegendItems: {
|
|
206
|
+
readonly type: "number";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly title: {
|
|
211
|
+
readonly type: "string";
|
|
212
|
+
};
|
|
213
|
+
readonly description: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
};
|
|
216
|
+
readonly rows: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly items: {
|
|
219
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
220
|
+
};
|
|
221
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
222
|
+
};
|
|
223
|
+
readonly loading: {
|
|
224
|
+
readonly type: "boolean";
|
|
225
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
226
|
+
};
|
|
227
|
+
readonly error: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly required: readonly ["chart", "groupBy", "measure", "xAxis"];
|
|
233
|
+
};
|
|
234
|
+
readonly BarLineSpec: {
|
|
235
|
+
readonly type: "object";
|
|
236
|
+
readonly additionalProperties: false;
|
|
237
|
+
readonly properties: {
|
|
238
|
+
readonly chart: {
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
readonly const: "barLine";
|
|
241
|
+
};
|
|
242
|
+
readonly dimension: {
|
|
243
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
244
|
+
};
|
|
245
|
+
readonly barMeasures: {
|
|
246
|
+
readonly anyOf: readonly [{
|
|
247
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
248
|
+
}, {
|
|
249
|
+
readonly type: "array";
|
|
250
|
+
readonly items: {
|
|
251
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
252
|
+
};
|
|
253
|
+
}];
|
|
254
|
+
readonly description: "Measures drawn as bars (left axis).";
|
|
255
|
+
};
|
|
256
|
+
readonly lineMeasures: {
|
|
257
|
+
readonly anyOf: readonly [{
|
|
258
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
259
|
+
}, {
|
|
260
|
+
readonly type: "array";
|
|
261
|
+
readonly items: {
|
|
262
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
263
|
+
};
|
|
264
|
+
}];
|
|
265
|
+
readonly description: "Measures drawn as lines (right axis).";
|
|
266
|
+
};
|
|
267
|
+
readonly granularity: {
|
|
268
|
+
readonly $ref: "#/$defs/Granularity";
|
|
269
|
+
};
|
|
270
|
+
readonly options: {
|
|
271
|
+
readonly type: "object";
|
|
272
|
+
readonly additionalProperties: false;
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly showValueLabelsLine: {
|
|
275
|
+
readonly type: "boolean";
|
|
276
|
+
};
|
|
277
|
+
readonly yAxisSecondaryLabel: {
|
|
278
|
+
readonly type: "string";
|
|
279
|
+
readonly description: "Right (line) axis.";
|
|
280
|
+
};
|
|
281
|
+
readonly yAxisSecondaryMin: {
|
|
282
|
+
readonly type: "number";
|
|
283
|
+
};
|
|
284
|
+
readonly yAxisSecondaryMax: {
|
|
285
|
+
readonly type: "number";
|
|
286
|
+
};
|
|
287
|
+
readonly showTooltips: {
|
|
288
|
+
readonly type: "boolean";
|
|
289
|
+
};
|
|
290
|
+
readonly showValueLabels: {
|
|
291
|
+
readonly type: "boolean";
|
|
292
|
+
};
|
|
293
|
+
readonly showLogarithmicScale: {
|
|
294
|
+
readonly type: "boolean";
|
|
295
|
+
};
|
|
296
|
+
readonly xAxisLabel: {
|
|
297
|
+
readonly type: "string";
|
|
298
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
299
|
+
};
|
|
300
|
+
readonly yAxisLabel: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
readonly description: "Value-axis label.";
|
|
303
|
+
};
|
|
304
|
+
readonly yAxisRangeMin: {
|
|
305
|
+
readonly type: "number";
|
|
306
|
+
readonly description: "Value-axis range.";
|
|
307
|
+
};
|
|
308
|
+
readonly yAxisRangeMax: {
|
|
309
|
+
readonly type: "number";
|
|
310
|
+
};
|
|
311
|
+
readonly reverseXAxis: {
|
|
312
|
+
readonly type: "boolean";
|
|
313
|
+
readonly description: "Reverse the category order.";
|
|
314
|
+
};
|
|
315
|
+
readonly xAxisMaxItems: {
|
|
316
|
+
readonly type: "number";
|
|
317
|
+
readonly description: "Cap on rendered categories.";
|
|
318
|
+
};
|
|
319
|
+
readonly showLegend: {
|
|
320
|
+
readonly type: "boolean";
|
|
321
|
+
};
|
|
322
|
+
readonly maxLegendItems: {
|
|
323
|
+
readonly type: "number";
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly title: {
|
|
328
|
+
readonly type: "string";
|
|
329
|
+
};
|
|
330
|
+
readonly description: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
};
|
|
333
|
+
readonly rows: {
|
|
334
|
+
readonly type: "array";
|
|
335
|
+
readonly items: {
|
|
336
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
337
|
+
};
|
|
338
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
339
|
+
};
|
|
340
|
+
readonly loading: {
|
|
341
|
+
readonly type: "boolean";
|
|
342
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
343
|
+
};
|
|
344
|
+
readonly error: {
|
|
345
|
+
readonly type: "string";
|
|
346
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly required: readonly ["barMeasures", "chart", "dimension"];
|
|
350
|
+
};
|
|
351
|
+
readonly BarSpec: {
|
|
352
|
+
readonly type: "object";
|
|
353
|
+
readonly additionalProperties: false;
|
|
354
|
+
readonly properties: {
|
|
355
|
+
readonly chart: {
|
|
356
|
+
readonly type: "string";
|
|
357
|
+
readonly enum: readonly ["bar", "barHorizontal"];
|
|
358
|
+
};
|
|
359
|
+
readonly dimension: {
|
|
360
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
361
|
+
readonly description: "Category dimension.";
|
|
362
|
+
};
|
|
363
|
+
readonly measures: {
|
|
364
|
+
readonly anyOf: readonly [{
|
|
365
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
366
|
+
}, {
|
|
367
|
+
readonly type: "array";
|
|
368
|
+
readonly items: {
|
|
369
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
370
|
+
};
|
|
371
|
+
}];
|
|
372
|
+
readonly description: "One measure per bar series.";
|
|
373
|
+
};
|
|
374
|
+
readonly granularity: {
|
|
375
|
+
readonly $ref: "#/$defs/Granularity";
|
|
376
|
+
readonly description: "When `dimension` is a time field: its bucket size.";
|
|
377
|
+
};
|
|
378
|
+
readonly options: {
|
|
379
|
+
readonly type: "object";
|
|
380
|
+
readonly additionalProperties: false;
|
|
381
|
+
readonly properties: {
|
|
382
|
+
readonly showTooltips: {
|
|
383
|
+
readonly type: "boolean";
|
|
384
|
+
};
|
|
385
|
+
readonly showValueLabels: {
|
|
386
|
+
readonly type: "boolean";
|
|
387
|
+
};
|
|
388
|
+
readonly showLogarithmicScale: {
|
|
389
|
+
readonly type: "boolean";
|
|
390
|
+
};
|
|
391
|
+
readonly xAxisLabel: {
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
394
|
+
};
|
|
395
|
+
readonly yAxisLabel: {
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
readonly description: "Value-axis label.";
|
|
398
|
+
};
|
|
399
|
+
readonly yAxisRangeMin: {
|
|
400
|
+
readonly type: "number";
|
|
401
|
+
readonly description: "Value-axis range.";
|
|
402
|
+
};
|
|
403
|
+
readonly yAxisRangeMax: {
|
|
404
|
+
readonly type: "number";
|
|
405
|
+
};
|
|
406
|
+
readonly reverseXAxis: {
|
|
407
|
+
readonly type: "boolean";
|
|
408
|
+
readonly description: "Reverse the category order.";
|
|
409
|
+
};
|
|
410
|
+
readonly xAxisMaxItems: {
|
|
411
|
+
readonly type: "number";
|
|
412
|
+
readonly description: "Cap on rendered categories.";
|
|
413
|
+
};
|
|
414
|
+
readonly showLegend: {
|
|
415
|
+
readonly type: "boolean";
|
|
416
|
+
};
|
|
417
|
+
readonly maxLegendItems: {
|
|
418
|
+
readonly type: "number";
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
readonly title: {
|
|
423
|
+
readonly type: "string";
|
|
424
|
+
};
|
|
425
|
+
readonly description: {
|
|
426
|
+
readonly type: "string";
|
|
427
|
+
};
|
|
428
|
+
readonly rows: {
|
|
429
|
+
readonly type: "array";
|
|
430
|
+
readonly items: {
|
|
431
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
432
|
+
};
|
|
433
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
434
|
+
};
|
|
435
|
+
readonly loading: {
|
|
436
|
+
readonly type: "boolean";
|
|
437
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
438
|
+
};
|
|
439
|
+
readonly error: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
readonly required: readonly ["chart", "dimension", "measures"];
|
|
445
|
+
};
|
|
446
|
+
readonly BubbleSpec: {
|
|
447
|
+
readonly type: "object";
|
|
448
|
+
readonly additionalProperties: false;
|
|
449
|
+
readonly properties: {
|
|
450
|
+
readonly chart: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
readonly const: "bubble";
|
|
453
|
+
};
|
|
454
|
+
readonly xMeasure: {
|
|
455
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
456
|
+
};
|
|
457
|
+
readonly yMeasure: {
|
|
458
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
459
|
+
};
|
|
460
|
+
readonly bubbleSizeMeasure: {
|
|
461
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
462
|
+
};
|
|
463
|
+
readonly pointDimension: {
|
|
464
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
465
|
+
};
|
|
466
|
+
readonly groupByDimension: {
|
|
467
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
468
|
+
};
|
|
469
|
+
readonly options: {
|
|
470
|
+
readonly type: "object";
|
|
471
|
+
readonly additionalProperties: false;
|
|
472
|
+
readonly properties: {
|
|
473
|
+
readonly bubbleRadiusMin: {
|
|
474
|
+
readonly type: "number";
|
|
475
|
+
};
|
|
476
|
+
readonly bubbleRadiusMax: {
|
|
477
|
+
readonly type: "number";
|
|
478
|
+
};
|
|
479
|
+
readonly showTooltips: {
|
|
480
|
+
readonly type: "boolean";
|
|
481
|
+
};
|
|
482
|
+
readonly showPointLabels: {
|
|
483
|
+
readonly type: "boolean";
|
|
484
|
+
readonly description: "Label each point with its dimension value.";
|
|
485
|
+
};
|
|
486
|
+
readonly showValueLabels: {
|
|
487
|
+
readonly type: "boolean";
|
|
488
|
+
};
|
|
489
|
+
readonly showLogarithmicScale: {
|
|
490
|
+
readonly type: "boolean";
|
|
491
|
+
};
|
|
492
|
+
readonly xAxisLabel: {
|
|
493
|
+
readonly type: "string";
|
|
494
|
+
};
|
|
495
|
+
readonly yAxisLabel: {
|
|
496
|
+
readonly type: "string";
|
|
497
|
+
};
|
|
498
|
+
readonly xAxisRangeMin: {
|
|
499
|
+
readonly type: "number";
|
|
500
|
+
};
|
|
501
|
+
readonly xAxisRangeMax: {
|
|
502
|
+
readonly type: "number";
|
|
503
|
+
};
|
|
504
|
+
readonly yAxisRangeMin: {
|
|
505
|
+
readonly type: "number";
|
|
506
|
+
};
|
|
507
|
+
readonly yAxisRangeMax: {
|
|
508
|
+
readonly type: "number";
|
|
509
|
+
};
|
|
510
|
+
readonly reverseXAxis: {
|
|
511
|
+
readonly type: "boolean";
|
|
512
|
+
};
|
|
513
|
+
readonly pointColor: {
|
|
514
|
+
readonly type: "string";
|
|
515
|
+
readonly description: "CSS color for ungrouped points.";
|
|
516
|
+
};
|
|
517
|
+
readonly showLegend: {
|
|
518
|
+
readonly type: "boolean";
|
|
519
|
+
};
|
|
520
|
+
readonly maxLegendItems: {
|
|
521
|
+
readonly type: "number";
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
readonly title: {
|
|
526
|
+
readonly type: "string";
|
|
527
|
+
};
|
|
528
|
+
readonly description: {
|
|
529
|
+
readonly type: "string";
|
|
530
|
+
};
|
|
531
|
+
readonly rows: {
|
|
532
|
+
readonly type: "array";
|
|
533
|
+
readonly items: {
|
|
534
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
535
|
+
};
|
|
536
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
537
|
+
};
|
|
538
|
+
readonly loading: {
|
|
539
|
+
readonly type: "boolean";
|
|
540
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
541
|
+
};
|
|
542
|
+
readonly error: {
|
|
543
|
+
readonly type: "string";
|
|
544
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
readonly required: readonly ["bubbleSizeMeasure", "chart", "pointDimension", "xMeasure", "yMeasure"];
|
|
548
|
+
};
|
|
549
|
+
readonly DateRangeSpec: {
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly properties: {
|
|
552
|
+
readonly from: {
|
|
553
|
+
readonly type: "string";
|
|
554
|
+
};
|
|
555
|
+
readonly to: {
|
|
556
|
+
readonly type: "string";
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
readonly additionalProperties: false;
|
|
560
|
+
readonly description: "ISO date strings (`YYYY-MM-DD` or full timestamps), no zone suffix.";
|
|
561
|
+
};
|
|
562
|
+
readonly DonutLabelSpec: {
|
|
563
|
+
readonly type: "object";
|
|
564
|
+
readonly additionalProperties: false;
|
|
565
|
+
readonly properties: {
|
|
566
|
+
readonly chart: {
|
|
567
|
+
readonly type: "string";
|
|
568
|
+
readonly const: "donutLabel";
|
|
569
|
+
};
|
|
570
|
+
readonly dimension: {
|
|
571
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
572
|
+
};
|
|
573
|
+
readonly measure: {
|
|
574
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
575
|
+
};
|
|
576
|
+
readonly innerLabel: {
|
|
577
|
+
readonly type: "object";
|
|
578
|
+
readonly properties: {
|
|
579
|
+
readonly text: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
};
|
|
582
|
+
readonly measure: {
|
|
583
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
584
|
+
};
|
|
585
|
+
readonly value: {
|
|
586
|
+
readonly type: readonly ["number", "string"];
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
readonly additionalProperties: false;
|
|
590
|
+
readonly description: "The headline number in the donut's center. Omitted fields are derived: `measure` defaults to the main measure, `value` to the sum of the rows.";
|
|
591
|
+
};
|
|
592
|
+
readonly options: {
|
|
593
|
+
readonly type: "object";
|
|
594
|
+
readonly additionalProperties: false;
|
|
595
|
+
readonly properties: {
|
|
596
|
+
readonly showTooltips: {
|
|
597
|
+
readonly type: "boolean";
|
|
598
|
+
};
|
|
599
|
+
readonly showValueLabels: {
|
|
600
|
+
readonly type: "boolean";
|
|
601
|
+
};
|
|
602
|
+
readonly showValueLabelsAsPercentage: {
|
|
603
|
+
readonly type: "boolean";
|
|
604
|
+
};
|
|
605
|
+
readonly showLegend: {
|
|
606
|
+
readonly type: "boolean";
|
|
607
|
+
};
|
|
608
|
+
readonly maxLegendItems: {
|
|
609
|
+
readonly type: "number";
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
readonly title: {
|
|
614
|
+
readonly type: "string";
|
|
615
|
+
};
|
|
616
|
+
readonly description: {
|
|
617
|
+
readonly type: "string";
|
|
618
|
+
};
|
|
619
|
+
readonly rows: {
|
|
620
|
+
readonly type: "array";
|
|
621
|
+
readonly items: {
|
|
622
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
623
|
+
};
|
|
624
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
625
|
+
};
|
|
626
|
+
readonly loading: {
|
|
627
|
+
readonly type: "boolean";
|
|
628
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
629
|
+
};
|
|
630
|
+
readonly error: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
readonly required: readonly ["chart", "dimension", "measure"];
|
|
636
|
+
};
|
|
637
|
+
readonly FieldRef: {
|
|
638
|
+
readonly anyOf: readonly [{
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
}, {
|
|
641
|
+
readonly $ref: "#/$defs/SpecField";
|
|
642
|
+
}];
|
|
643
|
+
readonly description: "A field is a bare row-key string or a full descriptor.";
|
|
644
|
+
};
|
|
645
|
+
readonly Granularity: {
|
|
646
|
+
readonly type: "string";
|
|
647
|
+
readonly enum: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
|
|
648
|
+
};
|
|
649
|
+
readonly HeatMapSpec: {
|
|
650
|
+
readonly type: "object";
|
|
651
|
+
readonly additionalProperties: false;
|
|
652
|
+
readonly properties: {
|
|
653
|
+
readonly chart: {
|
|
654
|
+
readonly type: "string";
|
|
655
|
+
readonly const: "heatmap";
|
|
656
|
+
};
|
|
657
|
+
readonly rowDimension: {
|
|
658
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
659
|
+
};
|
|
660
|
+
readonly columnDimension: {
|
|
661
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
662
|
+
};
|
|
663
|
+
readonly measure: {
|
|
664
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
665
|
+
};
|
|
666
|
+
readonly options: {
|
|
667
|
+
readonly type: "object";
|
|
668
|
+
readonly properties: {
|
|
669
|
+
readonly showValues: {
|
|
670
|
+
readonly type: "boolean";
|
|
671
|
+
readonly description: "Print the measure value in each cell.";
|
|
672
|
+
};
|
|
673
|
+
readonly minColor: {
|
|
674
|
+
readonly type: "string";
|
|
675
|
+
readonly description: "CSS colors for the value scale.";
|
|
676
|
+
};
|
|
677
|
+
readonly midColor: {
|
|
678
|
+
readonly type: "string";
|
|
679
|
+
};
|
|
680
|
+
readonly maxColor: {
|
|
681
|
+
readonly type: "string";
|
|
682
|
+
};
|
|
683
|
+
readonly minThreshold: {
|
|
684
|
+
readonly type: "string";
|
|
685
|
+
readonly description: "Values at/below this render as minColor.";
|
|
686
|
+
};
|
|
687
|
+
readonly maxThreshold: {
|
|
688
|
+
readonly type: "string";
|
|
689
|
+
readonly description: "Values at/above this render as maxColor.";
|
|
690
|
+
};
|
|
691
|
+
readonly displayNullAs: {
|
|
692
|
+
readonly type: "string";
|
|
693
|
+
};
|
|
694
|
+
readonly columnWidth: {
|
|
695
|
+
readonly type: "number";
|
|
696
|
+
};
|
|
697
|
+
readonly firstColumnWidth: {
|
|
698
|
+
readonly type: "number";
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
readonly additionalProperties: false;
|
|
702
|
+
};
|
|
703
|
+
readonly title: {
|
|
704
|
+
readonly type: "string";
|
|
705
|
+
};
|
|
706
|
+
readonly description: {
|
|
707
|
+
readonly type: "string";
|
|
708
|
+
};
|
|
709
|
+
readonly rows: {
|
|
710
|
+
readonly type: "array";
|
|
711
|
+
readonly items: {
|
|
712
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
713
|
+
};
|
|
714
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
715
|
+
};
|
|
716
|
+
readonly loading: {
|
|
717
|
+
readonly type: "boolean";
|
|
718
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
719
|
+
};
|
|
720
|
+
readonly error: {
|
|
721
|
+
readonly type: "string";
|
|
722
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
readonly required: readonly ["chart", "columnDimension", "measure", "rowDimension"];
|
|
726
|
+
};
|
|
727
|
+
readonly KpiComparisonSpec: {
|
|
728
|
+
readonly type: "object";
|
|
729
|
+
readonly additionalProperties: false;
|
|
730
|
+
readonly properties: {
|
|
731
|
+
readonly chart: {
|
|
732
|
+
readonly type: "string";
|
|
733
|
+
readonly const: "kpiComparison";
|
|
734
|
+
};
|
|
735
|
+
readonly measure: {
|
|
736
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
737
|
+
};
|
|
738
|
+
readonly value: {
|
|
739
|
+
readonly type: readonly ["number", "string"];
|
|
740
|
+
readonly description: "Shortcut for `rows`; see KpiSpec.value.";
|
|
741
|
+
};
|
|
742
|
+
readonly comparisonValue: {
|
|
743
|
+
readonly type: readonly ["number", "string"];
|
|
744
|
+
readonly description: "The value compared against. Shortcut for `comparisonRows`.";
|
|
745
|
+
};
|
|
746
|
+
readonly comparisonRows: {
|
|
747
|
+
readonly type: "array";
|
|
748
|
+
readonly items: {
|
|
749
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
750
|
+
};
|
|
751
|
+
readonly description: "Rows for the comparison period, same shape as `rows`.";
|
|
752
|
+
};
|
|
753
|
+
readonly comparisonLabel: {
|
|
754
|
+
readonly type: "string";
|
|
755
|
+
readonly description: "Label for the comparison, e.g. 'Previous period'.";
|
|
756
|
+
};
|
|
757
|
+
readonly dateRange: {
|
|
758
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
759
|
+
readonly description: "Period the main value covers.";
|
|
760
|
+
};
|
|
761
|
+
readonly comparisonDateRange: {
|
|
762
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
763
|
+
readonly description: "Period the comparison value covers.";
|
|
764
|
+
};
|
|
765
|
+
readonly options: {
|
|
766
|
+
readonly type: "object";
|
|
767
|
+
readonly properties: {
|
|
768
|
+
readonly fontSize: {
|
|
769
|
+
readonly type: "number";
|
|
770
|
+
};
|
|
771
|
+
readonly changeFontSize: {
|
|
772
|
+
readonly type: "number";
|
|
773
|
+
};
|
|
774
|
+
readonly displayChangeAsPercentage: {
|
|
775
|
+
readonly type: "boolean";
|
|
776
|
+
};
|
|
777
|
+
readonly reversePositiveNegativeColors: {
|
|
778
|
+
readonly type: "boolean";
|
|
779
|
+
readonly description: "When a decrease is good (costs, churn).";
|
|
780
|
+
};
|
|
781
|
+
readonly percentageDecimalPlaces: {
|
|
782
|
+
readonly type: "number";
|
|
783
|
+
};
|
|
784
|
+
readonly displayNullAs: {
|
|
785
|
+
readonly type: "string";
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
readonly additionalProperties: false;
|
|
789
|
+
};
|
|
790
|
+
readonly title: {
|
|
791
|
+
readonly type: "string";
|
|
792
|
+
};
|
|
793
|
+
readonly description: {
|
|
794
|
+
readonly type: "string";
|
|
795
|
+
};
|
|
796
|
+
readonly rows: {
|
|
797
|
+
readonly type: "array";
|
|
798
|
+
readonly items: {
|
|
799
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
800
|
+
};
|
|
801
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
802
|
+
};
|
|
803
|
+
readonly loading: {
|
|
804
|
+
readonly type: "boolean";
|
|
805
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
806
|
+
};
|
|
807
|
+
readonly error: {
|
|
808
|
+
readonly type: "string";
|
|
809
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
readonly required: readonly ["chart", "measure"];
|
|
813
|
+
};
|
|
814
|
+
readonly KpiSpec: {
|
|
815
|
+
readonly type: "object";
|
|
816
|
+
readonly additionalProperties: false;
|
|
817
|
+
readonly properties: {
|
|
818
|
+
readonly chart: {
|
|
819
|
+
readonly type: "string";
|
|
820
|
+
readonly const: "kpi";
|
|
821
|
+
};
|
|
822
|
+
readonly measure: {
|
|
823
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
824
|
+
};
|
|
825
|
+
readonly value: {
|
|
826
|
+
readonly type: readonly ["number", "string"];
|
|
827
|
+
readonly description: "Shortcut for `rows: [{ [measure.name]: value }]`. Ignored when `rows` is set.";
|
|
828
|
+
};
|
|
829
|
+
readonly options: {
|
|
830
|
+
readonly type: "object";
|
|
831
|
+
readonly properties: {
|
|
832
|
+
readonly fontSize: {
|
|
833
|
+
readonly type: "number";
|
|
834
|
+
};
|
|
835
|
+
readonly displayNullAs: {
|
|
836
|
+
readonly type: "string";
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
readonly additionalProperties: false;
|
|
840
|
+
};
|
|
841
|
+
readonly title: {
|
|
842
|
+
readonly type: "string";
|
|
843
|
+
};
|
|
844
|
+
readonly description: {
|
|
845
|
+
readonly type: "string";
|
|
846
|
+
};
|
|
847
|
+
readonly rows: {
|
|
848
|
+
readonly type: "array";
|
|
849
|
+
readonly items: {
|
|
850
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
851
|
+
};
|
|
852
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
853
|
+
};
|
|
854
|
+
readonly loading: {
|
|
855
|
+
readonly type: "boolean";
|
|
856
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
857
|
+
};
|
|
858
|
+
readonly error: {
|
|
859
|
+
readonly type: "string";
|
|
860
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
readonly required: readonly ["chart", "measure"];
|
|
864
|
+
};
|
|
865
|
+
readonly LineComparisonSpec: {
|
|
866
|
+
readonly type: "object";
|
|
867
|
+
readonly additionalProperties: false;
|
|
868
|
+
readonly properties: {
|
|
869
|
+
readonly chart: {
|
|
870
|
+
readonly type: "string";
|
|
871
|
+
readonly const: "lineComparison";
|
|
872
|
+
};
|
|
873
|
+
readonly xAxis: {
|
|
874
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
875
|
+
};
|
|
876
|
+
readonly measures: {
|
|
877
|
+
readonly anyOf: readonly [{
|
|
878
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
879
|
+
}, {
|
|
880
|
+
readonly type: "array";
|
|
881
|
+
readonly items: {
|
|
882
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
883
|
+
};
|
|
884
|
+
}];
|
|
885
|
+
};
|
|
886
|
+
readonly comparisonRows: {
|
|
887
|
+
readonly type: "array";
|
|
888
|
+
readonly items: {
|
|
889
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
890
|
+
};
|
|
891
|
+
readonly description: "Rows for the comparison period, same shape as `rows`; aligned by position.";
|
|
892
|
+
};
|
|
893
|
+
readonly comparisonLabel: {
|
|
894
|
+
readonly type: "string";
|
|
895
|
+
readonly description: "Label for the comparison, e.g. 'Previous period'.";
|
|
896
|
+
};
|
|
897
|
+
readonly dateRange: {
|
|
898
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
899
|
+
readonly description: "Periods covered; derived from each row set's time extent when omitted.";
|
|
900
|
+
};
|
|
901
|
+
readonly comparisonDateRange: {
|
|
902
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
903
|
+
};
|
|
904
|
+
readonly granularity: {
|
|
905
|
+
readonly $ref: "#/$defs/Granularity";
|
|
906
|
+
};
|
|
907
|
+
readonly options: {
|
|
908
|
+
readonly type: "object";
|
|
909
|
+
readonly additionalProperties: false;
|
|
910
|
+
readonly properties: {
|
|
911
|
+
readonly showComparisonAxis: {
|
|
912
|
+
readonly type: "boolean";
|
|
913
|
+
readonly description: "Second x-axis showing the comparison period's dates.";
|
|
914
|
+
};
|
|
915
|
+
readonly showTooltips: {
|
|
916
|
+
readonly type: "boolean";
|
|
917
|
+
};
|
|
918
|
+
readonly showValueLabels: {
|
|
919
|
+
readonly type: "boolean";
|
|
920
|
+
};
|
|
921
|
+
readonly showLogarithmicScale: {
|
|
922
|
+
readonly type: "boolean";
|
|
923
|
+
};
|
|
924
|
+
readonly xAxisLabel: {
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
927
|
+
};
|
|
928
|
+
readonly yAxisLabel: {
|
|
929
|
+
readonly type: "string";
|
|
930
|
+
readonly description: "Value-axis label.";
|
|
931
|
+
};
|
|
932
|
+
readonly yAxisRangeMin: {
|
|
933
|
+
readonly type: "number";
|
|
934
|
+
readonly description: "Value-axis range.";
|
|
935
|
+
};
|
|
936
|
+
readonly yAxisRangeMax: {
|
|
937
|
+
readonly type: "number";
|
|
938
|
+
};
|
|
939
|
+
readonly reverseXAxis: {
|
|
940
|
+
readonly type: "boolean";
|
|
941
|
+
readonly description: "Reverse the category order.";
|
|
942
|
+
};
|
|
943
|
+
readonly xAxisMaxItems: {
|
|
944
|
+
readonly type: "number";
|
|
945
|
+
readonly description: "Cap on rendered categories.";
|
|
946
|
+
};
|
|
947
|
+
readonly showLegend: {
|
|
948
|
+
readonly type: "boolean";
|
|
949
|
+
};
|
|
950
|
+
readonly maxLegendItems: {
|
|
951
|
+
readonly type: "number";
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
readonly title: {
|
|
956
|
+
readonly type: "string";
|
|
957
|
+
};
|
|
958
|
+
readonly description: {
|
|
959
|
+
readonly type: "string";
|
|
960
|
+
};
|
|
961
|
+
readonly rows: {
|
|
962
|
+
readonly type: "array";
|
|
963
|
+
readonly items: {
|
|
964
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
965
|
+
};
|
|
966
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
967
|
+
};
|
|
968
|
+
readonly loading: {
|
|
969
|
+
readonly type: "boolean";
|
|
970
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
971
|
+
};
|
|
972
|
+
readonly error: {
|
|
973
|
+
readonly type: "string";
|
|
974
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
readonly required: readonly ["chart", "measures", "xAxis"];
|
|
978
|
+
};
|
|
979
|
+
readonly LineComparisonWithKpiTabsSpec: {
|
|
980
|
+
readonly type: "object";
|
|
981
|
+
readonly additionalProperties: false;
|
|
982
|
+
readonly properties: {
|
|
983
|
+
readonly chart: {
|
|
984
|
+
readonly type: "string";
|
|
985
|
+
readonly const: "lineComparisonWithKpiTabs";
|
|
986
|
+
};
|
|
987
|
+
readonly xAxis: {
|
|
988
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
989
|
+
};
|
|
990
|
+
readonly measures: {
|
|
991
|
+
readonly anyOf: readonly [{
|
|
992
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
993
|
+
}, {
|
|
994
|
+
readonly type: "array";
|
|
995
|
+
readonly items: {
|
|
996
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
997
|
+
};
|
|
998
|
+
}];
|
|
999
|
+
};
|
|
1000
|
+
readonly comparisonRows: {
|
|
1001
|
+
readonly type: "array";
|
|
1002
|
+
readonly items: {
|
|
1003
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
readonly kpiRows: {
|
|
1007
|
+
readonly type: "array";
|
|
1008
|
+
readonly items: {
|
|
1009
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1010
|
+
};
|
|
1011
|
+
readonly description: "See LineWithKpiTabsSpec.kpiRows; derived from `rows` when omitted.";
|
|
1012
|
+
};
|
|
1013
|
+
readonly kpiComparisonRows: {
|
|
1014
|
+
readonly type: "array";
|
|
1015
|
+
readonly items: {
|
|
1016
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1017
|
+
};
|
|
1018
|
+
readonly description: "Headline numbers for the comparison period; derived from `comparisonRows`.";
|
|
1019
|
+
};
|
|
1020
|
+
readonly comparisonLabel: {
|
|
1021
|
+
readonly type: "string";
|
|
1022
|
+
};
|
|
1023
|
+
readonly dateRange: {
|
|
1024
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
1025
|
+
};
|
|
1026
|
+
readonly comparisonDateRange: {
|
|
1027
|
+
readonly $ref: "#/$defs/DateRangeSpec";
|
|
1028
|
+
};
|
|
1029
|
+
readonly granularity: {
|
|
1030
|
+
readonly $ref: "#/$defs/Granularity";
|
|
1031
|
+
};
|
|
1032
|
+
readonly options: {
|
|
1033
|
+
readonly type: "object";
|
|
1034
|
+
readonly additionalProperties: false;
|
|
1035
|
+
readonly properties: {
|
|
1036
|
+
readonly showComparisonAxis: {
|
|
1037
|
+
readonly type: "boolean";
|
|
1038
|
+
};
|
|
1039
|
+
readonly showTooltips: {
|
|
1040
|
+
readonly type: "boolean";
|
|
1041
|
+
};
|
|
1042
|
+
readonly showValueLabels: {
|
|
1043
|
+
readonly type: "boolean";
|
|
1044
|
+
};
|
|
1045
|
+
readonly showLogarithmicScale: {
|
|
1046
|
+
readonly type: "boolean";
|
|
1047
|
+
};
|
|
1048
|
+
readonly xAxisLabel: {
|
|
1049
|
+
readonly type: "string";
|
|
1050
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
1051
|
+
};
|
|
1052
|
+
readonly yAxisLabel: {
|
|
1053
|
+
readonly type: "string";
|
|
1054
|
+
readonly description: "Value-axis label.";
|
|
1055
|
+
};
|
|
1056
|
+
readonly yAxisRangeMin: {
|
|
1057
|
+
readonly type: "number";
|
|
1058
|
+
readonly description: "Value-axis range.";
|
|
1059
|
+
};
|
|
1060
|
+
readonly yAxisRangeMax: {
|
|
1061
|
+
readonly type: "number";
|
|
1062
|
+
};
|
|
1063
|
+
readonly reverseXAxis: {
|
|
1064
|
+
readonly type: "boolean";
|
|
1065
|
+
readonly description: "Reverse the category order.";
|
|
1066
|
+
};
|
|
1067
|
+
readonly xAxisMaxItems: {
|
|
1068
|
+
readonly type: "number";
|
|
1069
|
+
readonly description: "Cap on rendered categories.";
|
|
1070
|
+
};
|
|
1071
|
+
readonly showLegend: {
|
|
1072
|
+
readonly type: "boolean";
|
|
1073
|
+
};
|
|
1074
|
+
readonly maxLegendItems: {
|
|
1075
|
+
readonly type: "number";
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
readonly title: {
|
|
1080
|
+
readonly type: "string";
|
|
1081
|
+
};
|
|
1082
|
+
readonly description: {
|
|
1083
|
+
readonly type: "string";
|
|
1084
|
+
};
|
|
1085
|
+
readonly rows: {
|
|
1086
|
+
readonly type: "array";
|
|
1087
|
+
readonly items: {
|
|
1088
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1089
|
+
};
|
|
1090
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1091
|
+
};
|
|
1092
|
+
readonly loading: {
|
|
1093
|
+
readonly type: "boolean";
|
|
1094
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1095
|
+
};
|
|
1096
|
+
readonly error: {
|
|
1097
|
+
readonly type: "string";
|
|
1098
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
readonly required: readonly ["chart", "measures", "xAxis"];
|
|
1102
|
+
};
|
|
1103
|
+
readonly LineGroupedSpec: {
|
|
1104
|
+
readonly type: "object";
|
|
1105
|
+
readonly additionalProperties: false;
|
|
1106
|
+
readonly properties: {
|
|
1107
|
+
readonly chart: {
|
|
1108
|
+
readonly type: "string";
|
|
1109
|
+
readonly const: "lineGrouped";
|
|
1110
|
+
};
|
|
1111
|
+
readonly xAxis: {
|
|
1112
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1113
|
+
};
|
|
1114
|
+
readonly groupBy: {
|
|
1115
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1116
|
+
readonly description: "Dimension that splits the measure into one line per value.";
|
|
1117
|
+
};
|
|
1118
|
+
readonly measure: {
|
|
1119
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1120
|
+
};
|
|
1121
|
+
readonly granularity: {
|
|
1122
|
+
readonly $ref: "#/$defs/Granularity";
|
|
1123
|
+
};
|
|
1124
|
+
readonly options: {
|
|
1125
|
+
readonly type: "object";
|
|
1126
|
+
readonly additionalProperties: false;
|
|
1127
|
+
readonly properties: {
|
|
1128
|
+
readonly showTooltips: {
|
|
1129
|
+
readonly type: "boolean";
|
|
1130
|
+
};
|
|
1131
|
+
readonly showValueLabels: {
|
|
1132
|
+
readonly type: "boolean";
|
|
1133
|
+
};
|
|
1134
|
+
readonly showLogarithmicScale: {
|
|
1135
|
+
readonly type: "boolean";
|
|
1136
|
+
};
|
|
1137
|
+
readonly xAxisLabel: {
|
|
1138
|
+
readonly type: "string";
|
|
1139
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
1140
|
+
};
|
|
1141
|
+
readonly yAxisLabel: {
|
|
1142
|
+
readonly type: "string";
|
|
1143
|
+
readonly description: "Value-axis label.";
|
|
1144
|
+
};
|
|
1145
|
+
readonly yAxisRangeMin: {
|
|
1146
|
+
readonly type: "number";
|
|
1147
|
+
readonly description: "Value-axis range.";
|
|
1148
|
+
};
|
|
1149
|
+
readonly yAxisRangeMax: {
|
|
1150
|
+
readonly type: "number";
|
|
1151
|
+
};
|
|
1152
|
+
readonly reverseXAxis: {
|
|
1153
|
+
readonly type: "boolean";
|
|
1154
|
+
readonly description: "Reverse the category order.";
|
|
1155
|
+
};
|
|
1156
|
+
readonly xAxisMaxItems: {
|
|
1157
|
+
readonly type: "number";
|
|
1158
|
+
readonly description: "Cap on rendered categories.";
|
|
1159
|
+
};
|
|
1160
|
+
readonly showLegend: {
|
|
1161
|
+
readonly type: "boolean";
|
|
1162
|
+
};
|
|
1163
|
+
readonly maxLegendItems: {
|
|
1164
|
+
readonly type: "number";
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
readonly title: {
|
|
1169
|
+
readonly type: "string";
|
|
1170
|
+
};
|
|
1171
|
+
readonly description: {
|
|
1172
|
+
readonly type: "string";
|
|
1173
|
+
};
|
|
1174
|
+
readonly rows: {
|
|
1175
|
+
readonly type: "array";
|
|
1176
|
+
readonly items: {
|
|
1177
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1178
|
+
};
|
|
1179
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1180
|
+
};
|
|
1181
|
+
readonly loading: {
|
|
1182
|
+
readonly type: "boolean";
|
|
1183
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1184
|
+
};
|
|
1185
|
+
readonly error: {
|
|
1186
|
+
readonly type: "string";
|
|
1187
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
readonly required: readonly ["chart", "groupBy", "measure", "xAxis"];
|
|
1191
|
+
};
|
|
1192
|
+
readonly LineSpec: {
|
|
1193
|
+
readonly type: "object";
|
|
1194
|
+
readonly additionalProperties: false;
|
|
1195
|
+
readonly properties: {
|
|
1196
|
+
readonly chart: {
|
|
1197
|
+
readonly type: "string";
|
|
1198
|
+
readonly const: "line";
|
|
1199
|
+
};
|
|
1200
|
+
readonly xAxis: {
|
|
1201
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1202
|
+
};
|
|
1203
|
+
readonly measures: {
|
|
1204
|
+
readonly anyOf: readonly [{
|
|
1205
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1206
|
+
}, {
|
|
1207
|
+
readonly type: "array";
|
|
1208
|
+
readonly items: {
|
|
1209
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1210
|
+
};
|
|
1211
|
+
}];
|
|
1212
|
+
readonly description: "One measure per line.";
|
|
1213
|
+
};
|
|
1214
|
+
readonly granularity: {
|
|
1215
|
+
readonly $ref: "#/$defs/Granularity";
|
|
1216
|
+
readonly description: "When `xAxis` is a time field: its bucket size.";
|
|
1217
|
+
};
|
|
1218
|
+
readonly options: {
|
|
1219
|
+
readonly type: "object";
|
|
1220
|
+
readonly additionalProperties: false;
|
|
1221
|
+
readonly properties: {
|
|
1222
|
+
readonly showTooltips: {
|
|
1223
|
+
readonly type: "boolean";
|
|
1224
|
+
};
|
|
1225
|
+
readonly showValueLabels: {
|
|
1226
|
+
readonly type: "boolean";
|
|
1227
|
+
};
|
|
1228
|
+
readonly showLogarithmicScale: {
|
|
1229
|
+
readonly type: "boolean";
|
|
1230
|
+
};
|
|
1231
|
+
readonly xAxisLabel: {
|
|
1232
|
+
readonly type: "string";
|
|
1233
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
1234
|
+
};
|
|
1235
|
+
readonly yAxisLabel: {
|
|
1236
|
+
readonly type: "string";
|
|
1237
|
+
readonly description: "Value-axis label.";
|
|
1238
|
+
};
|
|
1239
|
+
readonly yAxisRangeMin: {
|
|
1240
|
+
readonly type: "number";
|
|
1241
|
+
readonly description: "Value-axis range.";
|
|
1242
|
+
};
|
|
1243
|
+
readonly yAxisRangeMax: {
|
|
1244
|
+
readonly type: "number";
|
|
1245
|
+
};
|
|
1246
|
+
readonly reverseXAxis: {
|
|
1247
|
+
readonly type: "boolean";
|
|
1248
|
+
readonly description: "Reverse the category order.";
|
|
1249
|
+
};
|
|
1250
|
+
readonly xAxisMaxItems: {
|
|
1251
|
+
readonly type: "number";
|
|
1252
|
+
readonly description: "Cap on rendered categories.";
|
|
1253
|
+
};
|
|
1254
|
+
readonly showLegend: {
|
|
1255
|
+
readonly type: "boolean";
|
|
1256
|
+
};
|
|
1257
|
+
readonly maxLegendItems: {
|
|
1258
|
+
readonly type: "number";
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
readonly title: {
|
|
1263
|
+
readonly type: "string";
|
|
1264
|
+
};
|
|
1265
|
+
readonly description: {
|
|
1266
|
+
readonly type: "string";
|
|
1267
|
+
};
|
|
1268
|
+
readonly rows: {
|
|
1269
|
+
readonly type: "array";
|
|
1270
|
+
readonly items: {
|
|
1271
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1272
|
+
};
|
|
1273
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1274
|
+
};
|
|
1275
|
+
readonly loading: {
|
|
1276
|
+
readonly type: "boolean";
|
|
1277
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1278
|
+
};
|
|
1279
|
+
readonly error: {
|
|
1280
|
+
readonly type: "string";
|
|
1281
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
readonly required: readonly ["chart", "measures", "xAxis"];
|
|
1285
|
+
};
|
|
1286
|
+
readonly LineWithKpiTabsSpec: {
|
|
1287
|
+
readonly type: "object";
|
|
1288
|
+
readonly additionalProperties: false;
|
|
1289
|
+
readonly properties: {
|
|
1290
|
+
readonly chart: {
|
|
1291
|
+
readonly type: "string";
|
|
1292
|
+
readonly const: "lineWithKpiTabs";
|
|
1293
|
+
};
|
|
1294
|
+
readonly xAxis: {
|
|
1295
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1296
|
+
};
|
|
1297
|
+
readonly measures: {
|
|
1298
|
+
readonly anyOf: readonly [{
|
|
1299
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1300
|
+
}, {
|
|
1301
|
+
readonly type: "array";
|
|
1302
|
+
readonly items: {
|
|
1303
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1304
|
+
};
|
|
1305
|
+
}];
|
|
1306
|
+
readonly description: "One measure per KPI tab; each tab plots its measure as the line.";
|
|
1307
|
+
};
|
|
1308
|
+
readonly kpiRows: {
|
|
1309
|
+
readonly type: "array";
|
|
1310
|
+
readonly items: {
|
|
1311
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1312
|
+
};
|
|
1313
|
+
readonly description: "One row holding each measure's headline number for the tabs. Derived by summing `rows` when omitted.";
|
|
1314
|
+
};
|
|
1315
|
+
readonly granularity: {
|
|
1316
|
+
readonly $ref: "#/$defs/Granularity";
|
|
1317
|
+
};
|
|
1318
|
+
readonly options: {
|
|
1319
|
+
readonly type: "object";
|
|
1320
|
+
readonly additionalProperties: false;
|
|
1321
|
+
readonly properties: {
|
|
1322
|
+
readonly showTooltips: {
|
|
1323
|
+
readonly type: "boolean";
|
|
1324
|
+
};
|
|
1325
|
+
readonly showValueLabels: {
|
|
1326
|
+
readonly type: "boolean";
|
|
1327
|
+
};
|
|
1328
|
+
readonly showLogarithmicScale: {
|
|
1329
|
+
readonly type: "boolean";
|
|
1330
|
+
};
|
|
1331
|
+
readonly xAxisLabel: {
|
|
1332
|
+
readonly type: "string";
|
|
1333
|
+
readonly description: "Category-axis label (vertical orientation; see header).";
|
|
1334
|
+
};
|
|
1335
|
+
readonly yAxisLabel: {
|
|
1336
|
+
readonly type: "string";
|
|
1337
|
+
readonly description: "Value-axis label.";
|
|
1338
|
+
};
|
|
1339
|
+
readonly yAxisRangeMin: {
|
|
1340
|
+
readonly type: "number";
|
|
1341
|
+
readonly description: "Value-axis range.";
|
|
1342
|
+
};
|
|
1343
|
+
readonly yAxisRangeMax: {
|
|
1344
|
+
readonly type: "number";
|
|
1345
|
+
};
|
|
1346
|
+
readonly reverseXAxis: {
|
|
1347
|
+
readonly type: "boolean";
|
|
1348
|
+
readonly description: "Reverse the category order.";
|
|
1349
|
+
};
|
|
1350
|
+
readonly xAxisMaxItems: {
|
|
1351
|
+
readonly type: "number";
|
|
1352
|
+
readonly description: "Cap on rendered categories.";
|
|
1353
|
+
};
|
|
1354
|
+
readonly showLegend: {
|
|
1355
|
+
readonly type: "boolean";
|
|
1356
|
+
};
|
|
1357
|
+
readonly maxLegendItems: {
|
|
1358
|
+
readonly type: "number";
|
|
1359
|
+
};
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
readonly title: {
|
|
1363
|
+
readonly type: "string";
|
|
1364
|
+
};
|
|
1365
|
+
readonly description: {
|
|
1366
|
+
readonly type: "string";
|
|
1367
|
+
};
|
|
1368
|
+
readonly rows: {
|
|
1369
|
+
readonly type: "array";
|
|
1370
|
+
readonly items: {
|
|
1371
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1372
|
+
};
|
|
1373
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1374
|
+
};
|
|
1375
|
+
readonly loading: {
|
|
1376
|
+
readonly type: "boolean";
|
|
1377
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1378
|
+
};
|
|
1379
|
+
readonly error: {
|
|
1380
|
+
readonly type: "string";
|
|
1381
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
readonly required: readonly ["chart", "measures", "xAxis"];
|
|
1385
|
+
};
|
|
1386
|
+
readonly NativeDataType: {
|
|
1387
|
+
readonly type: "string";
|
|
1388
|
+
readonly enum: readonly ["string", "number", "time", "boolean"];
|
|
1389
|
+
};
|
|
1390
|
+
readonly PieSpec: {
|
|
1391
|
+
readonly type: "object";
|
|
1392
|
+
readonly additionalProperties: false;
|
|
1393
|
+
readonly properties: {
|
|
1394
|
+
readonly chart: {
|
|
1395
|
+
readonly type: "string";
|
|
1396
|
+
readonly enum: readonly ["pie", "donut"];
|
|
1397
|
+
};
|
|
1398
|
+
readonly dimension: {
|
|
1399
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1400
|
+
};
|
|
1401
|
+
readonly measure: {
|
|
1402
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1403
|
+
};
|
|
1404
|
+
readonly options: {
|
|
1405
|
+
readonly type: "object";
|
|
1406
|
+
readonly additionalProperties: false;
|
|
1407
|
+
readonly properties: {
|
|
1408
|
+
readonly showTooltips: {
|
|
1409
|
+
readonly type: "boolean";
|
|
1410
|
+
};
|
|
1411
|
+
readonly showValueLabels: {
|
|
1412
|
+
readonly type: "boolean";
|
|
1413
|
+
};
|
|
1414
|
+
readonly showValueLabelsAsPercentage: {
|
|
1415
|
+
readonly type: "boolean";
|
|
1416
|
+
};
|
|
1417
|
+
readonly showLegend: {
|
|
1418
|
+
readonly type: "boolean";
|
|
1419
|
+
};
|
|
1420
|
+
readonly maxLegendItems: {
|
|
1421
|
+
readonly type: "number";
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
readonly title: {
|
|
1426
|
+
readonly type: "string";
|
|
1427
|
+
};
|
|
1428
|
+
readonly description: {
|
|
1429
|
+
readonly type: "string";
|
|
1430
|
+
};
|
|
1431
|
+
readonly rows: {
|
|
1432
|
+
readonly type: "array";
|
|
1433
|
+
readonly items: {
|
|
1434
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1435
|
+
};
|
|
1436
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1437
|
+
};
|
|
1438
|
+
readonly loading: {
|
|
1439
|
+
readonly type: "boolean";
|
|
1440
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1441
|
+
};
|
|
1442
|
+
readonly error: {
|
|
1443
|
+
readonly type: "string";
|
|
1444
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
readonly required: readonly ["chart", "dimension", "measure"];
|
|
1448
|
+
};
|
|
1449
|
+
readonly PivotSpec: {
|
|
1450
|
+
readonly type: "object";
|
|
1451
|
+
readonly additionalProperties: false;
|
|
1452
|
+
readonly properties: {
|
|
1453
|
+
readonly chart: {
|
|
1454
|
+
readonly type: "string";
|
|
1455
|
+
readonly const: "pivot";
|
|
1456
|
+
};
|
|
1457
|
+
readonly rowDimension: {
|
|
1458
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1459
|
+
};
|
|
1460
|
+
readonly columnDimension: {
|
|
1461
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1462
|
+
};
|
|
1463
|
+
readonly measures: {
|
|
1464
|
+
readonly anyOf: readonly [{
|
|
1465
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1466
|
+
}, {
|
|
1467
|
+
readonly type: "array";
|
|
1468
|
+
readonly items: {
|
|
1469
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1470
|
+
};
|
|
1471
|
+
}];
|
|
1472
|
+
};
|
|
1473
|
+
readonly subRowDimension: {
|
|
1474
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1475
|
+
readonly description: "Expandable second row level. Requires `subRows`.";
|
|
1476
|
+
};
|
|
1477
|
+
readonly subRows: {
|
|
1478
|
+
readonly type: "array";
|
|
1479
|
+
readonly items: {
|
|
1480
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1481
|
+
};
|
|
1482
|
+
readonly description: "Rows for the sub-row level, long format including the parent row key.";
|
|
1483
|
+
};
|
|
1484
|
+
readonly options: {
|
|
1485
|
+
readonly type: "object";
|
|
1486
|
+
readonly properties: {
|
|
1487
|
+
readonly displayNullAs: {
|
|
1488
|
+
readonly type: "string";
|
|
1489
|
+
};
|
|
1490
|
+
readonly columnWidth: {
|
|
1491
|
+
readonly type: "number";
|
|
1492
|
+
};
|
|
1493
|
+
readonly firstColumnWidth: {
|
|
1494
|
+
readonly type: "number";
|
|
1495
|
+
};
|
|
1496
|
+
};
|
|
1497
|
+
readonly additionalProperties: false;
|
|
1498
|
+
};
|
|
1499
|
+
readonly title: {
|
|
1500
|
+
readonly type: "string";
|
|
1501
|
+
};
|
|
1502
|
+
readonly description: {
|
|
1503
|
+
readonly type: "string";
|
|
1504
|
+
};
|
|
1505
|
+
readonly rows: {
|
|
1506
|
+
readonly type: "array";
|
|
1507
|
+
readonly items: {
|
|
1508
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1509
|
+
};
|
|
1510
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1511
|
+
};
|
|
1512
|
+
readonly loading: {
|
|
1513
|
+
readonly type: "boolean";
|
|
1514
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1515
|
+
};
|
|
1516
|
+
readonly error: {
|
|
1517
|
+
readonly type: "string";
|
|
1518
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
readonly required: readonly ["chart", "columnDimension", "measures", "rowDimension"];
|
|
1522
|
+
};
|
|
1523
|
+
readonly ScatterSpec: {
|
|
1524
|
+
readonly type: "object";
|
|
1525
|
+
readonly additionalProperties: false;
|
|
1526
|
+
readonly properties: {
|
|
1527
|
+
readonly chart: {
|
|
1528
|
+
readonly type: "string";
|
|
1529
|
+
readonly const: "scatter";
|
|
1530
|
+
};
|
|
1531
|
+
readonly xMeasure: {
|
|
1532
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1533
|
+
};
|
|
1534
|
+
readonly yMeasure: {
|
|
1535
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1536
|
+
};
|
|
1537
|
+
readonly pointDimension: {
|
|
1538
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1539
|
+
readonly description: "Dimension identifying each point.";
|
|
1540
|
+
};
|
|
1541
|
+
readonly groupByDimension: {
|
|
1542
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1543
|
+
readonly description: "Optional dimension that colors points by group.";
|
|
1544
|
+
};
|
|
1545
|
+
readonly options: {
|
|
1546
|
+
readonly type: "object";
|
|
1547
|
+
readonly additionalProperties: false;
|
|
1548
|
+
readonly properties: {
|
|
1549
|
+
readonly showTooltips: {
|
|
1550
|
+
readonly type: "boolean";
|
|
1551
|
+
};
|
|
1552
|
+
readonly showPointLabels: {
|
|
1553
|
+
readonly type: "boolean";
|
|
1554
|
+
readonly description: "Label each point with its dimension value.";
|
|
1555
|
+
};
|
|
1556
|
+
readonly showValueLabels: {
|
|
1557
|
+
readonly type: "boolean";
|
|
1558
|
+
};
|
|
1559
|
+
readonly showLogarithmicScale: {
|
|
1560
|
+
readonly type: "boolean";
|
|
1561
|
+
};
|
|
1562
|
+
readonly xAxisLabel: {
|
|
1563
|
+
readonly type: "string";
|
|
1564
|
+
};
|
|
1565
|
+
readonly yAxisLabel: {
|
|
1566
|
+
readonly type: "string";
|
|
1567
|
+
};
|
|
1568
|
+
readonly xAxisRangeMin: {
|
|
1569
|
+
readonly type: "number";
|
|
1570
|
+
};
|
|
1571
|
+
readonly xAxisRangeMax: {
|
|
1572
|
+
readonly type: "number";
|
|
1573
|
+
};
|
|
1574
|
+
readonly yAxisRangeMin: {
|
|
1575
|
+
readonly type: "number";
|
|
1576
|
+
};
|
|
1577
|
+
readonly yAxisRangeMax: {
|
|
1578
|
+
readonly type: "number";
|
|
1579
|
+
};
|
|
1580
|
+
readonly reverseXAxis: {
|
|
1581
|
+
readonly type: "boolean";
|
|
1582
|
+
};
|
|
1583
|
+
readonly pointColor: {
|
|
1584
|
+
readonly type: "string";
|
|
1585
|
+
readonly description: "CSS color for ungrouped points.";
|
|
1586
|
+
};
|
|
1587
|
+
readonly showLegend: {
|
|
1588
|
+
readonly type: "boolean";
|
|
1589
|
+
};
|
|
1590
|
+
readonly maxLegendItems: {
|
|
1591
|
+
readonly type: "number";
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
readonly title: {
|
|
1596
|
+
readonly type: "string";
|
|
1597
|
+
};
|
|
1598
|
+
readonly description: {
|
|
1599
|
+
readonly type: "string";
|
|
1600
|
+
};
|
|
1601
|
+
readonly rows: {
|
|
1602
|
+
readonly type: "array";
|
|
1603
|
+
readonly items: {
|
|
1604
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1605
|
+
};
|
|
1606
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1607
|
+
};
|
|
1608
|
+
readonly loading: {
|
|
1609
|
+
readonly type: "boolean";
|
|
1610
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1611
|
+
};
|
|
1612
|
+
readonly error: {
|
|
1613
|
+
readonly type: "string";
|
|
1614
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1615
|
+
};
|
|
1616
|
+
};
|
|
1617
|
+
readonly required: readonly ["chart", "pointDimension", "xMeasure", "yMeasure"];
|
|
1618
|
+
};
|
|
1619
|
+
readonly SpecField: {
|
|
1620
|
+
readonly type: "object";
|
|
1621
|
+
readonly properties: {
|
|
1622
|
+
readonly name: {
|
|
1623
|
+
readonly type: "string";
|
|
1624
|
+
readonly description: "Row key: values are read from `rows[i][name]`.";
|
|
1625
|
+
};
|
|
1626
|
+
readonly title: {
|
|
1627
|
+
readonly type: "string";
|
|
1628
|
+
readonly description: "Display name. Defaults to `name`.";
|
|
1629
|
+
};
|
|
1630
|
+
readonly type: {
|
|
1631
|
+
readonly $ref: "#/$defs/NativeDataType";
|
|
1632
|
+
readonly description: "Inferred from the row values when omitted.";
|
|
1633
|
+
};
|
|
1634
|
+
readonly role: {
|
|
1635
|
+
readonly type: "string";
|
|
1636
|
+
readonly enum: readonly ["dimension", "measure"];
|
|
1637
|
+
readonly description: "Only meaningful where a chart takes mixed columns (`table`): whether the field is a category (`dimension`) or a numeric value (`measure`). Inferred from `type`/row values when omitted.";
|
|
1638
|
+
};
|
|
1639
|
+
readonly format: {
|
|
1640
|
+
readonly $ref: "#/$defs/SpecFieldFormat";
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1643
|
+
readonly required: readonly ["name"];
|
|
1644
|
+
readonly additionalProperties: false;
|
|
1645
|
+
};
|
|
1646
|
+
readonly SpecFieldFormat: {
|
|
1647
|
+
readonly type: "object";
|
|
1648
|
+
readonly properties: {
|
|
1649
|
+
readonly prefix: {
|
|
1650
|
+
readonly type: "string";
|
|
1651
|
+
readonly description: "Prefix.";
|
|
1652
|
+
};
|
|
1653
|
+
readonly suffix: {
|
|
1654
|
+
readonly type: "string";
|
|
1655
|
+
readonly description: "Suffix.";
|
|
1656
|
+
};
|
|
1657
|
+
readonly displayName: {
|
|
1658
|
+
readonly type: "string";
|
|
1659
|
+
readonly description: "Display name.";
|
|
1660
|
+
};
|
|
1661
|
+
readonly maxCharacters: {
|
|
1662
|
+
readonly type: "number";
|
|
1663
|
+
readonly description: "Maximum characters. Applies to string fields.";
|
|
1664
|
+
};
|
|
1665
|
+
readonly decimalPlaces: {
|
|
1666
|
+
readonly type: "number";
|
|
1667
|
+
readonly description: "Decimal places. Applies to number fields.";
|
|
1668
|
+
};
|
|
1669
|
+
readonly currency: {
|
|
1670
|
+
readonly type: "string";
|
|
1671
|
+
readonly description: "Currency. e.g. EUR. Applies to number fields.";
|
|
1672
|
+
};
|
|
1673
|
+
readonly abbreviateLargeNumber: {
|
|
1674
|
+
readonly type: "boolean";
|
|
1675
|
+
readonly description: "Abbreviate large number. Applies to number fields.";
|
|
1676
|
+
};
|
|
1677
|
+
readonly color: {
|
|
1678
|
+
readonly type: "string";
|
|
1679
|
+
readonly description: "Color.";
|
|
1680
|
+
};
|
|
1681
|
+
readonly showValueAsPercentage: {
|
|
1682
|
+
readonly type: "boolean";
|
|
1683
|
+
readonly description: "Show values as percentage.";
|
|
1684
|
+
};
|
|
1685
|
+
readonly ignoreEmptyDate: {
|
|
1686
|
+
readonly type: "boolean";
|
|
1687
|
+
readonly description: "Ignore empty dates. When enabled, dates with no data will be omitted instead of shown as empty. Applies to time fields.";
|
|
1688
|
+
};
|
|
1689
|
+
readonly lineColor: {
|
|
1690
|
+
readonly type: "string";
|
|
1691
|
+
readonly description: "Line color.";
|
|
1692
|
+
};
|
|
1693
|
+
readonly dashedLine: {
|
|
1694
|
+
readonly type: "boolean";
|
|
1695
|
+
readonly description: "Dashed line.";
|
|
1696
|
+
};
|
|
1697
|
+
readonly connectGaps: {
|
|
1698
|
+
readonly type: "boolean";
|
|
1699
|
+
readonly description: "Connect gaps.";
|
|
1700
|
+
};
|
|
1701
|
+
readonly fillUnderLine: {
|
|
1702
|
+
readonly type: "boolean";
|
|
1703
|
+
readonly description: "Fill under line.";
|
|
1704
|
+
};
|
|
1705
|
+
readonly useSecondaryAxis: {
|
|
1706
|
+
readonly type: "boolean";
|
|
1707
|
+
readonly description: "Assign to secondary axis.";
|
|
1708
|
+
};
|
|
1709
|
+
readonly previousLineColor: {
|
|
1710
|
+
readonly type: "string";
|
|
1711
|
+
readonly description: "Previous line color.";
|
|
1712
|
+
};
|
|
1713
|
+
readonly lineDashed: {
|
|
1714
|
+
readonly type: "boolean";
|
|
1715
|
+
readonly description: "Primary line dashed.";
|
|
1716
|
+
};
|
|
1717
|
+
readonly previousLineDashed: {
|
|
1718
|
+
readonly type: "boolean";
|
|
1719
|
+
readonly description: "Compared line dashed.";
|
|
1720
|
+
};
|
|
1721
|
+
readonly invertChangeColors: {
|
|
1722
|
+
readonly type: "boolean";
|
|
1723
|
+
readonly description: "Reverse positive/negative colors.";
|
|
1724
|
+
};
|
|
1725
|
+
readonly reverseTrendDirection: {
|
|
1726
|
+
readonly type: "boolean";
|
|
1727
|
+
readonly description: "Reverse trend direction. Reverses the up/down trend arrow independently of \"Reverse positive/negative colors\" above. Existing dashboards keep their current look until this is changed explicitly.";
|
|
1728
|
+
};
|
|
1729
|
+
readonly displayChangeAsPercentage: {
|
|
1730
|
+
readonly type: "boolean";
|
|
1731
|
+
readonly description: "Display change as %.";
|
|
1732
|
+
};
|
|
1733
|
+
readonly percentageDecimalPlaces: {
|
|
1734
|
+
readonly type: "number";
|
|
1735
|
+
readonly description: "Percentage decimal places.";
|
|
1736
|
+
};
|
|
1737
|
+
readonly columnAggregation: {
|
|
1738
|
+
readonly type: "array";
|
|
1739
|
+
readonly items: {
|
|
1740
|
+
readonly type: "string";
|
|
1741
|
+
readonly enum: readonly ["sum", "min", "max", "average"];
|
|
1742
|
+
};
|
|
1743
|
+
readonly description: "Show column calculation.";
|
|
1744
|
+
};
|
|
1745
|
+
readonly rowAggregation: {
|
|
1746
|
+
readonly type: "array";
|
|
1747
|
+
readonly items: {
|
|
1748
|
+
readonly type: "string";
|
|
1749
|
+
readonly enum: readonly ["sum", "min", "max", "average"];
|
|
1750
|
+
};
|
|
1751
|
+
readonly description: "Show row calculation.";
|
|
1752
|
+
};
|
|
1753
|
+
readonly showAsPercentage: {
|
|
1754
|
+
readonly type: "boolean";
|
|
1755
|
+
readonly description: "Show as percentage. If turned on, other measures may be ignored.";
|
|
1756
|
+
};
|
|
1757
|
+
readonly width: {
|
|
1758
|
+
readonly type: "number";
|
|
1759
|
+
readonly description: "Width. You can input a number in pixels e.g. 400.";
|
|
1760
|
+
};
|
|
1761
|
+
readonly align: {
|
|
1762
|
+
readonly type: "string";
|
|
1763
|
+
readonly enum: readonly ["left", "center", "right"];
|
|
1764
|
+
readonly description: "Align.";
|
|
1765
|
+
};
|
|
1766
|
+
readonly tableCellStyle: {
|
|
1767
|
+
readonly type: "string";
|
|
1768
|
+
readonly enum: readonly ["Bold", "Italic", "Positive vs Negative"];
|
|
1769
|
+
readonly description: "Table cell style.";
|
|
1770
|
+
};
|
|
1771
|
+
readonly displayFormat: {
|
|
1772
|
+
readonly type: "string";
|
|
1773
|
+
readonly enum: readonly ["Markdown", "Json"];
|
|
1774
|
+
readonly description: "Display format.";
|
|
1775
|
+
};
|
|
1776
|
+
readonly displayNullAs: {
|
|
1777
|
+
readonly type: "string";
|
|
1778
|
+
readonly description: "Rendered in place of null/undefined values.";
|
|
1779
|
+
};
|
|
1780
|
+
};
|
|
1781
|
+
readonly additionalProperties: false;
|
|
1782
|
+
readonly description: "Per-field options, applied via the field's `inputs`: formatting (prefix, suffix, decimalPlaces, …) plus chart-specific ones such as a pivot table's columnAggregation/rowAggregation. Time-axis settings live on the chart.";
|
|
1783
|
+
};
|
|
1784
|
+
readonly SpecRow: {
|
|
1785
|
+
readonly type: "object";
|
|
1786
|
+
readonly additionalProperties: {};
|
|
1787
|
+
};
|
|
1788
|
+
readonly TableSpec: {
|
|
1789
|
+
readonly type: "object";
|
|
1790
|
+
readonly additionalProperties: false;
|
|
1791
|
+
readonly properties: {
|
|
1792
|
+
readonly chart: {
|
|
1793
|
+
readonly type: "string";
|
|
1794
|
+
readonly const: "table";
|
|
1795
|
+
};
|
|
1796
|
+
readonly columns: {
|
|
1797
|
+
readonly type: "array";
|
|
1798
|
+
readonly items: {
|
|
1799
|
+
readonly $ref: "#/$defs/FieldRef";
|
|
1800
|
+
};
|
|
1801
|
+
readonly description: "Columns, in display order. `role` disambiguates dimension vs measure.";
|
|
1802
|
+
};
|
|
1803
|
+
readonly options: {
|
|
1804
|
+
readonly type: "object";
|
|
1805
|
+
readonly properties: {
|
|
1806
|
+
readonly showIndex: {
|
|
1807
|
+
readonly type: "boolean";
|
|
1808
|
+
readonly description: "Number the rows.";
|
|
1809
|
+
};
|
|
1810
|
+
readonly displayNullAs: {
|
|
1811
|
+
readonly type: "string";
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
readonly additionalProperties: false;
|
|
1815
|
+
};
|
|
1816
|
+
readonly title: {
|
|
1817
|
+
readonly type: "string";
|
|
1818
|
+
};
|
|
1819
|
+
readonly description: {
|
|
1820
|
+
readonly type: "string";
|
|
1821
|
+
};
|
|
1822
|
+
readonly rows: {
|
|
1823
|
+
readonly type: "array";
|
|
1824
|
+
readonly items: {
|
|
1825
|
+
readonly $ref: "#/$defs/SpecRow";
|
|
1826
|
+
};
|
|
1827
|
+
readonly description: "The data, long format: one row per category (× group) combination. Omit while loading. Time values are zone-less ISO strings — the renderer also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.";
|
|
1828
|
+
};
|
|
1829
|
+
readonly loading: {
|
|
1830
|
+
readonly type: "boolean";
|
|
1831
|
+
readonly description: "Force the loading state, e.g. while more rows stream in.";
|
|
1832
|
+
};
|
|
1833
|
+
readonly error: {
|
|
1834
|
+
readonly type: "string";
|
|
1835
|
+
readonly description: "Render the error state with this message instead of data.";
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
readonly required: readonly ["chart", "columns"];
|
|
1839
|
+
};
|
|
1840
|
+
};
|
|
1841
|
+
};
|
|
1842
|
+
/** The same fields flattened into one root object, for `input_schema` / `parameters`. Guides a producer; validate with chartSpecSchema. */
|
|
1843
|
+
declare const chartSpecToolSchema: ToolInputSchema;
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* Anthropic Messages API tool definition for rendering a chart. `input_schema`
|
|
1847
|
+
* is `chartSpecToolSchema`: the spec flattened to a root object, because the
|
|
1848
|
+
* API rejects a top-level anyOf. The tool input is a `ChartSpec`.
|
|
1849
|
+
*
|
|
1850
|
+
* @example
|
|
1851
|
+
* const res = await anthropic.messages.create({
|
|
1852
|
+
* model, max_tokens: 4096, system: chartGuidance, messages,
|
|
1853
|
+
* tools: [renderChartTool],
|
|
1854
|
+
* });
|
|
1855
|
+
* const call = res.content.find((block) => block.type === 'tool_use'); // <ChartFromSpec spec={call.input} />
|
|
1856
|
+
*/
|
|
1857
|
+
declare const renderChartTool: {
|
|
1858
|
+
readonly name: "render_chart";
|
|
1859
|
+
readonly description: string;
|
|
1860
|
+
readonly input_schema: ToolInputSchema;
|
|
1861
|
+
};
|
|
1862
|
+
/**
|
|
1863
|
+
* The same tool as an OpenAI function-calling definition (Chat Completions
|
|
1864
|
+
* `tools`). Not `strict`: the spec has free-form `rows` and `format`, which
|
|
1865
|
+
* strict mode cannot express.
|
|
1866
|
+
*
|
|
1867
|
+
* @example
|
|
1868
|
+
* const res = await openai.chat.completions.create({
|
|
1869
|
+
* model, messages: [{ role: 'system', content: chartGuidance }, ...messages],
|
|
1870
|
+
* tools: [renderChartToolOpenAI],
|
|
1871
|
+
* });
|
|
1872
|
+
* const spec = JSON.parse(res.choices[0].message.tool_calls[0].function.arguments); // <ChartFromSpec spec={spec} />
|
|
1873
|
+
*/
|
|
1874
|
+
declare const renderChartToolOpenAI: {
|
|
1875
|
+
readonly type: "function";
|
|
1876
|
+
readonly function: {
|
|
1877
|
+
readonly name: "render_chart";
|
|
1878
|
+
readonly description: string;
|
|
1879
|
+
readonly parameters: ToolInputSchema;
|
|
1880
|
+
};
|
|
1881
|
+
};
|
|
1882
|
+
/**
|
|
1883
|
+
* Model-facing guidance: which chart kind to pick and the data rules. About
|
|
1884
|
+
* 3 KB of plain text; append it to a system prompt next to the tool.
|
|
1885
|
+
*
|
|
1886
|
+
* @example
|
|
1887
|
+
* const system = `You are a data analyst.\n\n${chartGuidance}`;
|
|
1888
|
+
* await anthropic.messages.create({
|
|
1889
|
+
* model, max_tokens: 4096, system, messages,
|
|
1890
|
+
* tools: [renderChartTool],
|
|
1891
|
+
* });
|
|
1892
|
+
*/
|
|
1893
|
+
declare const chartGuidance = "Charts: call render_chart to show data. One call per chart; pick the kind from the shape of the data.\n\nChoosing `chart`:\n- bar: one measure (or a few) compared across categories.\n- barHorizontal: the same, when labels are long or there are more than ~8 categories.\n- barGrouped, barGroupedHorizontal: a measure split by a second category (`groupBy`), parts side by side.\n- barStacked, barStackedHorizontal: the same split stacked, to show how the parts add up to a total.\n- line: a trend over time or another ordered x axis; one line per entry in `measures`.\n- lineGrouped: one measure drawn as a line per value of `groupBy`.\n- lineWithKpiTabs: a trend with one KPI tab per measure (the tab shows the measure's total);\n good for dashboards-in-one-chart like \"revenue / orders / signups over time\".\n- lineComparison: this period against a previous one (`rows` vs `comparisonRows`, aligned by\n position); set `comparisonLabel`, e.g. \"Previous period\".\n- lineComparisonWithKpiTabs: the comparison plus KPI tabs; headline numbers are derived from the\n rows unless `kpiRows`/`kpiComparisonRows` are given.\n- area: volume over time; add `groupBy` to stack the parts.\n- barLine: bars (`barMeasures`) plus lines (`lineMeasures`) on a second axis, e.g. volume and a rate.\n- pie, donut: only shares of a whole: at most 8 slices, non-negative values. Otherwise use a bar chart.\n- donutLabel: a donut with a headline number in the center (`innerLabel`: { text, value } \u2014 the\n value defaults to the sum of the rows).\n- scatter: the relationship between two measures, one point per `pointDimension`.\n- bubble: scatter plus a third measure as point size (`bubbleSizeMeasure`).\n- kpi: one headline number.\n- kpiComparison: a number against another period (`value`, `comparisonValue`); set\n `options.reversePositiveNegativeColors` when lower is better.\n- table: row-level detail or exact values; mixed text and number `columns`.\n- heatmap: one measure across two categories as colour intensity (weekday by hour).\n- pivot: the same two-way layout with numbers in the cells, several measures and optional sub-rows.\n\nData rules:\n- `rows` is an array of flat objects in long format: one row per category and group combination.\n Never spread groups across columns; name the group field in `groupBy` instead.\n- Use only values from the data you were given. Omit `rows` while data is loading (set `loading: true`),\n or set `error` to show a message instead.\n- A field is a row key as a bare string (\"revenue\"), or { name, title?, type?, role?, format? } when it\n needs a display title or formatting. `type` ('string' | 'number' | 'time' | 'boolean') is inferred from rows.\n- Time values are zone-less ISO strings: \"2025-03-01T00:00:00.000\" (\"2025-03-01\" is also accepted).\n Never add a Z or a UTC offset.\n- When the category axis (`dimension` or `xAxis`) is a time field, set `granularity` on the chart,\n never on the field: second, minute, hour, day, week, month, quarter or year.\n The rows must already be bucketed at that granularity.\n- Format numbers with the field's `format`: { prefix: \"$\", suffix: \"%\", decimalPlaces: 1 }.\n Also available: displayName, displayNullAs, maxCharacters.\n- Options are always written in vertical orientation, including for horizontal variants:\n `options.xAxisLabel` labels the category axis; `options.yAxisLabel`, `options.yAxisRangeMin`\n and `options.yAxisRangeMax` the value axis. The renderer swaps them.\n- `kpi` and `kpiComparison` accept `value` (and `comparisonValue`) instead of `rows`.\n- In `table`, set a column's `role` ('dimension' | 'measure') only when it is ambiguous.\n- Give every chart a short `title` that says what it shows.";
|
|
1894
|
+
|
|
1895
|
+
export { chartGuidance, chartSpecSchema, chartSpecToolSchema, renderChartTool, renderChartToolOpenAI };
|
|
1896
|
+
export type { ToolInputSchema };
|