@opendata-ai/openchart-core 9.1.0 → 9.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -449,6 +449,10 @@
449
449
  ],
450
450
  "description": "Corner radius for rect/bar marks. 'pill' sets rx to half the bar thickness."
451
451
  },
452
+ "mirror": {
453
+ "type": "boolean",
454
+ "description": "Mirror horizontal bars around a shared center axis (a population pyramid). Only meaningful when `type` is `'bar'`; needs a color field with exactly two values, the first drawn to the left. Defaults to false."
455
+ },
452
456
  "type": {
453
457
  "type": "string",
454
458
  "const": "bar"
@@ -686,7 +690,7 @@
686
690
  "$ref": "#/definitions/TrendlineConfig"
687
691
  }
688
692
  ],
689
- "description": "Overlay a least-squares regression line on scatter (point) marks. Defaults to true. Set `mark: { type: 'point', trendline: false }` to suppress it when the chart already carries its own reference line (e.g. a manual x=y diagonal in a separate layer), which would otherwise produce two competing diagonals.\n\nPass an object to control stacking order: the line renders `below` the points by default, but a dense scatter (thousands of overlapping dots) fully occludes a line drawn underneath, so `{ layer: 'above' }` lifts the reference line over the cloud."
693
+ "description": "Overlay a least-squares regression line on scatter (point) marks. Defaults to true. Set `mark: { type: 'point', trendline: false }` to suppress it when the chart already carries its own reference line (e.g. a manual x=y diagonal in a separate layer), which would otherwise produce two competing diagonals. In a faceted chart each panel gets its own fit.\n\nPass an object to control stacking order: the line renders `below` the points by default, but a dense scatter (thousands of overlapping dots) fully occludes a line drawn underneath, so `{ layer: 'above' }` lifts the reference line over the cloud."
690
694
  },
691
695
  "type": {
692
696
  "type": "string",
@@ -2446,7 +2450,7 @@
2446
2450
  },
2447
2451
  "facet": {
2448
2452
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
2449
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
2453
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
2450
2454
  },
2451
2455
  "row": {
2452
2456
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -5880,6 +5884,108 @@
5880
5884
  ],
5881
5885
  "description": "Resolution strategy for shared resources across layers. 'shared' (default): union domains, single axis/legend. 'independent': each layer gets its own scale/axis/legend."
5882
5886
  },
