@lightdash/common 2.495.2 → 2.496.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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +13 -13
- package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts +30 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/mcpDocumentContent.js +3 -3
- package/dist/cjs/ee/AiAgent/schemas/tools/mcpDocumentContent.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts +19 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js +109 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts +74 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolCreateContentArgs.js +27 -2
- package/dist/cjs/ee/AiAgent/schemas/tools/toolCreateContentArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +60 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js +3 -3
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts +3 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditContentArgs.js +2 -2
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditContentArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +13 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js +6 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/utils.d.ts +12 -12
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts +9307 -0
- package/dist/cjs/schemas/chartAsCodeSchema.d.ts.map +1 -0
- package/dist/cjs/schemas/chartAsCodeSchema.js +23 -0
- package/dist/cjs/schemas/chartAsCodeSchema.js.map +1 -0
- package/dist/cjs/schemas/generateChartAsCodeSchema.d.ts +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/cjs/schemas/generateChartAsCodeSchema.js +77 -24
- package/dist/cjs/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/cjs/schemas/json/chart-as-code-1.0.json +965 -280
- package/dist/cjs/schemas/json/mcp-tools-1.0.json +80 -3
- package/dist/cjs/utils/document.d.ts.map +1 -1
- package/dist/cjs/utils/document.js +9 -8
- package/dist/cjs/utils/document.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +12 -12
- package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts +30 -0
- package/dist/esm/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/mcpDocumentContent.js +3 -3
- package/dist/esm/ee/AiAgent/schemas/tools/mcpDocumentContent.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts +19 -0
- package/dist/esm/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js +98 -0
- package/dist/esm/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts +74 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolCreateContentArgs.js +26 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolCreateContentArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +60 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js +3 -3
- package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts +3 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditContentArgs.js +2 -2
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditContentArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +13 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js +6 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/utils.d.ts +25 -25
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas/chartAsCodeSchema.d.ts +9307 -0
- package/dist/esm/schemas/chartAsCodeSchema.d.ts.map +1 -0
- package/dist/esm/schemas/chartAsCodeSchema.js +18 -0
- package/dist/esm/schemas/chartAsCodeSchema.js.map +1 -0
- package/dist/esm/schemas/generateChartAsCodeSchema.d.ts +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/esm/schemas/generateChartAsCodeSchema.js +77 -24
- package/dist/esm/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/esm/schemas/json/chart-as-code-1.0.json +965 -280
- package/dist/esm/schemas/json/mcp-tools-1.0.json +80 -3
- package/dist/esm/utils/document.d.ts.map +1 -1
- package/dist/esm/utils/document.js +9 -8
- package/dist/esm/utils/document.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +12 -12
- package/dist/types/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts +30 -0
- package/dist/types/ee/AiAgent/schemas/tools/mcpDocumentContent.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/mcpDocumentContent.js +3 -3
- package/dist/types/ee/AiAgent/schemas/tools/mcpDocumentContent.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts +19 -0
- package/dist/types/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.d.ts.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js +98 -0
- package/dist/types/ee/AiAgent/schemas/tools/sqlApprovalToolCalls.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts +74 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolCreateContentArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolCreateContentArgs.js +26 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolCreateContentArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +60 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js +3 -3
- package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts +3 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolEditContentArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditContentArgs.js +2 -2
- package/dist/types/ee/AiAgent/schemas/tools/toolEditContentArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +13 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js +6 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/utils.d.ts +25 -25
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/schemas/chartAsCodeSchema.d.ts +9307 -0
- package/dist/types/schemas/chartAsCodeSchema.d.ts.map +1 -0
- package/dist/types/schemas/chartAsCodeSchema.js +18 -0
- package/dist/types/schemas/chartAsCodeSchema.js.map +1 -0
- package/dist/types/schemas/generateChartAsCodeSchema.d.ts +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.d.ts.map +1 -1
- package/dist/types/schemas/generateChartAsCodeSchema.js +77 -24
- package/dist/types/schemas/generateChartAsCodeSchema.js.map +1 -1
- package/dist/types/schemas/json/chart-as-code-1.0.json +965 -280
- package/dist/types/schemas/json/mcp-tools-1.0.json +80 -3
- package/dist/types/utils/document.d.ts.map +1 -1
- package/dist/types/utils/document.js +9 -8
- package/dist/types/utils/document.js.map +1 -1
- package/package.json +1 -1
|
@@ -120,6 +120,25 @@
|
|
|
120
120
|
"required": ["type", "sql", "table", "name"],
|
|
121
121
|
"type": "object"
|
|
122
122
|
},
|
|
123
|
+
"AllVizChartConfig": {
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{
|
|
126
|
+
"$ref": "#/$defs/VizBarChartConfig"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/$defs/VizLineChartConfig"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"$ref": "#/$defs/VizPieChartConfig"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"$ref": "#/$defs/VizBigNumberConfig"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"$ref": "#/$defs/VizTableConfig"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
123
142
|
"AndFilterGroup": {
|
|
124
143
|
"properties": {
|
|
125
144
|
"and": {
|
|
@@ -194,6 +213,10 @@
|
|
|
194
213
|
},
|
|
195
214
|
"type": "object"
|
|
196
215
|
},
|
|
216
|
+
"AxisSide": {
|
|
217
|
+
"enum": [0, 1],
|
|
218
|
+
"type": "number"
|
|
219
|
+
},
|
|
197
220
|
"BaseFilterRule_FilterOperator.number-or-string_": {
|
|
198
221
|
"properties": {
|
|
199
222
|
"id": {
|
|
@@ -424,6 +447,113 @@
|
|
|
424
447
|
"required": ["type"],
|
|
425
448
|
"type": "object"
|
|
426
449
|
},
|
|
450
|
+
"CartesianChartDisplay": {
|
|
451
|
+
"properties": {
|
|
452
|
+
"legend": {
|
|
453
|
+
"properties": {
|
|
454
|
+
"align": {
|
|
455
|
+
"enum": ["start", "center", "end"],
|
|
456
|
+
"type": "string"
|
|
457
|
+
},
|
|
458
|
+
"position": {
|
|
459
|
+
"enum": ["top", "bottom", "left", "right"],
|
|
460
|
+
"type": "string"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"required": ["align", "position"],
|
|
464
|
+
"type": "object"
|
|
465
|
+
},
|
|
466
|
+
"series": {
|
|
467
|
+
"additionalProperties": {
|
|
468
|
+
"properties": {
|
|
469
|
+
"color": {
|
|
470
|
+
"type": "string"
|
|
471
|
+
},
|
|
472
|
+
"format": {
|
|
473
|
+
"$ref": "#/$defs/Format"
|
|
474
|
+
},
|
|
475
|
+
"label": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
},
|
|
478
|
+
"type": {
|
|
479
|
+
"anyOf": [
|
|
480
|
+
{
|
|
481
|
+
"$ref": "#/$defs/CartesianSeriesType.LINE"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"$ref": "#/$defs/CartesianSeriesType.BAR"
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
},
|
|
488
|
+
"valueLabelColor": {
|
|
489
|
+
"type": "string"
|
|
490
|
+
},
|
|
491
|
+
"valueLabelPosition": {
|
|
492
|
+
"$ref": "#/$defs/ValueLabelPositionOptions"
|
|
493
|
+
},
|
|
494
|
+
"whichYAxis": {
|
|
495
|
+
"$ref": "#/$defs/AxisSide"
|
|
496
|
+
},
|
|
497
|
+
"yAxisIndex": {
|
|
498
|
+
"format": "double",
|
|
499
|
+
"type": "number"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"type": "object"
|
|
503
|
+
},
|
|
504
|
+
"properties": {},
|
|
505
|
+
"type": "object"
|
|
506
|
+
},
|
|
507
|
+
"seriesOrder": {
|
|
508
|
+
"items": {
|
|
509
|
+
"type": "string"
|
|
510
|
+
},
|
|
511
|
+
"type": "array"
|
|
512
|
+
},
|
|
513
|
+
"stack": {
|
|
514
|
+
"anyOf": [
|
|
515
|
+
{
|
|
516
|
+
"type": "boolean"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"$ref": "#/$defs/StackType"
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
"xAxis": {
|
|
524
|
+
"properties": {
|
|
525
|
+
"dateFormat": {
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
"label": {
|
|
529
|
+
"type": "string"
|
|
530
|
+
},
|
|
531
|
+
"type": {
|
|
532
|
+
"$ref": "#/$defs/VizIndexType"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"type": "object"
|
|
536
|
+
},
|
|
537
|
+
"yAxis": {
|
|
538
|
+
"items": {
|
|
539
|
+
"properties": {
|
|
540
|
+
"format": {
|
|
541
|
+
"$ref": "#/$defs/Format"
|
|
542
|
+
},
|
|
543
|
+
"label": {
|
|
544
|
+
"type": "string"
|
|
545
|
+
},
|
|
546
|
+
"position": {
|
|
547
|
+
"type": "string"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"type": "object"
|
|
551
|
+
},
|
|
552
|
+
"type": "array"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"type": "object"
|
|
556
|
+
},
|
|
427
557
|
"CartesianChartLayout": {
|
|
428
558
|
"$ref": "#/$defs/Partial_CompleteCartesianChartLayout_"
|
|
429
559
|
},
|
|
@@ -431,6 +561,337 @@
|
|
|
431
561
|
"enum": ["line", "bar", "scatter", "area"],
|
|
432
562
|
"type": "string"
|
|
433
563
|
},
|
|
564
|
+
"CartesianSeriesType.BAR": {
|
|
565
|
+
"enum": ["bar"],
|
|
566
|
+
"type": "string"
|
|
567
|
+
},
|
|
568
|
+
"CartesianSeriesType.LINE": {
|
|
569
|
+
"enum": ["line"],
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
"ChartAsCode": {
|
|
573
|
+
"additionalProperties": false,
|
|
574
|
+
"description": "A semantic layer chart: queries an explore with tableName and metricQuery",
|
|
575
|
+
"properties": {
|
|
576
|
+
"access": {
|
|
577
|
+
"$ref": "#/$defs/ContentAsCodeDirectAccess",
|
|
578
|
+
"description": "Direct user/group grants on this chart. Only independently saved charts\ncarry one — dashboard-owned chart definitions are not grantable.\nOmission leaves the existing policy unchanged on upload."
|
|
579
|
+
},
|
|
580
|
+
"chartConfig": {
|
|
581
|
+
"discriminator": {
|
|
582
|
+
"propertyName": "type"
|
|
583
|
+
},
|
|
584
|
+
"oneOf": [
|
|
585
|
+
{
|
|
586
|
+
"properties": {
|
|
587
|
+
"config": {
|
|
588
|
+
"$ref": "#/$defs/BigNumber",
|
|
589
|
+
"description": "Chart-type-specific configuration"
|
|
590
|
+
},
|
|
591
|
+
"type": {
|
|
592
|
+
"const": "big_number",
|
|
593
|
+
"description": "Type of chart visualization"
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
"required": ["type"],
|
|
597
|
+
"type": "object"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"properties": {
|
|
601
|
+
"config": {
|
|
602
|
+
"$ref": "#/$defs/CartesianChart",
|
|
603
|
+
"description": "Chart-type-specific configuration"
|
|
604
|
+
},
|
|
605
|
+
"type": {
|
|
606
|
+
"const": "cartesian",
|
|
607
|
+
"description": "Type of chart visualization"
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
"required": ["type"],
|
|
611
|
+
"type": "object"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"properties": {
|
|
615
|
+
"config": {
|
|
616
|
+
"$ref": "#/$defs/CustomVis",
|
|
617
|
+
"description": "Chart-type-specific configuration"
|
|
618
|
+
},
|
|
619
|
+
"type": {
|
|
620
|
+
"const": "custom",
|
|
621
|
+
"description": "Type of chart visualization"
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"required": ["type"],
|
|
625
|
+
"type": "object"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"properties": {
|
|
629
|
+
"config": {
|
|
630
|
+
"$ref": "#/$defs/PieChart",
|
|
631
|
+
"description": "Chart-type-specific configuration"
|
|
632
|
+
},
|
|
633
|
+
"type": {
|
|
634
|
+
"const": "pie",
|
|
635
|
+
"description": "Type of chart visualization"
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"required": ["type"],
|
|
639
|
+
"type": "object"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"properties": {
|
|
643
|
+
"config": {
|
|
644
|
+
"$ref": "#/$defs/FunnelChart",
|
|
645
|
+
"description": "Chart-type-specific configuration"
|
|
646
|
+
},
|
|
647
|
+
"type": {
|
|
648
|
+
"const": "funnel",
|
|
649
|
+
"description": "Type of chart visualization"
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"required": ["type"],
|
|
653
|
+
"type": "object"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"properties": {
|
|
657
|
+
"config": {
|
|
658
|
+
"$ref": "#/$defs/TableChart",
|
|
659
|
+
"description": "Chart-type-specific configuration"
|
|
660
|
+
},
|
|
661
|
+
"type": {
|
|
662
|
+
"const": "table",
|
|
663
|
+
"description": "Type of chart visualization"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"required": ["type"],
|
|
667
|
+
"type": "object"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"properties": {
|
|
671
|
+
"config": {
|
|
672
|
+
"$ref": "#/$defs/TreemapChart",
|
|
673
|
+
"description": "Chart-type-specific configuration"
|
|
674
|
+
},
|
|
675
|
+
"type": {
|
|
676
|
+
"const": "treemap",
|
|
677
|
+
"description": "Type of chart visualization"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"required": ["type"],
|
|
681
|
+
"type": "object"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"properties": {
|
|
685
|
+
"config": {
|
|
686
|
+
"$ref": "#/$defs/GaugeChart",
|
|
687
|
+
"description": "Chart-type-specific configuration"
|
|
688
|
+
},
|
|
689
|
+
"type": {
|
|
690
|
+
"const": "gauge",
|
|
691
|
+
"description": "Type of chart visualization"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"required": ["type"],
|
|
695
|
+
"type": "object"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"properties": {
|
|
699
|
+
"config": {
|
|
700
|
+
"$ref": "#/$defs/MapChart",
|
|
701
|
+
"description": "Chart-type-specific configuration"
|
|
702
|
+
},
|
|
703
|
+
"type": {
|
|
704
|
+
"const": "map",
|
|
705
|
+
"description": "Type of chart visualization"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"required": ["type"],
|
|
709
|
+
"type": "object"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"properties": {
|
|
713
|
+
"config": {
|
|
714
|
+
"$ref": "#/$defs/SankeyChart",
|
|
715
|
+
"description": "Chart-type-specific configuration"
|
|
716
|
+
},
|
|
717
|
+
"type": {
|
|
718
|
+
"const": "sankey",
|
|
719
|
+
"description": "Type of chart visualization"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"required": ["type"],
|
|
723
|
+
"type": "object"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"properties": {
|
|
727
|
+
"config": {
|
|
728
|
+
"$ref": "#/$defs/DataAppVizChartAsCode"
|
|
729
|
+
},
|
|
730
|
+
"type": {
|
|
731
|
+
"const": "data_app_viz"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"required": ["type"],
|
|
735
|
+
"type": "object"
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
"type": "object"
|
|
739
|
+
},
|
|
740
|
+
"contentType": {
|
|
741
|
+
"$ref": "#/$defs/ContentAsCodeType.CHART",
|
|
742
|
+
"description": "Content type discriminator"
|
|
743
|
+
},
|
|
744
|
+
"dashboardSlug": {
|
|
745
|
+
"description": "Slug of the dashboard this chart belongs to (if any)",
|
|
746
|
+
"oneOf": [
|
|
747
|
+
{
|
|
748
|
+
"pattern": "^[a-z0-9-]+$",
|
|
749
|
+
"type": "string"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"type": "null"
|
|
753
|
+
}
|
|
754
|
+
]
|
|
755
|
+
},
|
|
756
|
+
"description": {
|
|
757
|
+
"description": "Optional description of what this chart displays",
|
|
758
|
+
"type": "string"
|
|
759
|
+
},
|
|
760
|
+
"downloadedAt": {
|
|
761
|
+
"description": "Timestamp when this chart was downloaded from Lightdash",
|
|
762
|
+
"format": "date-time",
|
|
763
|
+
"type": "string"
|
|
764
|
+
},
|
|
765
|
+
"merge": {
|
|
766
|
+
"anyOf": [
|
|
767
|
+
{
|
|
768
|
+
"anyOf": [
|
|
769
|
+
{
|
|
770
|
+
"$ref": "#/$defs/SavedMergeDefinition"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"$ref": "#/$defs/SavedMergeQuery"
|
|
774
|
+
}
|
|
775
|
+
]
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"type": "null"
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
"metricQuery": {
|
|
783
|
+
"allOf": [
|
|
784
|
+
{
|
|
785
|
+
"$ref": "#/$defs/Omit_MetricQuery.filters_"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"properties": {
|
|
789
|
+
"filters": {
|
|
790
|
+
"$ref": "#/$defs/FiltersInput"
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"required": ["filters"],
|
|
794
|
+
"type": "object"
|
|
795
|
+
}
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
"name": {
|
|
799
|
+
"description": "Display name of the chart",
|
|
800
|
+
"type": "string"
|
|
801
|
+
},
|
|
802
|
+
"parameters": {
|
|
803
|
+
"$ref": "#/$defs/ParametersValuesMap",
|
|
804
|
+
"description": "Parameter values for the chart query"
|
|
805
|
+
},
|
|
806
|
+
"pivotConfig": {
|
|
807
|
+
"description": "Pivot table configuration",
|
|
808
|
+
"properties": {
|
|
809
|
+
"columns": {
|
|
810
|
+
"description": "Fields to use as pivot columns",
|
|
811
|
+
"items": {
|
|
812
|
+
"type": "string"
|
|
813
|
+
},
|
|
814
|
+
"type": "array"
|
|
815
|
+
},
|
|
816
|
+
"rows": {
|
|
817
|
+
"description": "Ordered fields to render on the pivot row axis",
|
|
818
|
+
"items": {
|
|
819
|
+
"type": "string"
|
|
820
|
+
},
|
|
821
|
+
"type": "array"
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"required": ["columns"],
|
|
825
|
+
"type": "object"
|
|
826
|
+
},
|
|
827
|
+
"slug": {
|
|
828
|
+
"description": "Unique identifier slug for this chart",
|
|
829
|
+
"type": "string"
|
|
830
|
+
},
|
|
831
|
+
"spaceSlug": {
|
|
832
|
+
"description": "Slug of the space containing this chart",
|
|
833
|
+
"type": "string"
|
|
834
|
+
},
|
|
835
|
+
"tableConfig": {
|
|
836
|
+
"description": "Table configuration. Defaults to empty column order if omitted.",
|
|
837
|
+
"properties": {
|
|
838
|
+
"columnOrder": {
|
|
839
|
+
"description": "Order of columns in table view",
|
|
840
|
+
"items": {
|
|
841
|
+
"type": "string"
|
|
842
|
+
},
|
|
843
|
+
"type": "array"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"required": ["columnOrder"],
|
|
847
|
+
"type": "object"
|
|
848
|
+
},
|
|
849
|
+
"tableName": {
|
|
850
|
+
"description": "The explore/table name this chart queries from",
|
|
851
|
+
"type": "string"
|
|
852
|
+
},
|
|
853
|
+
"updatedAt": {
|
|
854
|
+
"description": "Not modifiable by user, but useful to know if it has been updated. Defaults to now if omitted.",
|
|
855
|
+
"format": "date-time",
|
|
856
|
+
"type": "string"
|
|
857
|
+
},
|
|
858
|
+
"verification": {
|
|
859
|
+
"anyOf": [
|
|
860
|
+
{
|
|
861
|
+
"allOf": [
|
|
862
|
+
{
|
|
863
|
+
"$ref": "#/$defs/ContentVerificationInfo"
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
"description": "Detailed verification info (who/when). Read-only; ignored on upload."
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"type": "null"
|
|
870
|
+
}
|
|
871
|
+
]
|
|
872
|
+
},
|
|
873
|
+
"verified": {
|
|
874
|
+
"description": "Declarative verification state.\n`true` verifies the chart on upload, `false` unverifies it, `undefined` leaves the\ncurrent state untouched. Download sets this to `true` when the chart is verified.",
|
|
875
|
+
"type": "boolean"
|
|
876
|
+
},
|
|
877
|
+
"version": {
|
|
878
|
+
"const": 1,
|
|
879
|
+
"description": "Schema version for this chart configuration",
|
|
880
|
+
"format": "double",
|
|
881
|
+
"type": "number"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"required": [
|
|
885
|
+
"name",
|
|
886
|
+
"tableName",
|
|
887
|
+
"slug",
|
|
888
|
+
"spaceSlug",
|
|
889
|
+
"version",
|
|
890
|
+
"chartConfig",
|
|
891
|
+
"metricQuery"
|
|
892
|
+
],
|
|
893
|
+
"type": "object"
|
|
894
|
+
},
|
|
434
895
|
"ChartAsCodeConfig": {
|
|
435
896
|
"anyOf": [
|
|
436
897
|
{
|
|
@@ -469,9 +930,50 @@
|
|
|
469
930
|
],
|
|
470
931
|
"description": "ChartConfig as serialized in chart YAML: viz bindings are slug-based.\nEnumerated rather than Exclude<ChartConfig, DataAppVizChartConfig> —\nTSOA cannot resolve Exclude over object unions, which corrupts the\ngenerated chart-as-code JSON schema. Keep in sync with ChartConfig."
|
|
471
932
|
},
|
|
472
|
-
"
|
|
473
|
-
"enum": [
|
|
474
|
-
|
|
933
|
+
"ChartKind": {
|
|
934
|
+
"enum": [
|
|
935
|
+
"line",
|
|
936
|
+
"horizontal_bar",
|
|
937
|
+
"vertical_bar",
|
|
938
|
+
"scatter",
|
|
939
|
+
"area",
|
|
940
|
+
"mixed",
|
|
941
|
+
"pie",
|
|
942
|
+
"table",
|
|
943
|
+
"big_number",
|
|
944
|
+
"funnel",
|
|
945
|
+
"custom",
|
|
946
|
+
"treemap",
|
|
947
|
+
"gauge",
|
|
948
|
+
"map",
|
|
949
|
+
"sankey",
|
|
950
|
+
"data_app_viz"
|
|
951
|
+
],
|
|
952
|
+
"type": "string"
|
|
953
|
+
},
|
|
954
|
+
"ChartKind.BIG_NUMBER": {
|
|
955
|
+
"enum": ["big_number"],
|
|
956
|
+
"type": "string"
|
|
957
|
+
},
|
|
958
|
+
"ChartKind.LINE": {
|
|
959
|
+
"enum": ["line"],
|
|
960
|
+
"type": "string"
|
|
961
|
+
},
|
|
962
|
+
"ChartKind.PIE": {
|
|
963
|
+
"enum": ["pie"],
|
|
964
|
+
"type": "string"
|
|
965
|
+
},
|
|
966
|
+
"ChartKind.TABLE": {
|
|
967
|
+
"enum": ["table"],
|
|
968
|
+
"type": "string"
|
|
969
|
+
},
|
|
970
|
+
"ChartKind.VERTICAL_BAR": {
|
|
971
|
+
"enum": ["vertical_bar"],
|
|
972
|
+
"type": "string"
|
|
973
|
+
},
|
|
974
|
+
"ChartType.BIG_NUMBER": {
|
|
975
|
+
"enum": ["big_number"],
|
|
976
|
+
"type": "string"
|
|
475
977
|
},
|
|
476
978
|
"ChartType.CARTESIAN": {
|
|
477
979
|
"enum": ["cartesian"],
|
|
@@ -979,6 +1481,10 @@
|
|
|
979
1481
|
"enum": ["chart"],
|
|
980
1482
|
"type": "string"
|
|
981
1483
|
},
|
|
1484
|
+
"ContentAsCodeType.SQL_CHART": {
|
|
1485
|
+
"enum": ["sql_chart"],
|
|
1486
|
+
"type": "string"
|
|
1487
|
+
},
|
|
982
1488
|
"ContentVerificationInfo": {
|
|
983
1489
|
"properties": {
|
|
984
1490
|
"verifiedAt": {
|
|
@@ -1533,6 +2039,30 @@
|
|
|
1533
2039
|
],
|
|
1534
2040
|
"type": "string"
|
|
1535
2041
|
},
|
|
2042
|
+
"FilterOperator.EQUALS": {
|
|
2043
|
+
"enum": ["equals"],
|
|
2044
|
+
"type": "string"
|
|
2045
|
+
},
|
|
2046
|
+
"FilterOperator.GREATER_THAN": {
|
|
2047
|
+
"enum": ["greaterThan"],
|
|
2048
|
+
"type": "string"
|
|
2049
|
+
},
|
|
2050
|
+
"FilterOperator.GREATER_THAN_OR_EQUAL": {
|
|
2051
|
+
"enum": ["greaterThanOrEqual"],
|
|
2052
|
+
"type": "string"
|
|
2053
|
+
},
|
|
2054
|
+
"FilterOperator.LESS_THAN": {
|
|
2055
|
+
"enum": ["lessThan"],
|
|
2056
|
+
"type": "string"
|
|
2057
|
+
},
|
|
2058
|
+
"FilterOperator.LESS_THAN_OR_EQUAL": {
|
|
2059
|
+
"enum": ["lessThanOrEqual"],
|
|
2060
|
+
"type": "string"
|
|
2061
|
+
},
|
|
2062
|
+
"FilterOperator.NOT_EQUALS": {
|
|
2063
|
+
"enum": ["notEquals"],
|
|
2064
|
+
"type": "string"
|
|
2065
|
+
},
|
|
1536
2066
|
"FilterRule": {
|
|
1537
2067
|
"additionalProperties": true,
|
|
1538
2068
|
"properties": {
|
|
@@ -3035,6 +3565,67 @@
|
|
|
3035
3565
|
"enum": ["hidden", "inside", "outside"],
|
|
3036
3566
|
"type": "string"
|
|
3037
3567
|
},
|
|
3568
|
+
"PivotChartLayout": {
|
|
3569
|
+
"properties": {
|
|
3570
|
+
"groupBy": {
|
|
3571
|
+
"items": {
|
|
3572
|
+
"properties": {
|
|
3573
|
+
"reference": {
|
|
3574
|
+
"type": "string"
|
|
3575
|
+
}
|
|
3576
|
+
},
|
|
3577
|
+
"required": ["reference"],
|
|
3578
|
+
"type": "object"
|
|
3579
|
+
},
|
|
3580
|
+
"type": "array"
|
|
3581
|
+
},
|
|
3582
|
+
"sortBy": {
|
|
3583
|
+
"items": {
|
|
3584
|
+
"$ref": "#/$defs/VizSortBy"
|
|
3585
|
+
},
|
|
3586
|
+
"type": "array"
|
|
3587
|
+
},
|
|
3588
|
+
"stack": {
|
|
3589
|
+
"anyOf": [
|
|
3590
|
+
{
|
|
3591
|
+
"type": "boolean"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"$ref": "#/$defs/StackType"
|
|
3595
|
+
}
|
|
3596
|
+
]
|
|
3597
|
+
},
|
|
3598
|
+
"x": {
|
|
3599
|
+
"properties": {
|
|
3600
|
+
"reference": {
|
|
3601
|
+
"type": "string"
|
|
3602
|
+
},
|
|
3603
|
+
"type": {
|
|
3604
|
+
"$ref": "#/$defs/VizIndexType"
|
|
3605
|
+
}
|
|
3606
|
+
},
|
|
3607
|
+
"required": ["type", "reference"],
|
|
3608
|
+
"type": "object"
|
|
3609
|
+
},
|
|
3610
|
+
"y": {
|
|
3611
|
+
"items": {
|
|
3612
|
+
"properties": {
|
|
3613
|
+
"aggregation": {
|
|
3614
|
+
"$ref": "#/$defs/VizAggregationOptions"
|
|
3615
|
+
},
|
|
3616
|
+
"reference": {
|
|
3617
|
+
"type": "string"
|
|
3618
|
+
}
|
|
3619
|
+
},
|
|
3620
|
+
"required": ["aggregation", "reference"],
|
|
3621
|
+
"type": "object"
|
|
3622
|
+
},
|
|
3623
|
+
"type": "array"
|
|
3624
|
+
}
|
|
3625
|
+
},
|
|
3626
|
+
"required": ["y"],
|
|
3627
|
+
"type": "object"
|
|
3628
|
+
},
|
|
3038
3629
|
"PivotReference": {
|
|
3039
3630
|
"properties": {
|
|
3040
3631
|
"field": {
|
|
@@ -3607,6 +4198,10 @@
|
|
|
3607
4198
|
"required": ["color"],
|
|
3608
4199
|
"type": "object"
|
|
3609
4200
|
},
|
|
4201
|
+
"SortByDirection": {
|
|
4202
|
+
"enum": ["ASC", "DESC"],
|
|
4203
|
+
"type": "string"
|
|
4204
|
+
},
|
|
3610
4205
|
"SortField": {
|
|
3611
4206
|
"properties": {
|
|
3612
4207
|
"descending": {
|
|
@@ -3636,6 +4231,72 @@
|
|
|
3636
4231
|
"enum": ["viewer", "editor", "admin"],
|
|
3637
4232
|
"type": "string"
|
|
3638
4233
|
},
|
|
4234
|
+
"SqlChartAsCode": {
|
|
4235
|
+
"additionalProperties": false,
|
|
4236
|
+
"description": "A SQL chart: runs the sql query and visualizes its results",
|
|
4237
|
+
"properties": {
|
|
4238
|
+
"access": {
|
|
4239
|
+
"$ref": "#/$defs/ContentAsCodeDirectAccess",
|
|
4240
|
+
"description": "Direct user/group grants. Omission leaves the existing policy unchanged on upload."
|
|
4241
|
+
},
|
|
4242
|
+
"chartKind": {
|
|
4243
|
+
"$ref": "#/$defs/ChartKind"
|
|
4244
|
+
},
|
|
4245
|
+
"config": {
|
|
4246
|
+
"$ref": "#/$defs/AllVizChartConfig"
|
|
4247
|
+
},
|
|
4248
|
+
"connection": {
|
|
4249
|
+
"type": "string"
|
|
4250
|
+
},
|
|
4251
|
+
"contentType": {
|
|
4252
|
+
"$ref": "#/$defs/ContentAsCodeType.SQL_CHART"
|
|
4253
|
+
},
|
|
4254
|
+
"description": {
|
|
4255
|
+
"type": ["string", "null"]
|
|
4256
|
+
},
|
|
4257
|
+
"downloadedAt": {
|
|
4258
|
+
"format": "date-time",
|
|
4259
|
+
"type": "string"
|
|
4260
|
+
},
|
|
4261
|
+
"limit": {
|
|
4262
|
+
"format": "double",
|
|
4263
|
+
"type": "number"
|
|
4264
|
+
},
|
|
4265
|
+
"name": {
|
|
4266
|
+
"type": "string"
|
|
4267
|
+
},
|
|
4268
|
+
"slug": {
|
|
4269
|
+
"type": "string"
|
|
4270
|
+
},
|
|
4271
|
+
"spaceSlug": {
|
|
4272
|
+
"type": "string"
|
|
4273
|
+
},
|
|
4274
|
+
"sql": {
|
|
4275
|
+
"type": "string"
|
|
4276
|
+
},
|
|
4277
|
+
"updatedAt": {
|
|
4278
|
+
"format": "date-time",
|
|
4279
|
+
"type": "string"
|
|
4280
|
+
},
|
|
4281
|
+
"version": {
|
|
4282
|
+
"const": 1,
|
|
4283
|
+
"format": "double",
|
|
4284
|
+
"type": "number"
|
|
4285
|
+
}
|
|
4286
|
+
},
|
|
4287
|
+
"required": [
|
|
4288
|
+
"config",
|
|
4289
|
+
"limit",
|
|
4290
|
+
"description",
|
|
4291
|
+
"name",
|
|
4292
|
+
"slug",
|
|
4293
|
+
"sql",
|
|
4294
|
+
"chartKind",
|
|
4295
|
+
"spaceSlug",
|
|
4296
|
+
"version"
|
|
4297
|
+
],
|
|
4298
|
+
"type": "object"
|
|
4299
|
+
},
|
|
3639
4300
|
"SqlTableCalculation": {
|
|
3640
4301
|
"allOf": [
|
|
3641
4302
|
{
|
|
@@ -3653,6 +4314,10 @@
|
|
|
3653
4314
|
}
|
|
3654
4315
|
]
|
|
3655
4316
|
},
|
|
4317
|
+
"StackType": {
|
|
4318
|
+
"enum": ["none", "stack", "stack100"],
|
|
4319
|
+
"type": "string"
|
|
4320
|
+
},
|
|
3656
4321
|
"TableCalculation": {
|
|
3657
4322
|
"anyOf": [
|
|
3658
4323
|
{
|
|
@@ -4114,381 +4779,401 @@
|
|
|
4114
4779
|
"required": ["type"],
|
|
4115
4780
|
"type": "object"
|
|
4116
4781
|
},
|
|
4117
|
-
"
|
|
4118
|
-
"enum": [
|
|
4119
|
-
"row_number",
|
|
4120
|
-
"percent_rank",
|
|
4121
|
-
"cume_dist",
|
|
4122
|
-
"rank",
|
|
4123
|
-
"sum",
|
|
4124
|
-
"avg",
|
|
4125
|
-
"count",
|
|
4126
|
-
"min",
|
|
4127
|
-
"max"
|
|
4128
|
-
],
|
|
4782
|
+
"ValueLabelPositionOptions": {
|
|
4783
|
+
"enum": ["hidden", "top", "bottom", "left", "right", "inside"],
|
|
4129
4784
|
"type": "string"
|
|
4130
4785
|
},
|
|
4131
|
-
"
|
|
4786
|
+
"VizAggregationOptions": {
|
|
4787
|
+
"enum": ["sum", "count", "avg", "min", "max", "any"],
|
|
4788
|
+
"type": "string"
|
|
4789
|
+
},
|
|
4790
|
+
"VizBarChartConfig": {
|
|
4132
4791
|
"allOf": [
|
|
4133
4792
|
{
|
|
4134
|
-
"$ref": "#/$defs/
|
|
4793
|
+
"$ref": "#/$defs/VizBaseConfig"
|
|
4135
4794
|
},
|
|
4136
4795
|
{
|
|
4137
4796
|
"properties": {
|
|
4138
|
-
"
|
|
4139
|
-
"
|
|
4140
|
-
"enum": ["start", "end"],
|
|
4141
|
-
"type": "string"
|
|
4797
|
+
"display": {
|
|
4798
|
+
"$ref": "#/$defs/CartesianChartDisplay"
|
|
4142
4799
|
},
|
|
4143
|
-
"
|
|
4144
|
-
"
|
|
4145
|
-
"format": "double",
|
|
4146
|
-
"type": "number"
|
|
4800
|
+
"fieldConfig": {
|
|
4801
|
+
"$ref": "#/$defs/PivotChartLayout"
|
|
4147
4802
|
},
|
|
4148
|
-
"
|
|
4149
|
-
"
|
|
4150
|
-
"type": "boolean"
|
|
4151
|
-
},
|
|
4152
|
-
"sortType": {
|
|
4153
|
-
"$ref": "#/$defs/XAxisSortType",
|
|
4154
|
-
"description": "How to sort the X axis"
|
|
4155
|
-
},
|
|
4156
|
-
"treatAsCategory": {
|
|
4157
|
-
"description": "Render a numeric X axis as discrete categories instead of a continuous scale",
|
|
4158
|
-
"type": "boolean"
|
|
4803
|
+
"type": {
|
|
4804
|
+
"$ref": "#/$defs/ChartKind.VERTICAL_BAR"
|
|
4159
4805
|
}
|
|
4160
4806
|
},
|
|
4807
|
+
"required": ["type"],
|
|
4161
4808
|
"type": "object"
|
|
4162
4809
|
}
|
|
4163
4810
|
]
|
|
4164
4811
|
},
|
|
4165
|
-
"
|
|
4166
|
-
"
|
|
4167
|
-
|
|
4168
|
-
}
|
|
4169
|
-
},
|
|
4170
|
-
"$id": "https://schemas.lightdash.com/lightdash/chart-as-code.json",
|
|
4171
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4172
|
-
"additionalProperties": false,
|
|
4173
|
-
"description": "From T, pick a set of properties whose keys are in the union K",
|
|
4174
|
-
"properties": {
|
|
4175
|
-
"access": {
|
|
4176
|
-
"$ref": "#/$defs/ContentAsCodeDirectAccess",
|
|
4177
|
-
"description": "Direct user/group grants on this chart. Only independently saved charts\ncarry one — dashboard-owned chart definitions are not grantable.\nOmission leaves the existing policy unchanged on upload."
|
|
4178
|
-
},
|
|
4179
|
-
"chartConfig": {
|
|
4180
|
-
"discriminator": {
|
|
4181
|
-
"propertyName": "type"
|
|
4182
|
-
},
|
|
4183
|
-
"oneOf": [
|
|
4184
|
-
{
|
|
4812
|
+
"VizBaseConfig": {
|
|
4813
|
+
"properties": {
|
|
4814
|
+
"metadata": {
|
|
4185
4815
|
"properties": {
|
|
4186
|
-
"
|
|
4187
|
-
"
|
|
4188
|
-
"
|
|
4189
|
-
},
|
|
4190
|
-
"type": {
|
|
4191
|
-
"const": "big_number",
|
|
4192
|
-
"description": "Type of chart visualization"
|
|
4816
|
+
"version": {
|
|
4817
|
+
"format": "double",
|
|
4818
|
+
"type": "number"
|
|
4193
4819
|
}
|
|
4194
4820
|
},
|
|
4195
|
-
"required": ["
|
|
4821
|
+
"required": ["version"],
|
|
4196
4822
|
"type": "object"
|
|
4197
4823
|
},
|
|
4824
|
+
"type": {
|
|
4825
|
+
"$ref": "#/$defs/ChartKind"
|
|
4826
|
+
}
|
|
4827
|
+
},
|
|
4828
|
+
"required": ["type", "metadata"],
|
|
4829
|
+
"type": "object"
|
|
4830
|
+
},
|
|
4831
|
+
"VizBigNumberConditionalOperator": {
|
|
4832
|
+
"anyOf": [
|
|
4198
4833
|
{
|
|
4199
|
-
"
|
|
4200
|
-
"config": {
|
|
4201
|
-
"$ref": "#/$defs/CartesianChart",
|
|
4202
|
-
"description": "Chart-type-specific configuration"
|
|
4203
|
-
},
|
|
4204
|
-
"type": {
|
|
4205
|
-
"const": "cartesian",
|
|
4206
|
-
"description": "Type of chart visualization"
|
|
4207
|
-
}
|
|
4208
|
-
},
|
|
4209
|
-
"required": ["type"],
|
|
4210
|
-
"type": "object"
|
|
4834
|
+
"$ref": "#/$defs/FilterOperator.EQUALS"
|
|
4211
4835
|
},
|
|
4212
4836
|
{
|
|
4213
|
-
"
|
|
4214
|
-
"config": {
|
|
4215
|
-
"$ref": "#/$defs/CustomVis",
|
|
4216
|
-
"description": "Chart-type-specific configuration"
|
|
4217
|
-
},
|
|
4218
|
-
"type": {
|
|
4219
|
-
"const": "custom",
|
|
4220
|
-
"description": "Type of chart visualization"
|
|
4221
|
-
}
|
|
4222
|
-
},
|
|
4223
|
-
"required": ["type"],
|
|
4224
|
-
"type": "object"
|
|
4837
|
+
"$ref": "#/$defs/FilterOperator.NOT_EQUALS"
|
|
4225
4838
|
},
|
|
4226
4839
|
{
|
|
4227
|
-
"
|
|
4228
|
-
"config": {
|
|
4229
|
-
"$ref": "#/$defs/PieChart",
|
|
4230
|
-
"description": "Chart-type-specific configuration"
|
|
4231
|
-
},
|
|
4232
|
-
"type": {
|
|
4233
|
-
"const": "pie",
|
|
4234
|
-
"description": "Type of chart visualization"
|
|
4235
|
-
}
|
|
4236
|
-
},
|
|
4237
|
-
"required": ["type"],
|
|
4238
|
-
"type": "object"
|
|
4840
|
+
"$ref": "#/$defs/FilterOperator.LESS_THAN"
|
|
4239
4841
|
},
|
|
4240
4842
|
{
|
|
4241
|
-
"
|
|
4242
|
-
"config": {
|
|
4243
|
-
"$ref": "#/$defs/FunnelChart",
|
|
4244
|
-
"description": "Chart-type-specific configuration"
|
|
4245
|
-
},
|
|
4246
|
-
"type": {
|
|
4247
|
-
"const": "funnel",
|
|
4248
|
-
"description": "Type of chart visualization"
|
|
4249
|
-
}
|
|
4250
|
-
},
|
|
4251
|
-
"required": ["type"],
|
|
4252
|
-
"type": "object"
|
|
4843
|
+
"$ref": "#/$defs/FilterOperator.LESS_THAN_OR_EQUAL"
|
|
4253
4844
|
},
|
|
4254
4845
|
{
|
|
4255
|
-
"
|
|
4256
|
-
"config": {
|
|
4257
|
-
"$ref": "#/$defs/TableChart",
|
|
4258
|
-
"description": "Chart-type-specific configuration"
|
|
4259
|
-
},
|
|
4260
|
-
"type": {
|
|
4261
|
-
"const": "table",
|
|
4262
|
-
"description": "Type of chart visualization"
|
|
4263
|
-
}
|
|
4264
|
-
},
|
|
4265
|
-
"required": ["type"],
|
|
4266
|
-
"type": "object"
|
|
4846
|
+
"$ref": "#/$defs/FilterOperator.GREATER_THAN"
|
|
4267
4847
|
},
|
|
4268
4848
|
{
|
|
4269
|
-
"
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4849
|
+
"$ref": "#/$defs/FilterOperator.GREATER_THAN_OR_EQUAL"
|
|
4850
|
+
}
|
|
4851
|
+
],
|
|
4852
|
+
"description": "Operators a big number threshold can be expressed with."
|
|
4853
|
+
},
|
|
4854
|
+
"VizBigNumberConditionalRule": {
|
|
4855
|
+
"properties": {
|
|
4856
|
+
"color": {
|
|
4857
|
+
"description": "Applied in the light colour scheme, and in dark when darkColor is unset.",
|
|
4858
|
+
"type": "string"
|
|
4859
|
+
},
|
|
4860
|
+
"darkColor": {
|
|
4861
|
+
"type": "string"
|
|
4862
|
+
},
|
|
4863
|
+
"operator": {
|
|
4864
|
+
"$ref": "#/$defs/VizBigNumberConditionalOperator"
|
|
4281
4865
|
},
|
|
4866
|
+
"value": {
|
|
4867
|
+
"format": "double",
|
|
4868
|
+
"type": "number"
|
|
4869
|
+
}
|
|
4870
|
+
},
|
|
4871
|
+
"required": ["color", "value", "operator"],
|
|
4872
|
+
"type": "object"
|
|
4873
|
+
},
|
|
4874
|
+
"VizBigNumberConfig": {
|
|
4875
|
+
"allOf": [
|
|
4282
4876
|
{
|
|
4283
|
-
"
|
|
4284
|
-
"config": {
|
|
4285
|
-
"$ref": "#/$defs/GaugeChart",
|
|
4286
|
-
"description": "Chart-type-specific configuration"
|
|
4287
|
-
},
|
|
4288
|
-
"type": {
|
|
4289
|
-
"const": "gauge",
|
|
4290
|
-
"description": "Type of chart visualization"
|
|
4291
|
-
}
|
|
4292
|
-
},
|
|
4293
|
-
"required": ["type"],
|
|
4294
|
-
"type": "object"
|
|
4877
|
+
"$ref": "#/$defs/VizBaseConfig"
|
|
4295
4878
|
},
|
|
4296
4879
|
{
|
|
4297
4880
|
"properties": {
|
|
4298
|
-
"
|
|
4299
|
-
"$ref": "#/$defs/
|
|
4300
|
-
|
|
4881
|
+
"display": {
|
|
4882
|
+
"$ref": "#/$defs/VizBigNumberDisplay"
|
|
4883
|
+
},
|
|
4884
|
+
"fieldConfig": {
|
|
4885
|
+
"$ref": "#/$defs/PivotChartLayout",
|
|
4886
|
+
"description": "Big numbers aggregate every row, so `x` is always undefined and `y`\nholds the value field followed by the optional comparison field."
|
|
4301
4887
|
},
|
|
4302
4888
|
"type": {
|
|
4303
|
-
"
|
|
4304
|
-
"description": "Type of chart visualization"
|
|
4889
|
+
"$ref": "#/$defs/ChartKind.BIG_NUMBER"
|
|
4305
4890
|
}
|
|
4306
4891
|
},
|
|
4307
4892
|
"required": ["type"],
|
|
4308
4893
|
"type": "object"
|
|
4894
|
+
}
|
|
4895
|
+
]
|
|
4896
|
+
},
|
|
4897
|
+
"VizBigNumberDisplay": {
|
|
4898
|
+
"properties": {
|
|
4899
|
+
"comparisonFormat": {
|
|
4900
|
+
"$ref": "#/$defs/ComparisonFormatTypes"
|
|
4309
4901
|
},
|
|
4310
|
-
{
|
|
4311
|
-
"
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
"
|
|
4317
|
-
"const": "sankey",
|
|
4318
|
-
"description": "Type of chart visualization"
|
|
4319
|
-
}
|
|
4902
|
+
"comparisonLabel": {
|
|
4903
|
+
"type": "string"
|
|
4904
|
+
},
|
|
4905
|
+
"conditionalFormatting": {
|
|
4906
|
+
"description": "Colours the value; the first matching rule wins.",
|
|
4907
|
+
"items": {
|
|
4908
|
+
"$ref": "#/$defs/VizBigNumberConditionalRule"
|
|
4320
4909
|
},
|
|
4321
|
-
"
|
|
4322
|
-
"type": "object"
|
|
4910
|
+
"type": "array"
|
|
4323
4911
|
},
|
|
4324
|
-
{
|
|
4912
|
+
"flipColors": {
|
|
4913
|
+
"description": "Colours an increase red and a decrease green.",
|
|
4914
|
+
"type": "boolean"
|
|
4915
|
+
},
|
|
4916
|
+
"label": {
|
|
4917
|
+
"description": "Custom label rendered under the value. Falls back to the field name.",
|
|
4918
|
+
"type": "string"
|
|
4919
|
+
},
|
|
4920
|
+
"showComparison": {
|
|
4921
|
+
"description": "Compares the value against the second selected field.",
|
|
4922
|
+
"type": "boolean"
|
|
4923
|
+
},
|
|
4924
|
+
"showLabel": {
|
|
4925
|
+
"type": "boolean"
|
|
4926
|
+
},
|
|
4927
|
+
"style": {
|
|
4928
|
+
"$ref": "#/$defs/CompactOrAlias",
|
|
4929
|
+
"description": "Compact notation applied to the value (K/M/B/T)."
|
|
4930
|
+
}
|
|
4931
|
+
},
|
|
4932
|
+
"type": "object"
|
|
4933
|
+
},
|
|
4934
|
+
"VizColumnConfig": {
|
|
4935
|
+
"properties": {
|
|
4936
|
+
"aggregation": {
|
|
4937
|
+
"$ref": "#/$defs/VizAggregationOptions"
|
|
4938
|
+
},
|
|
4939
|
+
"barConfig": {
|
|
4325
4940
|
"properties": {
|
|
4326
|
-
"
|
|
4327
|
-
"
|
|
4941
|
+
"color": {
|
|
4942
|
+
"type": "string"
|
|
4328
4943
|
},
|
|
4329
|
-
"
|
|
4330
|
-
"
|
|
4944
|
+
"max": {
|
|
4945
|
+
"format": "double",
|
|
4946
|
+
"type": "number"
|
|
4947
|
+
},
|
|
4948
|
+
"min": {
|
|
4949
|
+
"format": "double",
|
|
4950
|
+
"type": "number"
|
|
4331
4951
|
}
|
|
4332
4952
|
},
|
|
4333
|
-
"required": ["type"],
|
|
4334
4953
|
"type": "object"
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
},
|
|
4339
|
-
"contentType": {
|
|
4340
|
-
"$ref": "#/$defs/ContentAsCodeType.CHART",
|
|
4341
|
-
"description": "Content type discriminator"
|
|
4342
|
-
},
|
|
4343
|
-
"dashboardSlug": {
|
|
4344
|
-
"description": "Slug of the dashboard this chart belongs to (if any)",
|
|
4345
|
-
"oneOf": [
|
|
4346
|
-
{
|
|
4347
|
-
"pattern": "^[a-z0-9-]+$",
|
|
4954
|
+
},
|
|
4955
|
+
"displayStyle": {
|
|
4956
|
+
"enum": ["text", "bar"],
|
|
4348
4957
|
"type": "string"
|
|
4349
4958
|
},
|
|
4350
|
-
{
|
|
4351
|
-
"type": "
|
|
4959
|
+
"frozen": {
|
|
4960
|
+
"type": "boolean"
|
|
4961
|
+
},
|
|
4962
|
+
"label": {
|
|
4963
|
+
"type": "string"
|
|
4964
|
+
},
|
|
4965
|
+
"order": {
|
|
4966
|
+
"format": "double",
|
|
4967
|
+
"type": "number"
|
|
4968
|
+
},
|
|
4969
|
+
"reference": {
|
|
4970
|
+
"type": "string"
|
|
4971
|
+
},
|
|
4972
|
+
"visible": {
|
|
4973
|
+
"type": "boolean"
|
|
4352
4974
|
}
|
|
4353
|
-
|
|
4975
|
+
},
|
|
4976
|
+
"required": ["frozen", "label", "reference", "visible"],
|
|
4977
|
+
"type": "object"
|
|
4354
4978
|
},
|
|
4355
|
-
"
|
|
4356
|
-
"
|
|
4357
|
-
|
|
4979
|
+
"VizColumnsConfig": {
|
|
4980
|
+
"additionalProperties": {
|
|
4981
|
+
"$ref": "#/$defs/VizColumnConfig"
|
|
4982
|
+
},
|
|
4983
|
+
"properties": {},
|
|
4984
|
+
"type": "object"
|
|
4358
4985
|
},
|
|
4359
|
-
"
|
|
4360
|
-
"
|
|
4361
|
-
"format": "date-time",
|
|
4986
|
+
"VizIndexType": {
|
|
4987
|
+
"enum": ["time", "category"],
|
|
4362
4988
|
"type": "string"
|
|
4363
4989
|
},
|
|
4364
|
-
"
|
|
4365
|
-
"
|
|
4990
|
+
"VizLineChartConfig": {
|
|
4991
|
+
"allOf": [
|
|
4366
4992
|
{
|
|
4367
|
-
"
|
|
4368
|
-
{
|
|
4369
|
-
"$ref": "#/$defs/SavedMergeDefinition"
|
|
4370
|
-
},
|
|
4371
|
-
{
|
|
4372
|
-
"$ref": "#/$defs/SavedMergeQuery"
|
|
4373
|
-
}
|
|
4374
|
-
]
|
|
4993
|
+
"$ref": "#/$defs/VizBaseConfig"
|
|
4375
4994
|
},
|
|
4376
4995
|
{
|
|
4377
|
-
"
|
|
4996
|
+
"properties": {
|
|
4997
|
+
"display": {
|
|
4998
|
+
"$ref": "#/$defs/CartesianChartDisplay"
|
|
4999
|
+
},
|
|
5000
|
+
"fieldConfig": {
|
|
5001
|
+
"$ref": "#/$defs/PivotChartLayout"
|
|
5002
|
+
},
|
|
5003
|
+
"type": {
|
|
5004
|
+
"$ref": "#/$defs/ChartKind.LINE"
|
|
5005
|
+
}
|
|
5006
|
+
},
|
|
5007
|
+
"required": ["type"],
|
|
5008
|
+
"type": "object"
|
|
4378
5009
|
}
|
|
4379
5010
|
]
|
|
4380
5011
|
},
|
|
4381
|
-
"
|
|
5012
|
+
"VizPieChartConfig": {
|
|
4382
5013
|
"allOf": [
|
|
4383
5014
|
{
|
|
4384
|
-
"$ref": "#/$defs/
|
|
5015
|
+
"$ref": "#/$defs/VizBaseConfig"
|
|
4385
5016
|
},
|
|
4386
5017
|
{
|
|
4387
5018
|
"properties": {
|
|
4388
|
-
"
|
|
4389
|
-
"$ref": "#/$defs/
|
|
5019
|
+
"display": {
|
|
5020
|
+
"$ref": "#/$defs/VizPieChartDisplay"
|
|
5021
|
+
},
|
|
5022
|
+
"fieldConfig": {
|
|
5023
|
+
"$ref": "#/$defs/PivotChartLayout"
|
|
5024
|
+
},
|
|
5025
|
+
"type": {
|
|
5026
|
+
"$ref": "#/$defs/ChartKind.PIE"
|
|
4390
5027
|
}
|
|
4391
5028
|
},
|
|
4392
|
-
"required": ["
|
|
5029
|
+
"required": ["type"],
|
|
4393
5030
|
"type": "object"
|
|
4394
5031
|
}
|
|
4395
5032
|
]
|
|
4396
5033
|
},
|
|
4397
|
-
"
|
|
4398
|
-
"description": "Display name of the chart",
|
|
4399
|
-
"type": "string"
|
|
4400
|
-
},
|
|
4401
|
-
"parameters": {
|
|
4402
|
-
"$ref": "#/$defs/ParametersValuesMap",
|
|
4403
|
-
"description": "Parameter values for the chart query"
|
|
4404
|
-
},
|
|
4405
|
-
"pivotConfig": {
|
|
4406
|
-
"description": "Pivot table configuration",
|
|
5034
|
+
"VizPieChartDisplay": {
|
|
4407
5035
|
"properties": {
|
|
4408
|
-
"
|
|
4409
|
-
"
|
|
4410
|
-
"items": {
|
|
4411
|
-
"type": "string"
|
|
4412
|
-
},
|
|
4413
|
-
"type": "array"
|
|
4414
|
-
},
|
|
4415
|
-
"rows": {
|
|
4416
|
-
"description": "Ordered fields to render on the pivot row axis",
|
|
4417
|
-
"items": {
|
|
4418
|
-
"type": "string"
|
|
4419
|
-
},
|
|
4420
|
-
"type": "array"
|
|
5036
|
+
"isDonut": {
|
|
5037
|
+
"type": "boolean"
|
|
4421
5038
|
}
|
|
4422
5039
|
},
|
|
4423
|
-
"required": ["columns"],
|
|
4424
5040
|
"type": "object"
|
|
4425
5041
|
},
|
|
4426
|
-
"
|
|
4427
|
-
"description": "Unique identifier slug for this chart",
|
|
4428
|
-
"type": "string"
|
|
4429
|
-
},
|
|
4430
|
-
"spaceSlug": {
|
|
4431
|
-
"description": "Slug of the space containing this chart",
|
|
4432
|
-
"type": "string"
|
|
4433
|
-
},
|
|
4434
|
-
"tableConfig": {
|
|
4435
|
-
"description": "Table configuration. Defaults to empty column order if omitted.",
|
|
5042
|
+
"VizSortBy": {
|
|
4436
5043
|
"properties": {
|
|
4437
|
-
"
|
|
4438
|
-
"
|
|
5044
|
+
"direction": {
|
|
5045
|
+
"$ref": "#/$defs/SortByDirection"
|
|
5046
|
+
},
|
|
5047
|
+
"nullsFirst": {
|
|
5048
|
+
"type": "boolean"
|
|
5049
|
+
},
|
|
5050
|
+
"pivotValues": {
|
|
5051
|
+
"description": "Pins the row-sort anchor to a specific pivot column.",
|
|
4439
5052
|
"items": {
|
|
4440
|
-
"
|
|
5053
|
+
"$ref": "#/$defs/PivotSortAnchor"
|
|
4441
5054
|
},
|
|
4442
5055
|
"type": "array"
|
|
5056
|
+
},
|
|
5057
|
+
"reference": {
|
|
5058
|
+
"type": "string"
|
|
4443
5059
|
}
|
|
4444
5060
|
},
|
|
4445
|
-
"required": ["
|
|
5061
|
+
"required": ["direction", "reference"],
|
|
4446
5062
|
"type": "object"
|
|
4447
5063
|
},
|
|
4448
|
-
"
|
|
4449
|
-
"
|
|
4450
|
-
|
|
5064
|
+
"VizTableConfig": {
|
|
5065
|
+
"allOf": [
|
|
5066
|
+
{
|
|
5067
|
+
"$ref": "#/$defs/VizBaseConfig"
|
|
5068
|
+
},
|
|
5069
|
+
{
|
|
5070
|
+
"properties": {
|
|
5071
|
+
"columns": {
|
|
5072
|
+
"$ref": "#/$defs/VizColumnsConfig"
|
|
5073
|
+
},
|
|
5074
|
+
"display": {
|
|
5075
|
+
"$ref": "#/$defs/VizTableDisplay"
|
|
5076
|
+
},
|
|
5077
|
+
"type": {
|
|
5078
|
+
"$ref": "#/$defs/ChartKind.TABLE"
|
|
5079
|
+
}
|
|
5080
|
+
},
|
|
5081
|
+
"required": ["columns", "type"],
|
|
5082
|
+
"type": "object"
|
|
5083
|
+
}
|
|
5084
|
+
]
|
|
4451
5085
|
},
|
|
4452
|
-
"
|
|
4453
|
-
"
|
|
4454
|
-
"
|
|
5086
|
+
"VizTableDisplay": {
|
|
5087
|
+
"properties": {},
|
|
5088
|
+
"type": "object"
|
|
5089
|
+
},
|
|
5090
|
+
"WindowFunctionType": {
|
|
5091
|
+
"enum": [
|
|
5092
|
+
"row_number",
|
|
5093
|
+
"percent_rank",
|
|
5094
|
+
"cume_dist",
|
|
5095
|
+
"rank",
|
|
5096
|
+
"sum",
|
|
5097
|
+
"avg",
|
|
5098
|
+
"count",
|
|
5099
|
+
"min",
|
|
5100
|
+
"max"
|
|
5101
|
+
],
|
|
4455
5102
|
"type": "string"
|
|
4456
5103
|
},
|
|
4457
|
-
"
|
|
4458
|
-
"
|
|
5104
|
+
"XAxis": {
|
|
5105
|
+
"allOf": [
|
|
4459
5106
|
{
|
|
4460
|
-
"
|
|
4461
|
-
{
|
|
4462
|
-
"$ref": "#/$defs/ContentVerificationInfo"
|
|
4463
|
-
}
|
|
4464
|
-
],
|
|
4465
|
-
"description": "Detailed verification info (who/when). Read-only; ignored on upload."
|
|
5107
|
+
"$ref": "#/$defs/Axis"
|
|
4466
5108
|
},
|
|
4467
5109
|
{
|
|
4468
|
-
"
|
|
5110
|
+
"properties": {
|
|
5111
|
+
"dataZoomAnchor": {
|
|
5112
|
+
"description": "Where the initial data-zoom window anchors when data zoom is enabled",
|
|
5113
|
+
"enum": ["start", "end"],
|
|
5114
|
+
"type": "string"
|
|
5115
|
+
},
|
|
5116
|
+
"dataZoomItemCount": {
|
|
5117
|
+
"description": "Number of items visible at once in the data-zoom window",
|
|
5118
|
+
"format": "double",
|
|
5119
|
+
"type": "number"
|
|
5120
|
+
},
|
|
5121
|
+
"enableDataZoom": {
|
|
5122
|
+
"description": "Enable data zoom slider for this axis",
|
|
5123
|
+
"type": "boolean"
|
|
5124
|
+
},
|
|
5125
|
+
"sortType": {
|
|
5126
|
+
"$ref": "#/$defs/XAxisSortType",
|
|
5127
|
+
"description": "How to sort the X axis"
|
|
5128
|
+
},
|
|
5129
|
+
"treatAsCategory": {
|
|
5130
|
+
"description": "Render a numeric X axis as discrete categories instead of a continuous scale",
|
|
5131
|
+
"type": "boolean"
|
|
5132
|
+
}
|
|
5133
|
+
},
|
|
5134
|
+
"type": "object"
|
|
4469
5135
|
}
|
|
4470
5136
|
]
|
|
4471
5137
|
},
|
|
4472
|
-
"
|
|
4473
|
-
"
|
|
4474
|
-
"type": "
|
|
4475
|
-
},
|
|
4476
|
-
"version": {
|
|
4477
|
-
"const": 1,
|
|
4478
|
-
"description": "Schema version for this chart configuration",
|
|
4479
|
-
"format": "double",
|
|
4480
|
-
"type": "number"
|
|
5138
|
+
"XAxisSortType": {
|
|
5139
|
+
"enum": ["default", "category", "bar_totals"],
|
|
5140
|
+
"type": "string"
|
|
4481
5141
|
}
|
|
4482
5142
|
},
|
|
4483
|
-
"
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
"
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
"
|
|
4491
|
-
|
|
5143
|
+
"$id": "https://schemas.lightdash.com/lightdash/chart-as-code.json",
|
|
5144
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5145
|
+
"description": "Schema for defining Lightdash charts (semantic layer charts and SQL charts) in YAML format for version control",
|
|
5146
|
+
"else": {
|
|
5147
|
+
"$ref": "#/$defs/ChartAsCode"
|
|
5148
|
+
},
|
|
5149
|
+
"if": {
|
|
5150
|
+
"anyOf": [
|
|
5151
|
+
{
|
|
5152
|
+
"properties": {
|
|
5153
|
+
"contentType": {
|
|
5154
|
+
"const": "sql_chart"
|
|
5155
|
+
}
|
|
5156
|
+
},
|
|
5157
|
+
"required": ["contentType"]
|
|
5158
|
+
},
|
|
5159
|
+
{
|
|
5160
|
+
"not": {
|
|
5161
|
+
"anyOf": [
|
|
5162
|
+
{
|
|
5163
|
+
"required": ["contentType"]
|
|
5164
|
+
},
|
|
5165
|
+
{
|
|
5166
|
+
"required": ["tableName"]
|
|
5167
|
+
}
|
|
5168
|
+
]
|
|
5169
|
+
},
|
|
5170
|
+
"required": ["sql"]
|
|
5171
|
+
}
|
|
5172
|
+
]
|
|
5173
|
+
},
|
|
5174
|
+
"then": {
|
|
5175
|
+
"$ref": "#/$defs/SqlChartAsCode"
|
|
5176
|
+
},
|
|
4492
5177
|
"title": "Lightdash Chart as Code",
|
|
4493
5178
|
"type": "object"
|
|
4494
5179
|
}
|