forked from PolymerVis/monaco-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonaco-schema-vega-lite.js
7293 lines (7293 loc) · 329 KB
/
monaco-schema-vega-lite.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(function(PolymerVis) {
PolymerVis.schemas = PolymerVis.schemas || {};
PolymerVis.schemas['vega-lite'] = {
"$ref": "#/definitions/TopLevelExtendedSpec",
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"Aggregate": {
"anyOf": [
{
"$ref": "#/definitions/AggregateOp"
}
]
},
"AggregateOp": {
"enum": [
"argmax",
"argmin",
"average",
"count",
"distinct",
"max",
"mean",
"median",
"min",
"missing",
"q1",
"q3",
"ci0",
"ci1",
"stdev",
"stdevp",
"sum",
"valid",
"values",
"variance",
"variancep"
],
"type": "string"
},
"AggregateTransform": {
"additionalProperties": false,
"properties": {
"aggregate": {
"description": "Array of objects that define fields to aggregate.",
"items": {
"$ref": "#/definitions/AggregatedFieldDef"
},
"type": "array"
},
"groupby": {
"description": "The data fields to group by. If not specified, a single group containing all data objects will be used.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"aggregate"
],
"type": "object"
},
"AggregatedFieldDef": {
"additionalProperties": false,
"properties": {
"as": {
"description": "The output field names to use for each aggregated field.",
"type": "string"
},
"field": {
"description": "The data field for which to compute aggregate function.",
"type": "string"
},
"op": {
"$ref": "#/definitions/AggregateOp",
"description": "The aggregation operations to apply to the fields, such as sum, average or count.\nSee the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#supported-aggregation-operations)\nfor more information."
}
},
"required": [
"op",
"field",
"as"
],
"type": "object"
},
"Anchor": {
"enum": [
"start",
"middle",
"end"
],
"type": "string"
},
"AnyMark": {
"anyOf": [
{
"$ref": "#/definitions/Mark"
},
{
"$ref": "#/definitions/MarkDef"
}
]
},
"AutoSizeParams": {
"additionalProperties": false,
"properties": {
"contains": {
"description": "Determines how size calculation should be performed, one of `\"content\"` or `\"padding\"`. The default setting (`\"content\"`) inteprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `\"padding\"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\n\n__Default value__: `\"content\"`",
"enum": [
"content",
"padding"
],
"type": "string"
},
"resize": {
"description": "A boolean flag indicating if autosize layout should be re-calculated on every view update.\n\n__Default value__: `false`",
"type": "boolean"
},
"type": {
"$ref": "#/definitions/AutosizeType",
"description": "The sizing format type. One of `\"pad\"`, `\"fit\"` or `\"none\"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\n\n__Default value__: `\"pad\"`"
}
},
"type": "object"
},
"AutosizeType": {
"enum": [
"pad",
"fit",
"none"
],
"type": "string"
},
"Axis": {
"additionalProperties": false,
"properties": {
"domain": {
"description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
"type": "boolean"
},
"format": {
"description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](format.html) for more information.\n\n__Default value:__ derived from [numberFormat](config.html#format) config for quantitative fields and from [timeFormat](config.html#format) config for temporal fields.",
"type": "string"
},
"grid": {
"description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](scale.html#continuous) that are not binned; otherwise, `false`.",
"type": "boolean"
},
"labelAngle": {
"description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
"maximum": 360,
"minimum": -360,
"type": "number"
},
"labelBound": {
"description": "Indicates if labels should be hidden if they exceed the axis range. If `false `(the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
"type": [
"boolean",
"number"
]
},
"labelFlush": {
"description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
"type": [
"boolean",
"number"
]
},
"labelOverlap": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": [
"parity"
],
"type": "string"
},
{
"enum": [
"greedy"
],
"type": "string"
}
],
"description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
},
"labelPadding": {
"description": "The padding, in pixels, between axis and text labels.",
"type": "number"
},
"labels": {
"description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
"type": "boolean"
},
"maxExtent": {
"description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
"type": "number"
},
"minExtent": {
"description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
"type": "number"
},
"offset": {
"description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](config.html#facet-scale-config)'s `offset` (`0` by default)",
"type": "number"
},
"orient": {
"$ref": "#/definitions/AxisOrient",
"description": "The orientation of the axis. One of `\"top\"`, `\"bottom\"`, `\"left\"` or `\"right\"`. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).\n\n__Default value:__ `\"bottom\"` for x-axes and `\"left\"` for y-axes."
},
"position": {
"description": "The anchor position of the axis in pixels. For x-axis with top or bottom orientation, this sets the axis group x coordinate. For y-axis with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`",
"type": "number"
},
"tickCount": {
"description": "A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.",
"type": "number"
},
"tickSize": {
"description": "The size in pixels of axis ticks.",
"minimum": 0,
"type": "number"
},
"ticks": {
"description": "Boolean value that determines whether the axis should include ticks.",
"type": "boolean"
},
"title": {
"description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as a part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function will be denoted in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Note__: You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).",
"type": [
"string",
"null"
]
},
"titleMaxLength": {
"description": "Max length for axis title if the title is automatically generated from the field's description.",
"type": "number"
},
"titlePadding": {
"description": "The padding, in pixels, between title and axis.",
"type": "number"
},
"values": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"items": {
"$ref": "#/definitions/DateTime"
},
"type": "array"
}
],
"description": "Explicitly set the visible axis tick values."
},
"zindex": {
"description": "A non-positive integer indicating z-index of the axis.\nIf zindex is 0, axes should be drawn behind all chart elements.\nTo put them in front, use `\"zindex = 1\"`.\n\n__Default value:__ `1` (in front of the marks) for actual axis and `0` (behind the marks) for grids.",
"minimum": 0,
"type": "number"
}
},
"type": "object"
},
"AxisConfig": {
"additionalProperties": false,
"properties": {
"bandPosition": {
"description": "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.",
"type": "number"
},
"domain": {
"description": "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
"type": "boolean"
},
"domainColor": {
"description": "Color of axis domain line.\n\n__Default value:__ (none, using Vega default).",
"type": "string"
},
"domainWidth": {
"description": "Stroke width of axis domain line\n\n__Default value:__ (none, using Vega default).",
"type": "number"
},
"grid": {
"description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](scale.html#continuous) that are not binned; otherwise, `false`.",
"type": "boolean"
},
"gridColor": {
"description": "Color of gridlines.",
"type": "string"
},
"gridDash": {
"description": "The offset (in pixels) into which to begin drawing with the grid dash array.",
"items": {
"type": "number"
},
"type": "array"
},
"gridOpacity": {
"description": "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ (`1` by default)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"gridWidth": {
"description": "The grid width, in pixels.",
"minimum": 0,
"type": "number"
},
"labelAngle": {
"description": "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
"maximum": 360,
"minimum": -360,
"type": "number"
},
"labelBound": {
"description": "Indicates if labels should be hidden if they exceed the axis range. If `false `(the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
"type": [
"boolean",
"number"
]
},
"labelColor": {
"description": "The color of the tick label, can be in hex color code or regular color name.",
"type": "string"
},
"labelFlush": {
"description": "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
"type": [
"boolean",
"number"
]
},
"labelFont": {
"description": "The font of the tick label.",
"type": "string"
},
"labelFontSize": {
"description": "The font size of the label, in pixels.",
"minimum": 0,
"type": "number"
},
"labelLimit": {
"description": "Maximum allowed pixel width of axis tick labels.",
"type": "number"
},
"labelOverlap": {
"anyOf": [
{
"type": "boolean"
},
{
"enum": [
"parity"
],
"type": "string"
},
{
"enum": [
"greedy"
],
"type": "string"
}
],
"description": "The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\"parity\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\"greedy\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `\"greedy\"` for log scales; otherwise `false`."
},
"labelPadding": {
"description": "The padding, in pixels, between axis and text labels.",
"type": "number"
},
"labels": {
"description": "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
"type": "boolean"
},
"maxExtent": {
"description": "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
"type": "number"
},
"minExtent": {
"description": "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
"type": "number"
},
"shortTimeLabels": {
"description": "Whether month names and weekday names should be abbreviated.\n\n__Default value:__ `false`",
"type": "boolean"
},
"tickColor": {
"description": "The color of the axis's tick.",
"type": "string"
},
"tickRound": {
"description": "Boolean flag indicating if pixel position values should be rounded to the nearest integer.",
"type": "boolean"
},
"tickSize": {
"description": "The size in pixels of axis ticks.",
"minimum": 0,
"type": "number"
},
"tickWidth": {
"description": "The width, in pixels, of ticks.",
"minimum": 0,
"type": "number"
},
"ticks": {
"description": "Boolean value that determines whether the axis should include ticks.",
"type": "boolean"
},
"titleAlign": {
"description": "Horizontal text alignment of axis titles.",
"type": "string"
},
"titleAngle": {
"description": "Angle in degrees of axis titles.",
"type": "number"
},
"titleBaseline": {
"description": "Vertical text baseline for axis titles.",
"type": "string"
},
"titleColor": {
"description": "Color of the title, can be in hex color code or regular color name.",
"type": "string"
},
"titleFont": {
"description": "Font of the title. (e.g., `\"Helvetica Neue\"`).",
"type": "string"
},
"titleFontSize": {
"description": "Font size of the title.",
"minimum": 0,
"type": "number"
},
"titleFontWeight": {
"description": "Font weight of the title. (e.g., `\"bold\"`).",
"type": [
"string",
"number"
]
},
"titleLimit": {
"description": "Maximum allowed pixel width of axis titles.",
"type": "number"
},
"titleMaxLength": {
"description": "Max length for axis title if the title is automatically generated from the field's description.",
"type": "number"
},
"titlePadding": {
"description": "The padding, in pixels, between title and axis.",
"type": "number"
},
"titleX": {
"description": "X-coordinate of the axis title relative to the axis group.",
"type": "number"
},
"titleY": {
"description": "Y-coordinate of the axis title relative to the axis group.",
"type": "number"
}
},
"type": "object"
},
"AxisConfigMixins": {
"additionalProperties": false,
"properties": {
"axis": {
"$ref": "#/definitions/AxisConfig",
"description": "Axis configuration, which determines default properties for all `x` and `y` [axes](axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](axis.html#config)."
},
"axisBand": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Specific axis config for axes with \"band\" scales."
},
"axisBottom": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Specific axis config for x-axis along the bottom edge of the chart."
},
"axisLeft": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Specific axis config for y-axis along the left edge of the chart."
},
"axisRight": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Specific axis config for y-axis along the right edge of the chart."
},
"axisTop": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Specific axis config for x-axis along the top edge of the chart."
},
"axisX": {
"$ref": "#/definitions/VgAxisConfig",
"description": "X-axis specific config."
},
"axisY": {
"$ref": "#/definitions/VgAxisConfig",
"description": "Y-axis specific config."
}
},
"type": "object"
},
"AxisOrient": {
"enum": [
"top",
"right",
"left",
"bottom"
],
"type": "string"
},
"AxisResolveMap": {
"additionalProperties": false,
"properties": {
"x": {
"$ref": "#/definitions/ResolveMode"
},
"y": {
"$ref": "#/definitions/ResolveMode"
}
},
"type": "object"
},
"BarConfig": {
"additionalProperties": false,
"properties": {
"align": {
"$ref": "#/definitions/HorizontalAlign",
"description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
},
"angle": {
"description": "The rotation angle of the text, in degrees.",
"maximum": 360,
"minimum": 0,
"type": "number"
},
"baseline": {
"$ref": "#/definitions/VerticalAlign",
"description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
},
"binSpacing": {
"description": "Offset between bar for binned field. Ideal value for this is either 0 (Preferred by statisticians) or 1 (Vega-Lite Default, D3 example style).\n\n__Default value:__ `1`",
"minimum": 0,
"type": "number"
},
"color": {
"description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">■</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).",
"type": "string"
},
"continuousBandSize": {
"description": "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
"minimum": 0,
"type": "number"
},
"discreteBandSize": {
"description": "The size of the bars. If unspecified, the default size is `bandSize-1`,\nwhich provides 1 pixel offset between bars.",
"minimum": 0,
"type": "number"
},
"dx": {
"description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
"type": "number"
},
"dy": {
"description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
"type": "number"
},
"fill": {
"description": "Default Fill Color. This has higher precedence than config.color\n\n__Default value:__ (None)",
"type": "string"
},
"fillOpacity": {
"description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"filled": {
"description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).",
"type": "boolean"
},
"font": {
"description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
"type": "string"
},
"fontSize": {
"description": "The font size, in pixels.",
"minimum": 0,
"type": "number"
},
"fontStyle": {
"$ref": "#/definitions/FontStyle",
"description": "The font style (e.g., `\"italic\"`)."
},
"fontWeight": {
"anyOf": [
{
"$ref": "#/definitions/FontWeight"
},
{
"$ref": "#/definitions/FontWeightNumber"
}
],
"description": "The font weight (e.g., `\"bold\"`)."
},
"interpolate": {
"$ref": "#/definitions/Interpolate",
"description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
},
"limit": {
"description": "The maximum length of the text mark in pixels (default 0, indicating no limit). The text value will be automatically truncated if the rendered size exceeds the limit.",
"type": "number"
},
"opacity": {
"description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"orient": {
"$ref": "#/definitions/Orient",
"description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
},
"radius": {
"description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
"minimum": 0,
"type": "number"
},
"shape": {
"description": "The default symbol shape to use. One of: `\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, or `\"triangle-down\"`, or a custom SVG path.\n\n__Default value:__ `\"circle\"`",
"type": "string"
},
"size": {
"description": "The pixel area each the point/circle/square.\nFor example: in the case of circles, the radius is determined in part by the square root of the size value.\n\n__Default value:__ `30`",
"minimum": 0,
"type": "number"
},
"stroke": {
"description": "Default Stroke Color. This has higher precedence than config.color\n\n__Default value:__ (None)",
"type": "string"
},
"strokeDash": {
"description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
"items": {
"type": "number"
},
"type": "array"
},
"strokeDashOffset": {
"description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
"type": "number"
},
"strokeOpacity": {
"description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"strokeWidth": {
"description": "The stroke width, in pixels.",
"minimum": 0,
"type": "number"
},
"tension": {
"description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"text": {
"description": "Placeholder text if the `text` channel is not specified",
"type": "string"
},
"theta": {
"description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".",
"type": "number"
}
},
"type": "object"
},
"BaseBin": {
"additionalProperties": false,
"properties": {
"base": {
"description": "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`",
"type": "number"
},
"divide": {
"description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`",
"items": {
"type": "number"
},
"minItems": 1,
"type": "array"
},
"maxbins": {
"description": "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels",
"minimum": 2,
"type": "number"
},
"minstep": {
"description": "A minimum allowable step size (particularly useful for integer values).",
"type": "number"
},
"nice": {
"description": "If true (the default), attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.",
"type": "boolean"
},
"step": {
"description": "An exact step size to use between bins.\n\n__Note:__ If provided, options such as maxbins will be ignored.",
"type": "number"
},
"steps": {
"description": "An array of allowable step sizes to choose from.",
"items": {
"type": "number"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"BaseSelectionDef": {
"additionalProperties": false,
"properties": {
"empty": {
"description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.",
"enum": [
"all",
"none"
],
"type": "string"
},
"encodings": {
"description": "An array of encoding channels. The corresponding data field values\nmust match for a data tuple to fall within the selection.",
"items": {
"$ref": "#/definitions/SingleDefChannel"
},
"type": "array"
},
"fields": {
"description": "An array of field names whose values must match for a data tuple to\nfall within the selection.",
"items": {
"type": "string"
},
"type": "array"
},
"on": {
"$ref": "#/definitions/VgEventStream",
"description": "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection.\nFor interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
},
"resolve": {
"$ref": "#/definitions/SelectionResolution",
"description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain."
}
},
"type": "object"
},
"BaseSpec": {
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/definitions/Data",
"description": "An object describing the data source"
},
"description": {
"description": "Description of this mark for commenting purpose.",
"type": "string"
},
"name": {
"description": "Name of the visualization for later reference.",
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/TitleParams"
}
],
"description": "Title for the plot."
},
"transform": {
"description": "An array of data transformations such as filter and new field calculation.",
"items": {
"$ref": "#/definitions/Transform"
},
"type": "array"
}
},
"type": "object"
},
"BinParams": {
"additionalProperties": false,
"description": "Binning properties or boolean flag for determining whether to bin data or not.",
"properties": {
"base": {
"description": "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`",
"type": "number"
},
"divide": {
"description": "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`",
"items": {
"type": "number"
},
"minItems": 1,
"type": "array"
},
"extent": {
"description": "A two-element (`[min, max]`) array indicating the range of desired bin values.",
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"maxbins": {
"description": "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels",
"minimum": 2,
"type": "number"
},
"minstep": {
"description": "A minimum allowable step size (particularly useful for integer values).",
"type": "number"
},
"nice": {
"description": "If true (the default), attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.",
"type": "boolean"
},
"step": {
"description": "An exact step size to use between bins.\n\n__Note:__ If provided, options such as maxbins will be ignored.",
"type": "number"
},
"steps": {
"description": "An array of allowable step sizes to choose from.",
"items": {
"type": "number"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
},
"BinTransform": {
"additionalProperties": false,
"properties": {
"as": {
"description": "The output fields at which to write the start and end bin values.",
"type": "string"
},
"bin": {
"anyOf": [
{
"type": "boolean"
},
{
"$ref": "#/definitions/BinParams"
}
],
"description": "An object indicating bin properties, or simply `true` for using default bin parameters."
},
"field": {
"description": "The data field to bin.",
"type": "string"
}
},
"required": [
"bin",
"field",
"as"
],
"type": "object"
},
"BoxPlotConfig": {
"additionalProperties": false,
"properties": {
"align": {
"$ref": "#/definitions/HorizontalAlign",
"description": "The horizontal alignment of the text. One of `\"left\"`, `\"right\"`, `\"center\"`."
},
"angle": {
"description": "The rotation angle of the text, in degrees.",
"maximum": 360,
"minimum": 0,
"type": "number"
},
"baseline": {
"$ref": "#/definitions/VerticalAlign",
"description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`"
},
"color": {
"description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ <span style=\"color: #4682b4;\">■</span> `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).",
"type": "string"
},
"dx": {
"description": "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
"type": "number"
},
"dy": {
"description": "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
"type": "number"
},
"fill": {
"description": "Default Fill Color. This has higher precedence than config.color\n\n__Default value:__ (None)",
"type": "string"
},
"fillOpacity": {
"description": "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"filled": {
"description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).",
"type": "boolean"
},
"font": {
"description": "The typeface to set the text in (e.g., `\"Helvetica Neue\"`).",
"type": "string"
},
"fontSize": {
"description": "The font size, in pixels.",
"minimum": 0,
"type": "number"
},
"fontStyle": {
"$ref": "#/definitions/FontStyle",
"description": "The font style (e.g., `\"italic\"`)."
},
"fontWeight": {
"anyOf": [
{
"$ref": "#/definitions/FontWeight"
},
{
"$ref": "#/definitions/FontWeightNumber"
}
],
"description": "The font weight (e.g., `\"bold\"`)."
},
"interpolate": {
"$ref": "#/definitions/Interpolate",
"description": "The line interpolation method to use for line and area marks. One of the following:\n- `\"linear\"`: piecewise linear segments, as in a polyline.\n- `\"linear-closed\"`: close the linear segments to form a polygon.\n- `\"step\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"step-before\"`: alternate between vertical and horizontal segments, as in a step function.\n- `\"step-after\"`: alternate between horizontal and vertical segments, as in a step function.\n- `\"basis\"`: a B-spline, with control point duplication on the ends.\n- `\"basis-open\"`: an open B-spline; may not intersect the start or end.\n- `\"basis-closed\"`: a closed B-spline, as in a loop.\n- `\"cardinal\"`: a Cardinal spline, with control point duplication on the ends.\n- `\"cardinal-open\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\n- `\"cardinal-closed\"`: a closed Cardinal spline, as in a loop.\n- `\"bundle\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\n- `\"monotone\"`: cubic interpolation that preserves monotonicity in y."
},
"limit": {
"description": "The maximum length of the text mark in pixels (default 0, indicating no limit). The text value will be automatically truncated if the rendered size exceeds the limit.",
"type": "number"
},
"opacity": {
"description": "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"orient": {
"$ref": "#/definitions/Orient",
"description": "The orientation of a non-stacked bar, tick, area, and line charts.\nThe value is either horizontal (default) or vertical.\n- For bar, rule and tick, this determines whether the size of the bar and tick\nshould be applied to x or y dimension.\n- For area, this property determines the orient property of the Vega output.\n- For line, this property determines the sort order of the points in the line\nif `config.sortLineBy` is not specified.\nFor stacked charts, this is always determined by the orientation of the stack;\ntherefore explicitly specified value will be ignored."
},
"radius": {
"description": "Polar coordinate radial offset, in pixels, of the text label from the origin determined by the `x` and `y` properties.",
"minimum": 0,
"type": "number"
},
"shape": {
"description": "The default symbol shape to use. One of: `\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`, or `\"triangle-down\"`, or a custom SVG path.\n\n__Default value:__ `\"circle\"`",
"type": "string"
},
"size": {
"description": "Size of the box and mid tick of a box plot ",
"type": "number"
},
"stroke": {
"description": "Default Stroke Color. This has higher precedence than config.color\n\n__Default value:__ (None)",
"type": "string"
},
"strokeDash": {
"description": "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
"items": {
"type": "number"
},
"type": "array"
},
"strokeDashOffset": {
"description": "The offset (in pixels) into which to begin drawing with the stroke dash array.",
"type": "number"
},
"strokeOpacity": {
"description": "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
"maximum": 1,
"minimum": 0,
"type": "number"