5887
+ "PlaybackConfig": {
5888
+ "type": "object",
5889
+ "properties": {
5890
+ "duration": {
5891
+ "type": "number",
5892
+ "description": "Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`."
5893
+ },
5894
+ "step": {
5895
+ "type": "number",
5896
+ "description": "Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`."
5897
+ },
5898
+ "gaps": {
5899
+ "type": "string",
5900
+ "enum": [
5901
+ "interpolate",
5902
+ "hold",
5903
+ "drop"
5904
+ ],
5905
+ "description": "Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent."
5906
+ },
5907
+ "holdEnd": {
5908
+ "type": "number",
5909
+ "description": "Time to dwell on the final frame in milliseconds. Defaults to 1500."
5910
+ },
5911
+ "loop": {
5912
+ "type": "boolean",
5913
+ "description": "Restart after the final hold. Defaults to false."
5914
+ },
5915
+ "autoplay": {
5916
+ "anyOf": [
5917
+ {
5918
+ "type": "string",
5919
+ "const": "visible"
5920
+ },
5921
+ {
5922
+ "type": "boolean"
5923
+ }
5924
+ ],
5925
+ "description": "Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay."
5926
+ },
5927
+ "controls": {
5928
+ "type": "boolean",
5929
+ "description": "Show play/pause, scrubber, and period readout. Defaults to true."
5930
+ },
5931
+ "period": {
5932
+ "anyOf": [
5933
+ {
5934
+ "type": "boolean",
5935
+ "const": false
5936
+ },
5937
+ {
5938
+ "type": "object",
5939
+ "properties": {
5940
+ "format": {
5941
+ "type": "string",
5942
+ "description": "Overrides the time channel's format."
5943
+ },
5944
+ "position": {
5945
+ "$ref": "#/definitions/PlaybackPeriodPosition",
5946
+ "description": "Where the label sits. Defaults to `auto`: centered for point charts, upper right for bars, and the corner that covers the least geography on maps."
5947
+ }
5948
+ },
5949
+ "additionalProperties": false
5950
+ }
5951
+ ],
5952
+ "description": "Large period label. On by default with automatic placement and the time channel's format. Set false to hide it."
5953
+ },
5954
+ "labels": {
5955
+ "type": "array",
5956
+ "items": {
5957
+ "type": "string"
5958
+ },
5959
+ "description": "Point marks only: keys whose name is drawn next to the mark for the whole run."
5960
+ },
5961
+ "trails": {
5962
+ "anyOf": [
5963
+ {
5964
+ "type": "boolean"
5965
+ },
5966
+ {
5967
+ "type": "array",
5968
+ "items": {
5969
+ "type": "string"
5970
+ }
5971
+ }
5972
+ ],
5973
+ "description": "Point marks only: draw past positions as a trail. `true` is every key; an array names keys. Defaults to false."
5974
+ }
5975
+ },
5976
+ "additionalProperties": false,
5977
+ "description": "Playback options for charts and maps with a `time` channel. Fields shared with the race's `race` block have the same names, types and defaults."
5978
+ },
5979
+ "PlaybackPeriodPosition": {
5980
+ "type": "string",
5981
+ "enum": [
5982
+ "auto",
5983
+ "center",
5984
+ "top-right",
5985
+ "bottom-left"
5986
+ ],
5987
+ "description": "Placement of the large faint period label behind a playback chart."
5988
+ },
5883
5989
  "ArcEncoding<DataRow>": {
5884
5990
  "type": "object",
5885
5991
  "properties": {
@@ -5982,7 +6088,7 @@
5982
6088
  },
5983
6089
  "facet": {
5984
6090
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
5985
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6091
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
5986
6092
  },
5987
6093
  "row": {
5988
6094
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6105,7 +6211,7 @@
6105
6211
  },
6106
6212
  "facet": {
6107
6213
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6108
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6214
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6109
6215
  },
6110
6216
  "row": {
6111
6217
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6228,7 +6334,7 @@
6228
6334
  },
6229
6335
  "facet": {
6230
6336
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6231
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6337
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6232
6338
  },
6233
6339
  "row": {
6234
6340
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6237,6 +6343,10 @@
6237
6343
  "column": {
6238
6344
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6239
6345
  "description": "Column facet channel: partitions data into side-by-side panels. Each unique value of the column field produces one panel, arranged in a single row. Shares the y-axis scale by default; x-axis is independent. Mutually exclusive with `facet` and `row`."
6346
+ },
6347
+ "time": {
6348
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6349
+ "description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
6240
6350
  }
6241
6351
  },
6242
6352
  "required": [
@@ -6351,7 +6461,7 @@
6351
6461
  },
6352
6462
  "facet": {
6353
6463
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6354
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6464
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6355
6465
  },
6356
6466
  "row": {
6357
6467
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6497,7 +6607,7 @@
6497
6607
  },
6498
6608
  "facet": {
6499
6609
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6500
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6610
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6501
6611
  },
6502
6612
  "row": {
6503
6613
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6506,6 +6616,10 @@
6506
6616
  "column": {
6507
6617
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6508
6618
  "description": "Column facet channel: partitions data into side-by-side panels. Each unique value of the column field produces one panel, arranged in a single row. Shares the y-axis scale by default; x-axis is independent. Mutually exclusive with `facet` and `row`."
6619
+ },
6620
+ "time": {
6621
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6622
+ "description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
6509
6623
  }
6510
6624
  },
6511
6625
  "required": [
@@ -6620,7 +6734,7 @@
6620
6734
  },
6621
6735
  "facet": {
6622
6736
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6623
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6737
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6624
6738
  },
6625
6739
  "row": {
6626
6740
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6629,6 +6743,10 @@
6629
6743
  "column": {
6630
6744
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6631
6745
  "description": "Column facet channel: partitions data into side-by-side panels. Each unique value of the column field produces one panel, arranged in a single row. Shares the y-axis scale by default; x-axis is independent. Mutually exclusive with `facet` and `row`."
6746
+ },
6747
+ "time": {
6748
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6749
+ "description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
6632
6750
  }
6633
6751
  },
6634
6752
  "required": [
@@ -6743,7 +6861,7 @@
6743
6861
  },
6744
6862
  "facet": {
6745
6863
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6746
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6864
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6747
6865
  },
6748
6866
  "row": {
6749
6867
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6866,7 +6984,7 @@
6866
6984
  },
6867
6985
  "facet": {
6868
6986
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6869
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6987
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6870
6988
  },
6871
6989
  "row": {
6872
6990
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -6985,7 +7103,7 @@
6985
7103
  },
6986
7104
  "facet": {
6987
7105
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
6988
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7106
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
6989
7107
  },
6990
7108
  "row": {
6991
7109
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7104,7 +7222,7 @@
7104
7222
  },
7105
7223
  "facet": {
7106
7224
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7107
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7225
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7108
7226
  },
7109
7227
  "row": {
7110
7228
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7226,7 +7344,7 @@
7226
7344
  },
7227
7345
  "facet": {
7228
7346
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7229
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7347
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7230
7348
  },
7231
7349
  "row": {
7232
7350
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7348,7 +7466,7 @@
7348
7466
  },
7349
7467
  "facet": {
7350
7468
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7351
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7469
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7352
7470
  },
7353
7471
  "row": {
7354
7472
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7471,7 +7589,7 @@
7471
7589
  },
7472
7590
  "facet": {
7473
7591
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7474
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7592
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7475
7593
  },
7476
7594
  "row": {
7477
7595
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7594,7 +7712,7 @@
7594
7712
  },
7595
7713
  "facet": {
7596
7714
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7597
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7715
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7598
7716
  },
7599
7717
  "row": {
7600
7718
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7702,7 +7820,7 @@
7702
7820
  },
7703
7821
  "facet": {
7704
7822
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7705
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7823
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7706
7824
  },
7707
7825
  "row": {
7708
7826
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7822,7 +7940,7 @@
7822
7940
  },
7823
7941
  "facet": {
7824
7942
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7825
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7943
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7826
7944
  },
7827
7945
  "row": {
7828
7946
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -7944,7 +8062,7 @@
7944
8062
  },
7945
8063
  "facet": {
7946
8064
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
7947
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
8065
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
7948
8066
  },
7949
8067
  "row": {
7950
8068
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -8066,7 +8184,7 @@
8066
8184
  },
8067
8185
  "facet": {
8068
8186
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
8069
- "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
8187
+ "description": "Facet channel: partitions data into a grid of small-multiple panels. Each unique value of the facet field produces one panel. Panels share x, y, color and size scales by default; use `resolve: { scale: { y: 'independent' } }` for per-panel axes."
8070
8188
  },
8071
8189
  "row": {
8072
8190
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -8528,6 +8646,10 @@
8528
8646
  "zIndex": {
8529
8647
  "type": "number",
8530
8648
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
8649
+ },
8650
+ "playback": {
8651
+ "$ref": "#/definitions/PlaybackConfig",
8652
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
8531
8653
  }
8532
8654
  },
8533
8655
  "required": [
@@ -8857,6 +8979,10 @@
8857
8979
  "zIndex": {
8858
8980
  "type": "number",
8859
8981
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
8982
+ },
8983
+ "playback": {
8984
+ "$ref": "#/definitions/PlaybackConfig",
8985
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
8860
8986
  }
8861
8987
  },
8862
8988
  "required": [
@@ -9185,6 +9311,10 @@
9185
9311
  "zIndex": {
9186
9312
  "type": "number",
9187
9313
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
9314
+ },
9315
+ "playback": {
9316
+ "$ref": "#/definitions/PlaybackConfig",
9317
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
9188
9318
  }
9189
9319
  },
9190
9320
  "required": [
@@ -9227,6 +9357,10 @@
9227
9357
  ],
9228
9358
  "description": "Corner radius for rect/bar marks. 'pill' sets rx to half the bar thickness."
9229
9359
  },
