@dxvis/flatbi 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,1784 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "flatbi spec",
4
+ "type": "object",
5
+ "properties": {
6
+ "dash": {
7
+ "type": "number",
8
+ "const": 1,
9
+ "description": "The spec version: always 1."
10
+ },
11
+ "title": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "description": "The dashboard's title."
15
+ },
16
+ "description": {
17
+ "description": "A line shown under the title.",
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "locale": {
22
+ "description": "BCP 47 locale tag for number and date formatting, such as `en-US` or `de-DE`. Defaults to `en-US`.",
23
+ "type": "string",
24
+ "minLength": 1
25
+ },
26
+ "currency": {
27
+ "description": "ISO 4217 currency code used by `format: currency`, such as `USD` or `EUR`. Defaults to `USD`.",
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "sources": {
32
+ "type": "object",
33
+ "propertyNames": {
34
+ "type": "string",
35
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
36
+ },
37
+ "additionalProperties": {
38
+ "anyOf": [
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "file": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "Path to a CSV, Parquet, JSON, NDJSON, XLSX, DuckDB or SQLite file, relative to the spec file."
46
+ },
47
+ "table": {
48
+ "description": "Table name inside a DuckDB or SQLite database file.",
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "query": {
53
+ "description": "SQL query to run against a DuckDB or SQLite database file.",
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "sheet": {
58
+ "description": "Worksheet name inside an XLSX workbook. Defaults to the first sheet.",
59
+ "type": "string",
60
+ "minLength": 1
61
+ }
62
+ },
63
+ "required": [
64
+ "file"
65
+ ],
66
+ "additionalProperties": false,
67
+ "description": "A file or database source."
68
+ },
69
+ {
70
+ "type": "object",
71
+ "properties": {
72
+ "sql": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "DuckDB SQL query over other sources in this spec, for joins and cleaning."
76
+ }
77
+ },
78
+ "required": [
79
+ "sql"
80
+ ],
81
+ "additionalProperties": false,
82
+ "description": "A source derived by querying other sources."
83
+ }
84
+ ],
85
+ "description": "A named input dataset."
86
+ },
87
+ "description": "Input datasets, by source ID."
88
+ },
89
+ "models": {
90
+ "type": "object",
91
+ "propertyNames": {
92
+ "type": "string",
93
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
94
+ },
95
+ "additionalProperties": {
96
+ "type": "object",
97
+ "properties": {
98
+ "source": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "description": "The source the model reads."
102
+ },
103
+ "time": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "description": "The model's main date dimension, enabling time grains, date-range filters and KPI comparisons."
107
+ },
108
+ "dimensions": {
109
+ "description": "Dimensions of the model that tiles and filters may group or filter by.",
110
+ "type": "array",
111
+ "items": {
112
+ "anyOf": [
113
+ {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "description": "A column of the source."
117
+ },
118
+ {
119
+ "type": "object",
120
+ "properties": {
121
+ "name": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "description": "The dimension's name, used by tiles and filters."
125
+ },
126
+ "sql": {
127
+ "description": "Row-level DuckDB expression that computes the dimension, such as a `CASE` expression.",
128
+ "type": "string",
129
+ "minLength": 1
130
+ },
131
+ "order": {
132
+ "description": "Fixed display order for the dimension's categories, such as `[S, M, L]`.",
133
+ "minItems": 1,
134
+ "type": "array",
135
+ "items": {
136
+ "anyOf": [
137
+ {
138
+ "type": "string",
139
+ "description": "A text category value."
140
+ },
141
+ {
142
+ "type": "number",
143
+ "description": "A numeric category value."
144
+ }
145
+ ],
146
+ "description": "A category value in its fixed display order."
147
+ }
148
+ }
149
+ },
150
+ "required": [
151
+ "name"
152
+ ],
153
+ "additionalProperties": false,
154
+ "description": "A computed or ordered dimension."
155
+ }
156
+ ],
157
+ "description": "A column name, or a mapping with `name`, optional `sql` and optional `order`."
158
+ }
159
+ },
160
+ "measures": {
161
+ "description": "The model's measures, by measure ID.",
162
+ "type": "object",
163
+ "propertyNames": {
164
+ "type": "string",
165
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
166
+ },
167
+ "additionalProperties": {
168
+ "anyOf": [
169
+ {
170
+ "type": "object",
171
+ "properties": {
172
+ "agg": {
173
+ "type": "string",
174
+ "const": "sum",
175
+ "description": "The aggregation, which selects this kind of measure."
176
+ },
177
+ "sql": {
178
+ "type": "string",
179
+ "minLength": 1,
180
+ "description": "Row-level DuckDB expression to add up, such as a column."
181
+ },
182
+ "where": {
183
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
184
+ "type": "string",
185
+ "minLength": 1
186
+ },
187
+ "format": {
188
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
189
+ "type": "string",
190
+ "enum": [
191
+ "integer",
192
+ "number",
193
+ "percent",
194
+ "currency",
195
+ "compact"
196
+ ]
197
+ },
198
+ "decimals": {
199
+ "description": "Number of decimal places to show (0 to 20).",
200
+ "type": "integer",
201
+ "minimum": 0,
202
+ "maximum": 20
203
+ }
204
+ },
205
+ "required": [
206
+ "agg",
207
+ "sql"
208
+ ],
209
+ "additionalProperties": false,
210
+ "description": "The total of an expression over the rows."
211
+ },
212
+ {
213
+ "type": "object",
214
+ "properties": {
215
+ "agg": {
216
+ "type": "string",
217
+ "const": "count",
218
+ "description": "The aggregation, which selects this kind of measure."
219
+ },
220
+ "sql": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "description": "Row-level DuckDB expression. When set, only rows where it is not null count."
224
+ },
225
+ "where": {
226
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
227
+ "type": "string",
228
+ "minLength": 1
229
+ },
230
+ "format": {
231
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
232
+ "type": "string",
233
+ "enum": [
234
+ "integer",
235
+ "number",
236
+ "percent",
237
+ "currency",
238
+ "compact"
239
+ ]
240
+ },
241
+ "decimals": {
242
+ "description": "Number of decimal places to show (0 to 20).",
243
+ "type": "integer",
244
+ "minimum": 0,
245
+ "maximum": 20
246
+ }
247
+ },
248
+ "required": [
249
+ "agg"
250
+ ],
251
+ "additionalProperties": false,
252
+ "description": "The number of rows."
253
+ },
254
+ {
255
+ "type": "object",
256
+ "properties": {
257
+ "agg": {
258
+ "type": "string",
259
+ "const": "count_distinct",
260
+ "description": "The aggregation, which selects this kind of measure."
261
+ },
262
+ "sql": {
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "description": "Row-level DuckDB expression whose distinct values are counted, such as an ID."
266
+ },
267
+ "where": {
268
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
269
+ "type": "string",
270
+ "minLength": 1
271
+ },
272
+ "format": {
273
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
274
+ "type": "string",
275
+ "enum": [
276
+ "integer",
277
+ "number",
278
+ "percent",
279
+ "currency",
280
+ "compact"
281
+ ]
282
+ },
283
+ "decimals": {
284
+ "description": "Number of decimal places to show (0 to 20).",
285
+ "type": "integer",
286
+ "minimum": 0,
287
+ "maximum": 20
288
+ }
289
+ },
290
+ "required": [
291
+ "agg",
292
+ "sql"
293
+ ],
294
+ "additionalProperties": false,
295
+ "description": "The number of distinct values of an expression, not counting missing ones."
296
+ },
297
+ {
298
+ "type": "object",
299
+ "properties": {
300
+ "agg": {
301
+ "type": "string",
302
+ "const": "min",
303
+ "description": "The aggregation, which selects this kind of measure."
304
+ },
305
+ "sql": {
306
+ "type": "string",
307
+ "minLength": 1,
308
+ "description": "Row-level DuckDB expression, such as a column."
309
+ },
310
+ "where": {
311
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
312
+ "type": "string",
313
+ "minLength": 1
314
+ },
315
+ "format": {
316
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
317
+ "type": "string",
318
+ "enum": [
319
+ "integer",
320
+ "number",
321
+ "percent",
322
+ "currency",
323
+ "compact"
324
+ ]
325
+ },
326
+ "decimals": {
327
+ "description": "Number of decimal places to show (0 to 20).",
328
+ "type": "integer",
329
+ "minimum": 0,
330
+ "maximum": 20
331
+ }
332
+ },
333
+ "required": [
334
+ "agg",
335
+ "sql"
336
+ ],
337
+ "additionalProperties": false,
338
+ "description": "The smallest value of an expression over the rows."
339
+ },
340
+ {
341
+ "type": "object",
342
+ "properties": {
343
+ "agg": {
344
+ "type": "string",
345
+ "const": "max",
346
+ "description": "The aggregation, which selects this kind of measure."
347
+ },
348
+ "sql": {
349
+ "type": "string",
350
+ "minLength": 1,
351
+ "description": "Row-level DuckDB expression, such as a column."
352
+ },
353
+ "where": {
354
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
355
+ "type": "string",
356
+ "minLength": 1
357
+ },
358
+ "format": {
359
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
360
+ "type": "string",
361
+ "enum": [
362
+ "integer",
363
+ "number",
364
+ "percent",
365
+ "currency",
366
+ "compact"
367
+ ]
368
+ },
369
+ "decimals": {
370
+ "description": "Number of decimal places to show (0 to 20).",
371
+ "type": "integer",
372
+ "minimum": 0,
373
+ "maximum": 20
374
+ }
375
+ },
376
+ "required": [
377
+ "agg",
378
+ "sql"
379
+ ],
380
+ "additionalProperties": false,
381
+ "description": "The largest value of an expression over the rows."
382
+ },
383
+ {
384
+ "type": "object",
385
+ "properties": {
386
+ "agg": {
387
+ "type": "string",
388
+ "const": "avg",
389
+ "description": "The aggregation, which selects this kind of measure."
390
+ },
391
+ "sql": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "description": "Row-level DuckDB expression to average, such as a column."
395
+ },
396
+ "where": {
397
+ "description": "Row-level DuckDB predicate, such as `status = 'paid'`. Only rows where it is true count toward the measure.",
398
+ "type": "string",
399
+ "minLength": 1
400
+ },
401
+ "format": {
402
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
403
+ "type": "string",
404
+ "enum": [
405
+ "integer",
406
+ "number",
407
+ "percent",
408
+ "currency",
409
+ "compact"
410
+ ]
411
+ },
412
+ "decimals": {
413
+ "description": "Number of decimal places to show (0 to 20).",
414
+ "type": "integer",
415
+ "minimum": 0,
416
+ "maximum": 20
417
+ }
418
+ },
419
+ "required": [
420
+ "agg",
421
+ "sql"
422
+ ],
423
+ "additionalProperties": false,
424
+ "description": "The average of an expression over the rows where it has a value."
425
+ },
426
+ {
427
+ "type": "object",
428
+ "properties": {
429
+ "formula": {
430
+ "type": "string",
431
+ "minLength": 1,
432
+ "description": "Arithmetic over other measures of the model: `+ - * /`, parentheses and numbers, such as `revenue / orders`."
433
+ },
434
+ "format": {
435
+ "description": "How the measure's numbers display: `integer`, `number`, `percent`, `currency` or `compact`.",
436
+ "type": "string",
437
+ "enum": [
438
+ "integer",
439
+ "number",
440
+ "percent",
441
+ "currency",
442
+ "compact"
443
+ ]
444
+ },
445
+ "decimals": {
446
+ "description": "Number of decimal places to show (0 to 20).",
447
+ "type": "integer",
448
+ "minimum": 0,
449
+ "maximum": 20
450
+ }
451
+ },
452
+ "required": [
453
+ "formula"
454
+ ],
455
+ "additionalProperties": false,
456
+ "description": "A ratio or other arithmetic over measures, computed after they aggregate, so it stays right under any filter. Division by zero gives no value."
457
+ }
458
+ ],
459
+ "description": "A named aggregate, defined once and shown by any tile."
460
+ }
461
+ }
462
+ },
463
+ "required": [
464
+ "source"
465
+ ],
466
+ "additionalProperties": false,
467
+ "description": "A named, flat table built from one source."
468
+ },
469
+ "description": "Models, by model ID. With more than one, each tile names its own with `model`."
470
+ },
471
+ "filters": {
472
+ "description": "Global filter controls shown above the tiles.",
473
+ "type": "array",
474
+ "items": {
475
+ "oneOf": [
476
+ {
477
+ "type": "object",
478
+ "properties": {
479
+ "type": {
480
+ "type": "string",
481
+ "const": "select",
482
+ "description": "Picks a single value of the dimension, or all values."
483
+ },
484
+ "field": {
485
+ "type": "string",
486
+ "minLength": 1,
487
+ "description": "The dimension to filter by across every model that defines it."
488
+ },
489
+ "id": {
490
+ "description": "Filter ID used in the URL hash. Defaults to `field`.",
491
+ "type": "string",
492
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
493
+ },
494
+ "default": {
495
+ "description": "Initial value selected when opening the dashboard.",
496
+ "anyOf": [
497
+ {
498
+ "type": "string",
499
+ "description": "A text category value."
500
+ },
501
+ {
502
+ "type": "number",
503
+ "description": "A numeric category value."
504
+ }
505
+ ]
506
+ }
507
+ },
508
+ "required": [
509
+ "type",
510
+ "field"
511
+ ],
512
+ "additionalProperties": false,
513
+ "description": "A single-select filter."
514
+ },
515
+ {
516
+ "type": "object",
517
+ "properties": {
518
+ "type": {
519
+ "type": "string",
520
+ "const": "multi_select",
521
+ "description": "Picks one or more values of the dimension."
522
+ },
523
+ "field": {
524
+ "type": "string",
525
+ "minLength": 1,
526
+ "description": "The dimension to filter by across every model that defines it."
527
+ },
528
+ "id": {
529
+ "description": "Filter ID used in the URL hash. Defaults to `field`.",
530
+ "type": "string",
531
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
532
+ },
533
+ "default": {
534
+ "description": "Initial values selected when opening the dashboard.",
535
+ "minItems": 1,
536
+ "type": "array",
537
+ "items": {
538
+ "anyOf": [
539
+ {
540
+ "type": "string",
541
+ "description": "A text category value."
542
+ },
543
+ {
544
+ "type": "number",
545
+ "description": "A numeric category value."
546
+ }
547
+ ],
548
+ "description": "A category value."
549
+ }
550
+ }
551
+ },
552
+ "required": [
553
+ "type",
554
+ "field"
555
+ ],
556
+ "additionalProperties": false,
557
+ "description": "A multi-select filter."
558
+ },
559
+ {
560
+ "type": "object",
561
+ "properties": {
562
+ "type": {
563
+ "type": "string",
564
+ "const": "date_range",
565
+ "description": "Filters a date dimension by a preset anchored to the as-of date, or a custom range."
566
+ },
567
+ "field": {
568
+ "type": "string",
569
+ "minLength": 1,
570
+ "description": "The date dimension to filter by across every model that defines it."
571
+ },
572
+ "id": {
573
+ "description": "Filter ID used in the URL hash. Defaults to `field`.",
574
+ "type": "string",
575
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
576
+ },
577
+ "default": {
578
+ "description": "Initial preset or custom `{ from, to }` range selected when opening the dashboard.",
579
+ "anyOf": [
580
+ {
581
+ "type": "string",
582
+ "enum": [
583
+ "last_7_days",
584
+ "last_30_days",
585
+ "last_90_days",
586
+ "last_12_months",
587
+ "this_month",
588
+ "this_quarter",
589
+ "this_year",
590
+ "ytd",
591
+ "all"
592
+ ],
593
+ "description": "A relative preset anchored to the snapshot's as-of date."
594
+ },
595
+ {
596
+ "type": "object",
597
+ "properties": {
598
+ "from": {
599
+ "description": "Inclusive start date in `YYYY-MM-DD` format (UTC).",
600
+ "type": "string",
601
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
602
+ },
603
+ "to": {
604
+ "description": "Inclusive end date in `YYYY-MM-DD` format (UTC).",
605
+ "type": "string",
606
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
607
+ }
608
+ },
609
+ "additionalProperties": false,
610
+ "description": "A custom inclusive UTC date range with `from` and/or `to` bounds."
611
+ }
612
+ ]
613
+ }
614
+ },
615
+ "required": [
616
+ "type",
617
+ "field"
618
+ ],
619
+ "additionalProperties": false,
620
+ "description": "A date-range filter anchored to the snapshot's as-of date."
621
+ }
622
+ ],
623
+ "description": "A global filter control bound to a dimension by name."
624
+ }
625
+ },
626
+ "tiles": {
627
+ "type": "object",
628
+ "propertyNames": {
629
+ "type": "string",
630
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
631
+ },
632
+ "additionalProperties": {
633
+ "oneOf": [
634
+ {
635
+ "type": "object",
636
+ "properties": {
637
+ "type": {
638
+ "type": "string",
639
+ "const": "kpi",
640
+ "description": "Shows one measure as a headline number."
641
+ },
642
+ "model": {
643
+ "type": "string",
644
+ "minLength": 1,
645
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
646
+ },
647
+ "value": {
648
+ "type": "string",
649
+ "minLength": 1,
650
+ "description": "The measure to show."
651
+ },
652
+ "title": {
653
+ "description": "The tile's heading. Generated from the measure when omitted.",
654
+ "type": "string",
655
+ "minLength": 1
656
+ },
657
+ "compare": {
658
+ "description": "Compare against `previous_period` or `previous_year` when a bounded date filter is active.",
659
+ "type": "string",
660
+ "enum": [
661
+ "previous_period",
662
+ "previous_year"
663
+ ]
664
+ },
665
+ "target": {
666
+ "type": "string",
667
+ "minLength": 1,
668
+ "description": "Compare the headline measure against another measure as a target."
669
+ },
670
+ "good": {
671
+ "description": "Whether higher (`up`, default) or lower (`down`) values are favourable.",
672
+ "type": "string",
673
+ "enum": [
674
+ "up",
675
+ "down"
676
+ ]
677
+ },
678
+ "spark": {
679
+ "description": "Set `true` to show a compact trend sparkline under the value.",
680
+ "type": "boolean"
681
+ },
682
+ "where": {
683
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
684
+ "type": "object",
685
+ "propertyNames": {
686
+ "type": "string",
687
+ "minLength": 1
688
+ },
689
+ "additionalProperties": {
690
+ "anyOf": [
691
+ {
692
+ "anyOf": [
693
+ {
694
+ "type": "string",
695
+ "description": "A text category value."
696
+ },
697
+ {
698
+ "type": "number",
699
+ "description": "A numeric category value."
700
+ }
701
+ ],
702
+ "description": "A category value."
703
+ },
704
+ {
705
+ "minItems": 1,
706
+ "type": "array",
707
+ "items": {
708
+ "anyOf": [
709
+ {
710
+ "type": "string",
711
+ "description": "A text category value."
712
+ },
713
+ {
714
+ "type": "number",
715
+ "description": "A numeric category value."
716
+ }
717
+ ],
718
+ "description": "A category value."
719
+ },
720
+ "description": "Allowed values for the dimension."
721
+ }
722
+ ],
723
+ "description": "Exact value or list of allowed values."
724
+ }
725
+ },
726
+ "size": {
727
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
728
+ "type": "string",
729
+ "enum": [
730
+ "s",
731
+ "m",
732
+ "l"
733
+ ]
734
+ },
735
+ "crossfilter": {
736
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
737
+ "type": "boolean"
738
+ }
739
+ },
740
+ "required": [
741
+ "type",
742
+ "value"
743
+ ],
744
+ "additionalProperties": false,
745
+ "description": "A KPI tile."
746
+ },
747
+ {
748
+ "type": "object",
749
+ "properties": {
750
+ "type": {
751
+ "type": "string",
752
+ "const": "line",
753
+ "description": "Plots measures over time or ordered categories."
754
+ },
755
+ "model": {
756
+ "type": "string",
757
+ "minLength": 1,
758
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
759
+ },
760
+ "x": {
761
+ "type": "string",
762
+ "minLength": 1,
763
+ "description": "Date dimension (with optional `@day|week|month|quarter|year`) or category dimension for the horizontal axis."
764
+ },
765
+ "y": {
766
+ "anyOf": [
767
+ {
768
+ "type": "string",
769
+ "minLength": 1,
770
+ "description": "The measure to show."
771
+ },
772
+ {
773
+ "minItems": 1,
774
+ "type": "array",
775
+ "items": {
776
+ "type": "string",
777
+ "minLength": 1,
778
+ "description": "A measure to show."
779
+ },
780
+ "description": "Measures to show as separate series."
781
+ }
782
+ ],
783
+ "description": "A measure name, or a list of measures for multi-series charts."
784
+ },
785
+ "color": {
786
+ "type": "string",
787
+ "minLength": 1,
788
+ "description": "Dimension whose categories split the measure into coloured series."
789
+ },
790
+ "where": {
791
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
792
+ "type": "object",
793
+ "propertyNames": {
794
+ "type": "string",
795
+ "minLength": 1
796
+ },
797
+ "additionalProperties": {
798
+ "anyOf": [
799
+ {
800
+ "anyOf": [
801
+ {
802
+ "type": "string",
803
+ "description": "A text category value."
804
+ },
805
+ {
806
+ "type": "number",
807
+ "description": "A numeric category value."
808
+ }
809
+ ],
810
+ "description": "A category value."
811
+ },
812
+ {
813
+ "minItems": 1,
814
+ "type": "array",
815
+ "items": {
816
+ "anyOf": [
817
+ {
818
+ "type": "string",
819
+ "description": "A text category value."
820
+ },
821
+ {
822
+ "type": "number",
823
+ "description": "A numeric category value."
824
+ }
825
+ ],
826
+ "description": "A category value."
827
+ },
828
+ "description": "Allowed values for the dimension."
829
+ }
830
+ ],
831
+ "description": "Exact value or list of allowed values."
832
+ }
833
+ },
834
+ "title": {
835
+ "description": "The tile's heading. Generated from `y` and `x` when omitted.",
836
+ "type": "string",
837
+ "minLength": 1
838
+ },
839
+ "size": {
840
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
841
+ "type": "string",
842
+ "enum": [
843
+ "s",
844
+ "m",
845
+ "l"
846
+ ]
847
+ },
848
+ "crossfilter": {
849
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
850
+ "type": "boolean"
851
+ }
852
+ },
853
+ "required": [
854
+ "type",
855
+ "x",
856
+ "y"
857
+ ],
858
+ "additionalProperties": false,
859
+ "description": "A line tile. Missing time periods appear as gaps, never as zeros."
860
+ },
861
+ {
862
+ "type": "object",
863
+ "properties": {
864
+ "type": {
865
+ "type": "string",
866
+ "const": "area",
867
+ "description": "Plots filled trends over time, starting at zero."
868
+ },
869
+ "model": {
870
+ "type": "string",
871
+ "minLength": 1,
872
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
873
+ },
874
+ "x": {
875
+ "type": "string",
876
+ "minLength": 1,
877
+ "description": "Date dimension (with optional `@day|week|month|quarter|year`) or category dimension for the horizontal axis."
878
+ },
879
+ "y": {
880
+ "anyOf": [
881
+ {
882
+ "type": "string",
883
+ "minLength": 1,
884
+ "description": "The measure to show."
885
+ },
886
+ {
887
+ "minItems": 1,
888
+ "type": "array",
889
+ "items": {
890
+ "type": "string",
891
+ "minLength": 1,
892
+ "description": "A measure to show."
893
+ },
894
+ "description": "Measures to show as separate series."
895
+ }
896
+ ],
897
+ "description": "A measure name, or a list of measures for multi-series charts."
898
+ },
899
+ "color": {
900
+ "type": "string",
901
+ "minLength": 1,
902
+ "description": "Dimension whose categories split the measure into coloured series."
903
+ },
904
+ "stack": {
905
+ "description": "Stacking mode for multi-series areas: `normal`, `percent`, or `none`.",
906
+ "type": "string",
907
+ "enum": [
908
+ "normal",
909
+ "percent",
910
+ "none"
911
+ ]
912
+ },
913
+ "where": {
914
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
915
+ "type": "object",
916
+ "propertyNames": {
917
+ "type": "string",
918
+ "minLength": 1
919
+ },
920
+ "additionalProperties": {
921
+ "anyOf": [
922
+ {
923
+ "anyOf": [
924
+ {
925
+ "type": "string",
926
+ "description": "A text category value."
927
+ },
928
+ {
929
+ "type": "number",
930
+ "description": "A numeric category value."
931
+ }
932
+ ],
933
+ "description": "A category value."
934
+ },
935
+ {
936
+ "minItems": 1,
937
+ "type": "array",
938
+ "items": {
939
+ "anyOf": [
940
+ {
941
+ "type": "string",
942
+ "description": "A text category value."
943
+ },
944
+ {
945
+ "type": "number",
946
+ "description": "A numeric category value."
947
+ }
948
+ ],
949
+ "description": "A category value."
950
+ },
951
+ "description": "Allowed values for the dimension."
952
+ }
953
+ ],
954
+ "description": "Exact value or list of allowed values."
955
+ }
956
+ },
957
+ "title": {
958
+ "description": "The tile's heading. Generated from `y` and `x` when omitted.",
959
+ "type": "string",
960
+ "minLength": 1
961
+ },
962
+ "size": {
963
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
964
+ "type": "string",
965
+ "enum": [
966
+ "s",
967
+ "m",
968
+ "l"
969
+ ]
970
+ },
971
+ "crossfilter": {
972
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
973
+ "type": "boolean"
974
+ }
975
+ },
976
+ "required": [
977
+ "type",
978
+ "x",
979
+ "y"
980
+ ],
981
+ "additionalProperties": false,
982
+ "description": "An area tile. Areas start at zero, and missing time periods appear as gaps."
983
+ },
984
+ {
985
+ "type": "object",
986
+ "properties": {
987
+ "type": {
988
+ "type": "string",
989
+ "const": "bar",
990
+ "description": "Compares measures across the categories of a dimension."
991
+ },
992
+ "model": {
993
+ "type": "string",
994
+ "minLength": 1,
995
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
996
+ },
997
+ "x": {
998
+ "type": "string",
999
+ "minLength": 1,
1000
+ "description": "The dimension whose categories become the bars (dates may include `@day|week|month|quarter|year`)."
1001
+ },
1002
+ "y": {
1003
+ "anyOf": [
1004
+ {
1005
+ "type": "string",
1006
+ "minLength": 1,
1007
+ "description": "The measure to show."
1008
+ },
1009
+ {
1010
+ "minItems": 1,
1011
+ "type": "array",
1012
+ "items": {
1013
+ "type": "string",
1014
+ "minLength": 1,
1015
+ "description": "A measure to show."
1016
+ },
1017
+ "description": "Measures to show as separate series."
1018
+ }
1019
+ ],
1020
+ "description": "A measure name, or a list of measures for multi-series charts."
1021
+ },
1022
+ "color": {
1023
+ "type": "string",
1024
+ "minLength": 1,
1025
+ "description": "Dimension whose categories split the measure into coloured series."
1026
+ },
1027
+ "sort": {
1028
+ "description": "Sort order: `-y`, `y`, `x`, `-x`, or a measure name with optional leading `-`.",
1029
+ "type": "string",
1030
+ "minLength": 1
1031
+ },
1032
+ "limit": {
1033
+ "description": "Keep the top categories and roll the remainder into \"Other\".",
1034
+ "type": "integer",
1035
+ "minimum": 1,
1036
+ "maximum": 9007199254740991
1037
+ },
1038
+ "stack": {
1039
+ "description": "Stacking mode for multi-series bars: `normal`, `percent`, or `none`.",
1040
+ "type": "string",
1041
+ "enum": [
1042
+ "normal",
1043
+ "percent",
1044
+ "none"
1045
+ ]
1046
+ },
1047
+ "horizontal": {
1048
+ "description": "Set `true` to render horizontal bars.",
1049
+ "type": "boolean"
1050
+ },
1051
+ "where": {
1052
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1053
+ "type": "object",
1054
+ "propertyNames": {
1055
+ "type": "string",
1056
+ "minLength": 1
1057
+ },
1058
+ "additionalProperties": {
1059
+ "anyOf": [
1060
+ {
1061
+ "anyOf": [
1062
+ {
1063
+ "type": "string",
1064
+ "description": "A text category value."
1065
+ },
1066
+ {
1067
+ "type": "number",
1068
+ "description": "A numeric category value."
1069
+ }
1070
+ ],
1071
+ "description": "A category value."
1072
+ },
1073
+ {
1074
+ "minItems": 1,
1075
+ "type": "array",
1076
+ "items": {
1077
+ "anyOf": [
1078
+ {
1079
+ "type": "string",
1080
+ "description": "A text category value."
1081
+ },
1082
+ {
1083
+ "type": "number",
1084
+ "description": "A numeric category value."
1085
+ }
1086
+ ],
1087
+ "description": "A category value."
1088
+ },
1089
+ "description": "Allowed values for the dimension."
1090
+ }
1091
+ ],
1092
+ "description": "Exact value or list of allowed values."
1093
+ }
1094
+ },
1095
+ "title": {
1096
+ "description": "The tile's heading. Generated from `y` and `x` when omitted.",
1097
+ "type": "string",
1098
+ "minLength": 1
1099
+ },
1100
+ "size": {
1101
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1102
+ "type": "string",
1103
+ "enum": [
1104
+ "s",
1105
+ "m",
1106
+ "l"
1107
+ ]
1108
+ },
1109
+ "crossfilter": {
1110
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1111
+ "type": "boolean"
1112
+ }
1113
+ },
1114
+ "required": [
1115
+ "type",
1116
+ "x",
1117
+ "y"
1118
+ ],
1119
+ "additionalProperties": false,
1120
+ "description": "A bar tile. Bars start at zero and are sorted by value, largest first."
1121
+ },
1122
+ {
1123
+ "type": "object",
1124
+ "properties": {
1125
+ "type": {
1126
+ "type": "string",
1127
+ "const": "combo",
1128
+ "description": "Plots bars (`y`, left axis) and lines (`y2`, right axis) together."
1129
+ },
1130
+ "model": {
1131
+ "type": "string",
1132
+ "minLength": 1,
1133
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
1134
+ },
1135
+ "x": {
1136
+ "type": "string",
1137
+ "minLength": 1,
1138
+ "description": "Date dimension (with optional `@day|week|month|quarter|year`) or category dimension for the horizontal axis."
1139
+ },
1140
+ "y": {
1141
+ "anyOf": [
1142
+ {
1143
+ "type": "string",
1144
+ "minLength": 1,
1145
+ "description": "The measure to show."
1146
+ },
1147
+ {
1148
+ "minItems": 1,
1149
+ "type": "array",
1150
+ "items": {
1151
+ "type": "string",
1152
+ "minLength": 1,
1153
+ "description": "A measure to show."
1154
+ },
1155
+ "description": "Measures to show as separate series."
1156
+ }
1157
+ ],
1158
+ "description": "Measure(s) plotted as bars on the left vertical axis."
1159
+ },
1160
+ "y2": {
1161
+ "anyOf": [
1162
+ {
1163
+ "type": "string",
1164
+ "minLength": 1,
1165
+ "description": "The measure to show."
1166
+ },
1167
+ {
1168
+ "minItems": 1,
1169
+ "type": "array",
1170
+ "items": {
1171
+ "type": "string",
1172
+ "minLength": 1,
1173
+ "description": "A measure to show."
1174
+ },
1175
+ "description": "Measures to show as separate series."
1176
+ }
1177
+ ],
1178
+ "description": "Measure(s) plotted as lines on the right vertical axis."
1179
+ },
1180
+ "where": {
1181
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1182
+ "type": "object",
1183
+ "propertyNames": {
1184
+ "type": "string",
1185
+ "minLength": 1
1186
+ },
1187
+ "additionalProperties": {
1188
+ "anyOf": [
1189
+ {
1190
+ "anyOf": [
1191
+ {
1192
+ "type": "string",
1193
+ "description": "A text category value."
1194
+ },
1195
+ {
1196
+ "type": "number",
1197
+ "description": "A numeric category value."
1198
+ }
1199
+ ],
1200
+ "description": "A category value."
1201
+ },
1202
+ {
1203
+ "minItems": 1,
1204
+ "type": "array",
1205
+ "items": {
1206
+ "anyOf": [
1207
+ {
1208
+ "type": "string",
1209
+ "description": "A text category value."
1210
+ },
1211
+ {
1212
+ "type": "number",
1213
+ "description": "A numeric category value."
1214
+ }
1215
+ ],
1216
+ "description": "A category value."
1217
+ },
1218
+ "description": "Allowed values for the dimension."
1219
+ }
1220
+ ],
1221
+ "description": "Exact value or list of allowed values."
1222
+ }
1223
+ },
1224
+ "title": {
1225
+ "description": "The tile's heading. Generated from `y`, `y2` and `x` when omitted.",
1226
+ "type": "string",
1227
+ "minLength": 1
1228
+ },
1229
+ "size": {
1230
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1231
+ "type": "string",
1232
+ "enum": [
1233
+ "s",
1234
+ "m",
1235
+ "l"
1236
+ ]
1237
+ },
1238
+ "crossfilter": {
1239
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1240
+ "type": "boolean"
1241
+ }
1242
+ },
1243
+ "required": [
1244
+ "type",
1245
+ "x",
1246
+ "y",
1247
+ "y2"
1248
+ ],
1249
+ "additionalProperties": false,
1250
+ "description": "A combo chart tile pairing bars and lines on dual axes."
1251
+ },
1252
+ {
1253
+ "type": "object",
1254
+ "properties": {
1255
+ "type": {
1256
+ "type": "string",
1257
+ "const": "scatter",
1258
+ "description": "Plots two measures against each other, one point per member of `by`."
1259
+ },
1260
+ "model": {
1261
+ "type": "string",
1262
+ "minLength": 1,
1263
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
1264
+ },
1265
+ "by": {
1266
+ "type": "string",
1267
+ "minLength": 1,
1268
+ "description": "Dimension whose members become the plotted points (such as `customer`)."
1269
+ },
1270
+ "x": {
1271
+ "type": "string",
1272
+ "minLength": 1,
1273
+ "description": "Measure plotted along the horizontal axis."
1274
+ },
1275
+ "y": {
1276
+ "type": "string",
1277
+ "minLength": 1,
1278
+ "description": "Measure plotted along the vertical axis."
1279
+ },
1280
+ "size": {
1281
+ "type": "string",
1282
+ "minLength": 1,
1283
+ "description": "Optional measure scaling point area."
1284
+ },
1285
+ "color": {
1286
+ "type": "string",
1287
+ "minLength": 1,
1288
+ "description": "Optional dimension splitting points into coloured series."
1289
+ },
1290
+ "where": {
1291
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1292
+ "type": "object",
1293
+ "propertyNames": {
1294
+ "type": "string",
1295
+ "minLength": 1
1296
+ },
1297
+ "additionalProperties": {
1298
+ "anyOf": [
1299
+ {
1300
+ "anyOf": [
1301
+ {
1302
+ "type": "string",
1303
+ "description": "A text category value."
1304
+ },
1305
+ {
1306
+ "type": "number",
1307
+ "description": "A numeric category value."
1308
+ }
1309
+ ],
1310
+ "description": "A category value."
1311
+ },
1312
+ {
1313
+ "minItems": 1,
1314
+ "type": "array",
1315
+ "items": {
1316
+ "anyOf": [
1317
+ {
1318
+ "type": "string",
1319
+ "description": "A text category value."
1320
+ },
1321
+ {
1322
+ "type": "number",
1323
+ "description": "A numeric category value."
1324
+ }
1325
+ ],
1326
+ "description": "A category value."
1327
+ },
1328
+ "description": "Allowed values for the dimension."
1329
+ }
1330
+ ],
1331
+ "description": "Exact value or list of allowed values."
1332
+ }
1333
+ },
1334
+ "title": {
1335
+ "description": "The tile's heading. Generated from `y`, `x` and `by` when omitted.",
1336
+ "type": "string",
1337
+ "minLength": 1
1338
+ },
1339
+ "crossfilter": {
1340
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1341
+ "type": "boolean"
1342
+ }
1343
+ },
1344
+ "required": [
1345
+ "type",
1346
+ "by",
1347
+ "x",
1348
+ "y"
1349
+ ],
1350
+ "additionalProperties": false,
1351
+ "description": "A scatter plot tile comparing two measures across entities."
1352
+ },
1353
+ {
1354
+ "type": "object",
1355
+ "properties": {
1356
+ "type": {
1357
+ "type": "string",
1358
+ "const": "donut",
1359
+ "description": "Shows part-to-whole shares across up to 6 slices of one dimension."
1360
+ },
1361
+ "model": {
1362
+ "type": "string",
1363
+ "minLength": 1,
1364
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
1365
+ },
1366
+ "by": {
1367
+ "type": "string",
1368
+ "minLength": 1,
1369
+ "description": "Dimension whose categories become the donut slices (dates may include `@day|week|month|quarter|year`)."
1370
+ },
1371
+ "value": {
1372
+ "type": "string",
1373
+ "minLength": 1,
1374
+ "description": "Measure determining each slice's size."
1375
+ },
1376
+ "where": {
1377
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1378
+ "type": "object",
1379
+ "propertyNames": {
1380
+ "type": "string",
1381
+ "minLength": 1
1382
+ },
1383
+ "additionalProperties": {
1384
+ "anyOf": [
1385
+ {
1386
+ "anyOf": [
1387
+ {
1388
+ "type": "string",
1389
+ "description": "A text category value."
1390
+ },
1391
+ {
1392
+ "type": "number",
1393
+ "description": "A numeric category value."
1394
+ }
1395
+ ],
1396
+ "description": "A category value."
1397
+ },
1398
+ {
1399
+ "minItems": 1,
1400
+ "type": "array",
1401
+ "items": {
1402
+ "anyOf": [
1403
+ {
1404
+ "type": "string",
1405
+ "description": "A text category value."
1406
+ },
1407
+ {
1408
+ "type": "number",
1409
+ "description": "A numeric category value."
1410
+ }
1411
+ ],
1412
+ "description": "A category value."
1413
+ },
1414
+ "description": "Allowed values for the dimension."
1415
+ }
1416
+ ],
1417
+ "description": "Exact value or list of allowed values."
1418
+ }
1419
+ },
1420
+ "title": {
1421
+ "description": "The tile's heading. Generated from `value` and `by` when omitted.",
1422
+ "type": "string",
1423
+ "minLength": 1
1424
+ },
1425
+ "size": {
1426
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1427
+ "type": "string",
1428
+ "enum": [
1429
+ "s",
1430
+ "m",
1431
+ "l"
1432
+ ]
1433
+ },
1434
+ "crossfilter": {
1435
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1436
+ "type": "boolean"
1437
+ }
1438
+ },
1439
+ "required": [
1440
+ "type",
1441
+ "by",
1442
+ "value"
1443
+ ],
1444
+ "additionalProperties": false,
1445
+ "description": "A donut chart tile capped at 6 slices."
1446
+ },
1447
+ {
1448
+ "type": "object",
1449
+ "properties": {
1450
+ "type": {
1451
+ "type": "string",
1452
+ "const": "heatmap",
1453
+ "description": "Shows one measure as colour across pairs of `x` and `y` categories."
1454
+ },
1455
+ "model": {
1456
+ "type": "string",
1457
+ "minLength": 1,
1458
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
1459
+ },
1460
+ "x": {
1461
+ "type": "string",
1462
+ "minLength": 1,
1463
+ "description": "Dimension along the horizontal axis (dates may include `@day|week|month|quarter|year`)."
1464
+ },
1465
+ "y": {
1466
+ "type": "string",
1467
+ "minLength": 1,
1468
+ "description": "Dimension along the vertical axis (dates may include `@day|week|month|quarter|year`)."
1469
+ },
1470
+ "color": {
1471
+ "type": "string",
1472
+ "minLength": 1,
1473
+ "description": "Measure encoded as cell colour intensity."
1474
+ },
1475
+ "where": {
1476
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1477
+ "type": "object",
1478
+ "propertyNames": {
1479
+ "type": "string",
1480
+ "minLength": 1
1481
+ },
1482
+ "additionalProperties": {
1483
+ "anyOf": [
1484
+ {
1485
+ "anyOf": [
1486
+ {
1487
+ "type": "string",
1488
+ "description": "A text category value."
1489
+ },
1490
+ {
1491
+ "type": "number",
1492
+ "description": "A numeric category value."
1493
+ }
1494
+ ],
1495
+ "description": "A category value."
1496
+ },
1497
+ {
1498
+ "minItems": 1,
1499
+ "type": "array",
1500
+ "items": {
1501
+ "anyOf": [
1502
+ {
1503
+ "type": "string",
1504
+ "description": "A text category value."
1505
+ },
1506
+ {
1507
+ "type": "number",
1508
+ "description": "A numeric category value."
1509
+ }
1510
+ ],
1511
+ "description": "A category value."
1512
+ },
1513
+ "description": "Allowed values for the dimension."
1514
+ }
1515
+ ],
1516
+ "description": "Exact value or list of allowed values."
1517
+ }
1518
+ },
1519
+ "title": {
1520
+ "description": "The tile's heading. Generated from `color`, `x` and `y` when omitted.",
1521
+ "type": "string",
1522
+ "minLength": 1
1523
+ },
1524
+ "size": {
1525
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1526
+ "type": "string",
1527
+ "enum": [
1528
+ "s",
1529
+ "m",
1530
+ "l"
1531
+ ]
1532
+ },
1533
+ "crossfilter": {
1534
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1535
+ "type": "boolean"
1536
+ }
1537
+ },
1538
+ "required": [
1539
+ "type",
1540
+ "x",
1541
+ "y",
1542
+ "color"
1543
+ ],
1544
+ "additionalProperties": false,
1545
+ "description": "A heatmap tile comparing one measure across two category dimensions."
1546
+ },
1547
+ {
1548
+ "type": "object",
1549
+ "properties": {
1550
+ "type": {
1551
+ "type": "string",
1552
+ "const": "table",
1553
+ "description": "Shows sortable detail rows across dimensions and measures."
1554
+ },
1555
+ "model": {
1556
+ "type": "string",
1557
+ "minLength": 1,
1558
+ "description": "The model whose dimensions and measures the tile shows. Required when the dashboard has more than one model."
1559
+ },
1560
+ "columns": {
1561
+ "minItems": 1,
1562
+ "type": "array",
1563
+ "items": {
1564
+ "anyOf": [
1565
+ {
1566
+ "type": "string",
1567
+ "minLength": 1,
1568
+ "description": "Dimension (with optional `@day|week|month|quarter|year`) or measure to show."
1569
+ },
1570
+ {
1571
+ "type": "object",
1572
+ "properties": {
1573
+ "field": {
1574
+ "type": "string",
1575
+ "minLength": 1,
1576
+ "description": "Dimension (with optional `@day|week|month|quarter|year`) or measure to show."
1577
+ },
1578
+ "label": {
1579
+ "description": "Custom column header label.",
1580
+ "type": "string",
1581
+ "minLength": 1
1582
+ },
1583
+ "bar": {
1584
+ "description": "Set `true` on a measure column to render an inline proportional bar.",
1585
+ "type": "boolean"
1586
+ },
1587
+ "color": {
1588
+ "description": "Conditional colour shading for a measure column: `scale`, `diverging`, `positive`, or `negative`.",
1589
+ "type": "string",
1590
+ "enum": [
1591
+ "scale",
1592
+ "diverging",
1593
+ "positive",
1594
+ "negative"
1595
+ ]
1596
+ }
1597
+ },
1598
+ "required": [
1599
+ "field"
1600
+ ],
1601
+ "additionalProperties": false,
1602
+ "description": "A table column with display options."
1603
+ }
1604
+ ],
1605
+ "description": "A field name or column configuration mapping."
1606
+ },
1607
+ "description": "Columns to display, mixing dimensions and measures in order."
1608
+ },
1609
+ "sort": {
1610
+ "description": "Default sort column name with optional leading `-` for descending order.",
1611
+ "type": "string",
1612
+ "minLength": 1
1613
+ },
1614
+ "limit": {
1615
+ "description": "Maximum number of rows to display.",
1616
+ "type": "integer",
1617
+ "minimum": 1,
1618
+ "maximum": 9007199254740991
1619
+ },
1620
+ "where": {
1621
+ "description": "Per-tile equality filter mapping dimension names to exact value(s).",
1622
+ "type": "object",
1623
+ "propertyNames": {
1624
+ "type": "string",
1625
+ "minLength": 1
1626
+ },
1627
+ "additionalProperties": {
1628
+ "anyOf": [
1629
+ {
1630
+ "anyOf": [
1631
+ {
1632
+ "type": "string",
1633
+ "description": "A text category value."
1634
+ },
1635
+ {
1636
+ "type": "number",
1637
+ "description": "A numeric category value."
1638
+ }
1639
+ ],
1640
+ "description": "A category value."
1641
+ },
1642
+ {
1643
+ "minItems": 1,
1644
+ "type": "array",
1645
+ "items": {
1646
+ "anyOf": [
1647
+ {
1648
+ "type": "string",
1649
+ "description": "A text category value."
1650
+ },
1651
+ {
1652
+ "type": "number",
1653
+ "description": "A numeric category value."
1654
+ }
1655
+ ],
1656
+ "description": "A category value."
1657
+ },
1658
+ "description": "Allowed values for the dimension."
1659
+ }
1660
+ ],
1661
+ "description": "Exact value or list of allowed values."
1662
+ }
1663
+ },
1664
+ "title": {
1665
+ "description": "The tile's heading. Generated from the columns when omitted.",
1666
+ "type": "string",
1667
+ "minLength": 1
1668
+ },
1669
+ "size": {
1670
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1671
+ "type": "string",
1672
+ "enum": [
1673
+ "s",
1674
+ "m",
1675
+ "l"
1676
+ ]
1677
+ },
1678
+ "crossfilter": {
1679
+ "description": "Set to `false` to opt this tile out of emitting and receiving cross-filter selections.",
1680
+ "type": "boolean"
1681
+ }
1682
+ },
1683
+ "required": [
1684
+ "type",
1685
+ "columns"
1686
+ ],
1687
+ "additionalProperties": false,
1688
+ "description": "A tabular data tile with header sorting and row cross-filtering."
1689
+ },
1690
+ {
1691
+ "type": "object",
1692
+ "properties": {
1693
+ "type": {
1694
+ "type": "string",
1695
+ "const": "text",
1696
+ "description": "Renders sanitised markdown for notes, caveats and section headings."
1697
+ },
1698
+ "md": {
1699
+ "type": "string",
1700
+ "minLength": 1,
1701
+ "description": "Markdown content. Raw HTML is escaped and remote images are stripped."
1702
+ },
1703
+ "title": {
1704
+ "description": "Optional heading displayed above the note.",
1705
+ "type": "string",
1706
+ "minLength": 1
1707
+ },
1708
+ "size": {
1709
+ "description": "Tile height override: `s` (compact), `m` (standard), or `l` (tall).",
1710
+ "type": "string",
1711
+ "enum": [
1712
+ "s",
1713
+ "m",
1714
+ "l"
1715
+ ]
1716
+ }
1717
+ },
1718
+ "required": [
1719
+ "type",
1720
+ "md"
1721
+ ],
1722
+ "additionalProperties": false,
1723
+ "description": "A markdown text tile."
1724
+ }
1725
+ ],
1726
+ "description": "One visual unit of the dashboard."
1727
+ },
1728
+ "description": "Tiles, by tile ID."
1729
+ },
1730
+ "layout": {
1731
+ "type": "array",
1732
+ "items": {
1733
+ "minItems": 1,
1734
+ "type": "array",
1735
+ "items": {
1736
+ "type": "string",
1737
+ "pattern": "^([A-Za-z_][A-Za-z0-9_]*)(?::([1-9]|1[0-2]))?$",
1738
+ "description": "A tile ID, with an optional `:span` from 1 to 12."
1739
+ },
1740
+ "description": "One row of tiles. Tiles without a span share the remaining width."
1741
+ },
1742
+ "description": "Rows of tiles on a 12-column grid. Place every tile exactly once."
1743
+ },
1744
+ "theme": {
1745
+ "type": "object",
1746
+ "properties": {
1747
+ "mode": {
1748
+ "description": "Colour scheme mode: `auto` (follows the OS setting), `light`, or `dark`.",
1749
+ "type": "string",
1750
+ "enum": [
1751
+ "auto",
1752
+ "light",
1753
+ "dark"
1754
+ ]
1755
+ },
1756
+ "accent": {
1757
+ "description": "6-digit hex accent colour used for highlights, single-series marks and palette.",
1758
+ "type": "string",
1759
+ "pattern": "^#[0-9a-fA-F]{6}$"
1760
+ },
1761
+ "density": {
1762
+ "description": "Spacing density: `comfortable` (default) or `compact`.",
1763
+ "type": "string",
1764
+ "enum": [
1765
+ "compact",
1766
+ "comfortable"
1767
+ ]
1768
+ }
1769
+ },
1770
+ "additionalProperties": false,
1771
+ "description": "Visual theme options: colour mode, accent colour and spacing density."
1772
+ }
1773
+ },
1774
+ "required": [
1775
+ "dash",
1776
+ "title",
1777
+ "sources",
1778
+ "models",
1779
+ "tiles",
1780
+ "layout"
1781
+ ],
1782
+ "additionalProperties": false,
1783
+ "description": "A flatbi dashboard spec."
1784
+ }