9360
+ "mirror": {
9361
+ "type": "boolean",
9362
+ "description": "Mirror horizontal bars around a shared center axis (a population pyramid). Only meaningful when `type` is `'bar'`; needs a color field with exactly two values, the first drawn to the left. Defaults to false."
9363
+ },
9230
9364
  "type": {
9231
9365
  "type": "string",
9232
9366
  "const": "bar"
@@ -9495,6 +9629,10 @@
9495
9629
  "zIndex": {
9496
9630
  "type": "number",
9497
9631
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
9632
+ },
9633
+ "playback": {
9634
+ "$ref": "#/definitions/PlaybackConfig",
9635
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
9498
9636
  }
9499
9637
  },
9500
9638
  "required": [
@@ -9823,6 +9961,10 @@
9823
9961
  "zIndex": {
9824
9962
  "type": "number",
9825
9963
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
9964
+ },
9965
+ "playback": {
9966
+ "$ref": "#/definitions/PlaybackConfig",
9967
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
9826
9968
  }
9827
9969
  },
9828
9970
  "required": [
@@ -9854,7 +9996,7 @@
9854
9996
  "$ref": "#/definitions/TrendlineConfig"
9855
9997
  }
9856
9998
  ],
9857
- "description": "Overlay a least-squares regression line on scatter (point) marks. Defaults to true. Set `mark: { type: 'point', trendline: false }` to suppress it when the chart already carries its own reference line (e.g. a manual x=y diagonal in a separate layer), which would otherwise produce two competing diagonals.\n\nPass an object to control stacking order: the line renders `below` the points by default, but a dense scatter (thousands of overlapping dots) fully occludes a line drawn underneath, so `{ layer: 'above' }` lifts the reference line over the cloud."
9999
+ "description": "Overlay a least-squares regression line on scatter (point) marks. Defaults to true. Set `mark: { type: 'point', trendline: false }` to suppress it when the chart already carries its own reference line (e.g. a manual x=y diagonal in a separate layer), which would otherwise produce two competing diagonals. In a faceted chart each panel gets its own fit.\n\nPass an object to control stacking order: the line renders `below` the points by default, but a dense scatter (thousands of overlapping dots) fully occludes a line drawn underneath, so `{ layer: 'above' }` lifts the reference line over the cloud."
9858
10000
  },
9859
10001
  "type": {
9860
10002
  "type": "string",
@@ -10124,6 +10266,10 @@
10124
10266
  "zIndex": {
10125
10267
  "type": "number",
10126
10268
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
10269
+ },
10270
+ "playback": {
10271
+ "$ref": "#/definitions/PlaybackConfig",
10272
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
10127
10273
  }
10128
10274
  },
10129
10275
  "required": [
@@ -10414,6 +10560,10 @@
10414
10560
  "zIndex": {
10415
10561
  "type": "number",
10416
10562
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
10563
+ },
10564
+ "playback": {
10565
+ "$ref": "#/definitions/PlaybackConfig",
10566
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
10417
10567
  }
10418
10568
  },
10419
10569
  "required": [
@@ -10704,6 +10854,10 @@
10704
10854
  "zIndex": {
10705
10855
  "type": "number",
10706
10856
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
10857
+ },
10858
+ "playback": {
10859
+ "$ref": "#/definitions/PlaybackConfig",
10860
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
10707
10861
  }
10708
10862
  },
10709
10863
  "required": [
@@ -10994,6 +11148,10 @@
10994
11148
  "zIndex": {
10995
11149
  "type": "number",
10996
11150
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
11151
+ },
11152
+ "playback": {
11153
+ "$ref": "#/definitions/PlaybackConfig",
11154
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
10997
11155
  }
10998
11156
  },
10999
11157
  "required": [
@@ -11297,6 +11455,10 @@
11297
11455
  "zIndex": {
11298
11456
  "type": "number",
11299
11457
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
11458
+ },
11459
+ "playback": {
11460
+ "$ref": "#/definitions/PlaybackConfig",
11461
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
11300
11462
  }
11301
11463
  },
11302
11464
  "required": [
@@ -11630,6 +11792,10 @@
11630
11792
  "zIndex": {
11631
11793
  "type": "number",
11632
11794
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
11795
+ },
11796
+ "playback": {
11797
+ "$ref": "#/definitions/PlaybackConfig",
11798
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
11633
11799
  }
11634
11800
  },
11635
11801
  "required": [
@@ -11950,6 +12116,10 @@
11950
12116
  "zIndex": {
11951
12117
  "type": "number",
11952
12118
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
12119
+ },
12120
+ "playback": {
12121
+ "$ref": "#/definitions/PlaybackConfig",
12122
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
11953
12123
  }
11954
12124
  },
11955
12125
  "required": [
@@ -12240,6 +12410,10 @@
12240
12410
  "zIndex": {
12241
12411
  "type": "number",
12242
12412
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
12413
+ },
12414
+ "playback": {
12415
+ "$ref": "#/definitions/PlaybackConfig",
12416
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
12243
12417
  }
12244
12418
  },
12245
12419
  "required": [
@@ -12542,6 +12716,10 @@
12542
12716
  "zIndex": {
12543
12717
  "type": "number",
12544
12718
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
12719
+ },
12720
+ "playback": {
12721
+ "$ref": "#/definitions/PlaybackConfig",
12722
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
12545
12723
  }
12546
12724
  },
12547
12725
  "required": [
@@ -12832,6 +13010,10 @@
12832
13010
  "zIndex": {
12833
13011
  "type": "number",
12834
13012
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
13013
+ },
13014
+ "playback": {
13015
+ "$ref": "#/definitions/PlaybackConfig",
13016
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
12835
13017
  }
12836
13018
  },
12837
13019
  "required": [
@@ -13134,6 +13316,10 @@
13134
13316
  "zIndex": {
13135
13317
  "type": "number",
13136
13318
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
13319
+ },
13320
+ "playback": {
13321
+ "$ref": "#/definitions/PlaybackConfig",
13322
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
13137
13323
  }
13138
13324
  },
13139
13325
  "required": [
@@ -13461,6 +13647,10 @@
13461
13647
  "zIndex": {
13462
13648
  "type": "number",
13463
13649
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
13650
+ },
13651
+ "playback": {
13652
+ "$ref": "#/definitions/PlaybackConfig",
13653
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
13464
13654
  }
13465
13655
  },
13466
13656
  "required": [
@@ -13779,6 +13969,10 @@
13779
13969
  "zIndex": {
13780
13970
  "type": "number",
13781
13971
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
13972
+ },
13973
+ "playback": {
13974
+ "$ref": "#/definitions/PlaybackConfig",
13975
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
13782
13976
  }
13783
13977
  },
13784
13978
  "required": [
@@ -14119,6 +14313,10 @@
14119
14313
  "zIndex": {
14120
14314
  "type": "number",
14121
14315
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
14316
+ },
14317
+ "playback": {
14318
+ "$ref": "#/definitions/PlaybackConfig",
14319
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
14122
14320
  }
14123
14321
  },
14124
14322
  "required": [
@@ -15742,6 +15940,10 @@
15742
15940
  "valueFormat": {
15743
15941
  "type": "string",
15744
15942
  "description": "d3-format string applied to tile values, legend labels, and tooltips. Examples: \".1f\" for one decimal, \"$,.0f\" for currency, \"~s\" for SI."
15943
+ },
15944
+ "playback": {
15945
+ "$ref": "#/definitions/PlaybackConfig",
15946
+ "description": "Playback timing, controls and period label. Applies when `encoding.time` is set."
15745
15947
  }
15746
15948
  },
15747
15949
  "required": [
@@ -15778,6 +15980,10 @@
15778
15980
  }
15779
15981
  ],
15780
15982
  "description": "Tooltip encoding (optional)."
15983
+ },
15984
+ "time": {
15985
+ "$ref": "#/definitions/EncodingChannel",
15986
+ "description": "Playback field (optional). Each distinct value is one period; tiles recolor as the map plays."
15781
15987
  }
15782
15988
  },
15783
15989
  "required": [
@@ -15871,6 +16077,10 @@
15871
16077
  "animation": {
15872
16078
  "$ref": "#/definitions/AnimationSpec",
15873
16079
  "description": "Motion. On by default: the entrance plays once the visualization scrolls into view, and data updates animate. Set false to turn all motion off, or pass an object to configure each phase. Static rendering and exports never animate, and prefers-reduced-motion always wins."
16080
+ },
16081
+ "playback": {
16082
+ "$ref": "#/definitions/PlaybackConfig",
16083
+ "description": "Playback timing, controls and period label. Applies when `encoding.time` or `points.time` is set."
15874
16084
  }
15875
16085
  },
15876
16086
  "required": [
@@ -16183,6 +16393,10 @@
16183
16393
  }
16184
16394
  ],
16185
16395
  "description": "Tooltip encoding (optional)."
16396
+ },
16397
+ "time": {
16398
+ "$ref": "#/definitions/EncodingChannel",
16399
+ "description": "Playback field (optional). Each distinct value is one period; features recolor as the map plays."
16186
16400
  }
16187
16401
  },
16188
16402
  "additionalProperties": false,
@@ -16243,6 +16457,10 @@
16243
16457
  "opacity": {
16244
16458
  "type": "number",
16245
16459
  "description": "Fill opacity for point circles. Default 0.65. Range 0-1."
16460
+ },
16461
+ "time": {
16462
+ "$ref": "#/definitions/EncodingChannel",
16463
+ "description": "Playback field (optional). Point size and color follow each period; requires `key`."
16246
16464
  }
16247
16465
  },
16248
16466
  "required": [
@@ -16724,6 +16942,10 @@
16724
16942
  "$ref": "#/definitions/RaceConfig",
16725
16943
  "description": "Ranking and playback options. Omit to use the race defaults."
16726
16944
  },
16945
+ "playback": {
16946
+ "$ref": "#/definitions/PlaybackTimingConfig",
16947
+ "description": "Playback timing in the shared form. Setting a field here and in `race` is an error."
16948
+ },
16727
16949
  "chrome": {
16728
16950
  "$ref": "#/definitions/Chrome",
16729
16951
  "description": "Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text."
@@ -17056,7 +17278,7 @@
17056
17278
  "required": [
17057
17279
  "field"
17058
17280
  ],
17059
- "description": "Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use `sort` or first-seen order."
17281
+ "description": "Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use a `sort` array, first-seen order, or the reverse of first-seen order with `sort: \"descending\"`."
17060
17282
  },
17061
17283
  "key": {
17062
17284
  "type": "object",
@@ -17920,6 +18142,77 @@
17920
18142
  "additionalProperties": false,
17921
18143
  "description": "Ranking and playback options for a race."
17922
18144
  },
18145
+ "PlaybackTimingConfig": {
18146
+ "type": "object",
18147
+ "properties": {
18148
+ "duration": {
18149
+ "type": "number",
18150
+ "description": "Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`."
18151
+ },
18152
+ "step": {
18153
+ "type": "number",
18154
+ "description": "Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`."
18155
+ },
18156
+ "gaps": {
18157
+ "type": "string",
18158
+ "enum": [
18159
+ "interpolate",
18160
+ "hold",
18161
+ "drop"
18162
+ ],
18163
+ "description": "Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent."
18164
+ },
18165
+ "holdEnd": {
18166
+ "type": "number",
18167
+ "description": "Time to dwell on the final frame in milliseconds. Defaults to 1500."
18168
+ },
18169
+ "loop": {
18170
+ "type": "boolean",
18171
+ "description": "Restart after the final hold. Defaults to false."
18172
+ },
18173
+ "autoplay": {
18174
+ "anyOf": [
18175
+ {
18176
+ "type": "string",
18177
+ "const": "visible"
18178
+ },
18179
+ {
18180
+ "type": "boolean"
18181
+ }
18182
+ ],
18183
+ "description": "Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay."
18184
+ },
18185
+ "controls": {
18186
+ "type": "boolean",
18187
+ "description": "Show play/pause, scrubber, and period readout. Defaults to true."
18188
+ },
18189
+ "period": {
18190
+ "anyOf": [
18191
+ {
18192
+ "type": "boolean",
18193
+ "const": false
18194
+ },
18195
+ {
18196
+ "type": "object",
18197
+ "properties": {
18198
+ "format": {
18199
+ "type": "string",
18200
+ "description": "Overrides the time channel's format."
18201
+ },
18202
+ "position": {
18203
+ "$ref": "#/definitions/PlaybackPeriodPosition",
18204
+ "description": "Where the label sits. Defaults to `auto`: centered for point charts, upper right for bars, and the corner that covers the least geography on maps."
18205
+ }
18206
+ },
18207
+ "additionalProperties": false
18208
+ }
18209
+ ],
18210
+ "description": "Large period label. On by default with automatic placement and the time channel's format. Set false to hide it."
18211
+ }
18212
+ },
18213
+ "additionalProperties": false,
18214
+ "description": "The playback timing fields a race accepts in its top-level `playback` block."
18215
+ },
17923
18216
  "ChartSpecBase": {
17924
18217
  "type": "object",
17925
18218
  "additionalProperties": false,
@@ -18130,6 +18423,10 @@
18130
18423
  "zIndex": {
18131
18424
  "type": "number",
18132
18425
  "description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
18426
+ },
18427
+ "playback": {
18428
+ "$ref": "#/definitions/PlaybackConfig",
18429
+ "description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
18133
18430
  }
18134
18431
  }
18135
18432
  }