@opendata-ai/openchart-core 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,9 +31,12 @@
31
31
  },
32
32
  {
33
33
  "$ref": "#/definitions/BarListSpec"
34
+ },
35
+ {
36
+ "$ref": "#/definitions/RaceSpec"
34
37
  }
35
38
  ],
36
- "description": "Top-level visualization spec: union discriminated by structural shape.\n\n- ChartSpec: has `mark` field (no `type`, no `layer`)\n- LayerSpec: has `layer` field\n- TableSpec: has `type: 'table'`\n- GraphSpec: has `type: 'graph'`\n- SankeySpec: has `type: 'sankey'`\n- TileMapSpec: has `type: 'tilemap'`\n- GeoMapSpec: has `type: 'map'`\n- BarListSpec: has `type: 'barlist'`\n\nElection parliament (hemicycle) charts are `ChartSpec` with `mark: 'parliament'`, not a separate top-level type: seat data (party + seats) maps naturally onto encoding.color/y like arc and waffle, and riding the existing chart pipeline gets scales, legend, tooltips, a11y, and dark mode for free instead of a second bespoke compile path (see `packages/engine/src/charts/parliament/`)."
39
+ "description": "Top-level visualization spec: union discriminated by structural shape.\n\n- ChartSpec: has `mark` field (no `type`, no `layer`)\n- LayerSpec: has `layer` field\n- TableSpec: has `type: 'table'`\n- GraphSpec: has `type: 'graph'`\n- SankeySpec: has `type: 'sankey'`\n- TileMapSpec: has `type: 'tilemap'`\n- GeoMapSpec: has `type: 'map'`\n- BarListSpec: has `type: 'barlist'`\n- RaceSpec: has `type: 'race'`\n\nElection parliament (hemicycle) charts are `ChartSpec` with `mark: 'parliament'`, not a separate top-level type: seat data (party + seats) maps naturally onto encoding.color/y like arc and waffle, and riding the existing chart pipeline gets scales, legend, tooltips, a11y, and dark mode for free instead of a second bespoke compile path (see `packages/engine/src/charts/parliament/`)."
37
40
  },
38
41
  "ChartSpec": {
39
42
  "anyOf": [
@@ -5544,7 +5547,7 @@
5544
5547
  "$ref": "#/definitions/AnimationConfig"
5545
5548
  }
5546
5549
  ],
5547
- "description": "Animation spec property.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
5550
+ "description": "Animation spec property.\n- omitted or true: every phase (enter, update, exit) with its defaults\n- false: all motion off\n- preset name: that motion language across every phase\n- AnimationConfig: full control via enter/update/exit phases"
5548
5551
  },
5549
5552
  "AnimationPreset": {
5550
5553
  "type": "string",
@@ -5564,13 +5567,13 @@
5564
5567
  "enter": {
5565
5568
  "anyOf": [
5566
5569
  {
5567
- "$ref": "#/definitions/AnimationPhaseConfig"
5570
+ "$ref": "#/definitions/EnterPhaseConfig"
5568
5571
  },
5569
5572
  {
5570
5573
  "type": "boolean"
5571
5574
  }
5572
5575
  ],
5573
- "description": "Entrance animation when chart first renders."
5576
+ "description": "Entrance animation when chart first renders (by default, once it scrolls into view)."
5574
5577
  },
5575
5578
  "update": {
5576
5579
  "anyOf": [
@@ -5596,13 +5599,13 @@
5596
5599
  },
5597
5600
  "annotationDelay": {
5598
5601
  "type": "number",
5599
- "description": "Delay before annotations animate in (ms after marks). Default: 200."
5602
+ "description": "Gap in ms between the last mark reaching 90% of its entrance and annotations starting. Default: 150 (0 under a preset)."
5600
5603
  }
5601
5604
  },
5602
5605
  "additionalProperties": false,
5603
5606
  "description": "Full animation config object. Structured as enter/update/exit phases following Vega's encoding set model."
5604
5607
  },
5605
- "AnimationPhaseConfig": {
5608
+ "EnterPhaseConfig": {
5606
5609
  "type": "object",
5607
5610
  "properties": {
5608
5611
  "spring": {
@@ -5611,11 +5614,11 @@
5611
5614
  },
5612
5615
  "duration": {
5613
5616
  "type": "number",
5614
- "description": "Duration in ms. Default: 500 for enter."
5617
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5615
5618
  },
5616
5619
  "ease": {
5617
5620
  "$ref": "#/definitions/AnimationEase",
5618
- "description": "Easing preset. Default: 'smooth'."
5621
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5619
5622
  },
5620
5623
  "stagger": {
5621
5624
  "anyOf": [
@@ -5627,10 +5630,18 @@
5627
5630
  }
5628
5631
  ],
5629
5632
  "description": "Stagger config. true = defaults, false = no stagger. Default: true for enter."
5633
+ },
5634
+ "trigger": {
5635
+ "type": "string",
5636
+ "enum": [
5637
+ "visible",
5638
+ "mount"
5639
+ ],
5640
+ "description": "When the entrance starts. Default: 'visible'.\n- `visible`: hold the from-state until at least 25% of the chart (or 25% of the viewport's height, for a chart taller than the viewport) is on screen, then play. A chart already in view at mount plays at once.\n- `mount`: play as soon as the chart mounts, scrolled into view or not.\n\nIgnored by export and server-side rendering, which never animate."
5630
5641
  }
5631
5642
  },
5632
5643
  "additionalProperties": false,
5633
- "description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
5644
+ "description": "Entrance phase config. Adds `trigger` on top of the shared phase options."
5634
5645
  },
5635
5646
  "SpringConfig": {
5636
5647
  "type": "object",
@@ -5652,16 +5663,17 @@
5652
5663
  "type": "string",
5653
5664
  "enum": [
5654
5665
  "smooth",
5655
- "snappy"
5666
+ "snappy",
5667
+ "gentle"
5656
5668
  ],
5657
- "description": "Named easing presets for entrance animations. Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention."
5669
+ "description": "Named easing presets for entrance animations. Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention.\n- `smooth` (default): soft ease-out with a gentle start that settles late, no overshoot.\n- `snappy`: a fast attack, settling by about half the duration.\n- `gentle`: the previous default, a slower ease-out."
5658
5670
  },
5659
5671
  "AnimationStagger": {
5660
5672
  "type": "object",
5661
5673
  "properties": {
5662
5674
  "delay": {
5663
5675
  "type": "number",
5664
- "description": "Delay between each element in ms. Default: 80"
5676
+ "description": "Gap between consecutive elements in ms. Default: 80. A ceiling: the whole stagger spans at most 450ms, so n elements land min(delay, 450 / (n - 1)) apart."
5665
5677
  },
5666
5678
  "order": {
5667
5679
  "type": "string",
@@ -5685,11 +5697,11 @@
5685
5697
  },
5686
5698
  "duration": {
5687
5699
  "type": "number",
5688
- "description": "Duration in ms. Default: 500 for enter."
5700
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5689
5701
  },
5690
5702
  "ease": {
5691
5703
  "$ref": "#/definitions/AnimationEase",
5692
- "description": "Easing preset. Default: 'smooth'."
5704
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5693
5705
  },
5694
5706
  "stagger": {
5695
5707
  "anyOf": [
@@ -5704,19 +5716,49 @@
5704
5716
  },
5705
5717
  "maxMarks": {
5706
5718
  "type": "number",
5707
- "description": "Maximum mark count that still runs a tweened data-update transition. Default: 500. Above the cap the chart swaps instantly instead, because per-frame SVG attribute writes on thousands of elements drop frames on low-end devices. Raise it deliberately when the audience is desktop-heavy and you have measured the frame budget."
5719
+ "description": "Maximum mark count that still runs a tweened data-update transition. Charts default to 500 (20000 in canvas mark mode); bar lists, tile maps, sankeys and maps have no cap unless you set one; tables ignore it. Above the cap the visualization swaps instantly instead, because per-frame SVG attribute writes on thousands of elements drop frames on low-end devices. Raise it deliberately when the audience is desktop-heavy and you have measured the frame budget."
5708
5720
  }
5709
5721
  },
5710
5722
  "additionalProperties": false,
5711
5723
  "description": "Data-update phase config. Adds `maxMarks` on top of the shared phase options; the cap is meaningless for enter/exit, which animate via CSS."
5712
5724
  },
5725
+ "AnimationPhaseConfig": {
5726
+ "type": "object",
5727
+ "properties": {
5728
+ "spring": {
5729
+ "$ref": "#/definitions/SpringConfig",
5730
+ "description": "Spring mode. Cannot be combined with duration or ease in this phase."
5731
+ },
5732
+ "duration": {
5733
+ "type": "number",
5734
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5735
+ },
5736
+ "ease": {
5737
+ "$ref": "#/definitions/AnimationEase",
5738
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5739
+ },
5740
+ "stagger": {
5741
+ "anyOf": [
5742
+ {
5743
+ "$ref": "#/definitions/AnimationStagger"
5744
+ },
5745
+ {
5746
+ "type": "boolean"
5747
+ }
5748
+ ],
5749
+ "description": "Stagger config. true = defaults, false = no stagger. Default: true for enter."
5750
+ }
5751
+ },
5752
+ "additionalProperties": false,
5753
+ "description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
5754
+ },
5713
5755
  "Display": {
5714
5756
  "type": "string",
5715
5757
  "enum": [
5716
5758
  "full",
5717
5759
  "sparkline"
5718
5760
  ],
5719
- "description": "Chart display mode.\n- `'full'` (default): standard chart with chrome, axes, legend, padding.\n- `'sparkline'`: minimal inline mini-chart. Strips chrome, axes, legend, watermark, animation, and reduces margins to a tiny safety pad. The mark fills the container edge-to-edge. Best with `mark: 'line' | 'area' | 'bar'`. Explicit user fields (chrome, legend, encoding.x.axis, etc.) still render when set, so users can opt in to specific elements."
5761
+ "description": "Chart display mode.\n- `'full'` (default): standard chart with chrome, axes, legend, padding.\n- `'sparkline'`: minimal inline mini-chart. Strips chrome, axes, legend, watermark, and reduces margins to a tiny safety pad. The mark fills the container edge-to-edge. Best with `mark: 'line' | 'area' | 'bar'`. Explicit user fields (chrome, legend, encoding.x.axis, etc.) still render when set, so users can opt in to specific elements."
5720
5762
  },
5721
5763
  "SeriesSearchConfig": {
5722
5764
  "type": "object",
@@ -8189,7 +8231,7 @@
8189
8231
  },
8190
8232
  "animation": {
8191
8233
  "$ref": "#/definitions/AnimationSpec",
8192
- "description": "Animation configuration."
8234
+ "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."
8193
8235
  }
8194
8236
  },
8195
8237
  "required": [
@@ -8454,7 +8496,7 @@
8454
8496
  },
8455
8497
  "animation": {
8456
8498
  "$ref": "#/definitions/AnimationSpec",
8457
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
8499
+ "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."
8458
8500
  },
8459
8501
  "crosshair": {
8460
8502
  "type": "boolean",
@@ -8783,7 +8825,7 @@
8783
8825
  },
8784
8826
  "animation": {
8785
8827
  "$ref": "#/definitions/AnimationSpec",
8786
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
8828
+ "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."
8787
8829
  },
8788
8830
  "crosshair": {
8789
8831
  "type": "boolean",
@@ -9111,7 +9153,7 @@
9111
9153
  },
9112
9154
  "animation": {
9113
9155
  "$ref": "#/definitions/AnimationSpec",
9114
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
9156
+ "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."
9115
9157
  },
9116
9158
  "crosshair": {
9117
9159
  "type": "boolean",
@@ -9421,7 +9463,7 @@
9421
9463
  },
9422
9464
  "animation": {
9423
9465
  "$ref": "#/definitions/AnimationSpec",
9424
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
9466
+ "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."
9425
9467
  },
9426
9468
  "crosshair": {
9427
9469
  "type": "boolean",
@@ -9749,7 +9791,7 @@
9749
9791
  },
9750
9792
  "animation": {
9751
9793
  "$ref": "#/definitions/AnimationSpec",
9752
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
9794
+ "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."
9753
9795
  },
9754
9796
  "crosshair": {
9755
9797
  "type": "boolean",
@@ -10050,7 +10092,7 @@
10050
10092
  },
10051
10093
  "animation": {
10052
10094
  "$ref": "#/definitions/AnimationSpec",
10053
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
10095
+ "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."
10054
10096
  },
10055
10097
  "crosshair": {
10056
10098
  "type": "boolean",
@@ -10340,7 +10382,7 @@
10340
10382
  },
10341
10383
  "animation": {
10342
10384
  "$ref": "#/definitions/AnimationSpec",
10343
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
10385
+ "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."
10344
10386
  },
10345
10387
  "crosshair": {
10346
10388
  "type": "boolean",
@@ -10630,7 +10672,7 @@
10630
10672
  },
10631
10673
  "animation": {
10632
10674
  "$ref": "#/definitions/AnimationSpec",
10633
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
10675
+ "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."
10634
10676
  },
10635
10677
  "crosshair": {
10636
10678
  "type": "boolean",
@@ -10920,7 +10962,7 @@
10920
10962
  },
10921
10963
  "animation": {
10922
10964
  "$ref": "#/definitions/AnimationSpec",
10923
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
10965
+ "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."
10924
10966
  },
10925
10967
  "crosshair": {
10926
10968
  "type": "boolean",
@@ -11223,7 +11265,7 @@
11223
11265
  },
11224
11266
  "animation": {
11225
11267
  "$ref": "#/definitions/AnimationSpec",
11226
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
11268
+ "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."
11227
11269
  },
11228
11270
  "crosshair": {
11229
11271
  "type": "boolean",
@@ -11556,7 +11598,7 @@
11556
11598
  },
11557
11599
  "animation": {
11558
11600
  "$ref": "#/definitions/AnimationSpec",
11559
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
11601
+ "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."
11560
11602
  },
11561
11603
  "crosshair": {
11562
11604
  "type": "boolean",
@@ -11876,7 +11918,7 @@
11876
11918
  },
11877
11919
  "animation": {
11878
11920
  "$ref": "#/definitions/AnimationSpec",
11879
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
11921
+ "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."
11880
11922
  },
11881
11923
  "crosshair": {
11882
11924
  "type": "boolean",
@@ -12166,7 +12208,7 @@
12166
12208
  },
12167
12209
  "animation": {
12168
12210
  "$ref": "#/definitions/AnimationSpec",
12169
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
12211
+ "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."
12170
12212
  },
12171
12213
  "crosshair": {
12172
12214
  "type": "boolean",
@@ -12468,7 +12510,7 @@
12468
12510
  },
12469
12511
  "animation": {
12470
12512
  "$ref": "#/definitions/AnimationSpec",
12471
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
12513
+ "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."
12472
12514
  },
12473
12515
  "crosshair": {
12474
12516
  "type": "boolean",
@@ -12758,7 +12800,7 @@
12758
12800
  },
12759
12801
  "animation": {
12760
12802
  "$ref": "#/definitions/AnimationSpec",
12761
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
12803
+ "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."
12762
12804
  },
12763
12805
  "crosshair": {
12764
12806
  "type": "boolean",
@@ -13060,7 +13102,7 @@
13060
13102
  },
13061
13103
  "animation": {
13062
13104
  "$ref": "#/definitions/AnimationSpec",
13063
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
13105
+ "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."
13064
13106
  },
13065
13107
  "crosshair": {
13066
13108
  "type": "boolean",
@@ -13387,7 +13429,7 @@
13387
13429
  },
13388
13430
  "animation": {
13389
13431
  "$ref": "#/definitions/AnimationSpec",
13390
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
13432
+ "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."
13391
13433
  },
13392
13434
  "crosshair": {
13393
13435
  "type": "boolean",
@@ -13705,7 +13747,7 @@
13705
13747
  },
13706
13748
  "animation": {
13707
13749
  "$ref": "#/definitions/AnimationSpec",
13708
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
13750
+ "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."
13709
13751
  },
13710
13752
  "crosshair": {
13711
13753
  "type": "boolean",
@@ -14045,7 +14087,7 @@
14045
14087
  },
14046
14088
  "animation": {
14047
14089
  "$ref": "#/definitions/AnimationSpec",
14048
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
14090
+ "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."
14049
14091
  },
14050
14092
  "crosshair": {
14051
14093
  "type": "boolean",
@@ -14236,7 +14278,7 @@
14236
14278
  },
14237
14279
  "animation": {
14238
14280
  "$ref": "#/definitions/AnimationSpec",
14239
- "description": "Animation configuration."
14281
+ "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."
14240
14282
  }
14241
14283
  },
14242
14284
  "required": [
@@ -14362,7 +14404,7 @@
14362
14404
  },
14363
14405
  "animation": {
14364
14406
  "$ref": "#/definitions/AnimationSpec",
14365
- "description": "Animation configuration for entrance animations."
14407
+ "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. Tables animate their entrance only; updates re-render instantly."
14366
14408
  }
14367
14409
  },
14368
14410
  "required": [
@@ -14714,7 +14756,7 @@
14714
14756
  },
14715
14757
  "animation": {
14716
14758
  "$ref": "#/definitions/GraphAnimationSpec",
14717
- "description": "Motion configuration. DEFAULT-ON: omit for full defaults, `false` to opt out of choreography (layout warmup still applies)."
14759
+ "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. Layout warmup still runs when false."
14718
14760
  },
14719
14761
  "interaction": {
14720
14762
  "$ref": "#/definitions/GraphInteractionConfig",
@@ -15012,7 +15054,7 @@
15012
15054
  "$ref": "#/definitions/GraphAnimationConfig"
15013
15055
  }
15014
15056
  ],
15015
- "description": "Graph motion spec.\n- omitted → full defaults (default-ON)\n- `false` → no choreography (warmup still applies)\n- object → per-phase control\n\n`prefers-reduced-motion` is always respected regardless of this value."
15057
+ "description": "Graph motion spec.\n- omitted or `true` → full defaults\n- `false` → no choreography (warmup still applies)\n- object → per-phase control\n\n`prefers-reduced-motion` is always respected regardless of this value."
15016
15058
  },
15017
15059
  "GraphAnimationConfig": {
15018
15060
  "type": "object",
@@ -15020,18 +15062,18 @@
15020
15062
  "enter": {
15021
15063
  "anyOf": [
15022
15064
  {
15023
- "$ref": "#/definitions/AnimationPhaseConfig"
15065
+ "$ref": "#/definitions/GraphEnterPhaseConfig"
15024
15066
  },
15025
15067
  {
15026
15068
  "type": "boolean"
15027
15069
  }
15028
15070
  ],
15029
- "description": "Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true }`."
15071
+ "description": "Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true, trigger: 'visible' }`."
15030
15072
  },
15031
15073
  "update": {
15032
15074
  "anyOf": [
15033
15075
  {
15034
- "$ref": "#/definitions/AnimationPhaseConfig"
15076
+ "$ref": "#/definitions/GraphPhaseConfig"
15035
15077
  },
15036
15078
  {
15037
15079
  "type": "boolean"
@@ -15042,7 +15084,7 @@
15042
15084
  "exit": {
15043
15085
  "anyOf": [
15044
15086
  {
15045
- "$ref": "#/definitions/AnimationPhaseConfig"
15087
+ "$ref": "#/definitions/GraphPhaseConfig"
15046
15088
  },
15047
15089
  {
15048
15090
  "type": "boolean"
@@ -15092,7 +15134,65 @@
15092
15134
  }
15093
15135
  },
15094
15136
  "additionalProperties": false,
15095
- "description": "Per-phase and per-behavior motion config for a graph.\n\nDEFAULT-ON semantics (deliberately different from charts, which are opt-in): omit `animation` → the resolver returns full defaults; `animation: false` → no choreography (but `layout.warmup` still applies); a per-phase `false` disables just that phase. Graphs are default-on because physics motion already exists on load and choreography reduces the chaos."
15137
+ "description": "Per-phase and per-behavior motion config for a graph. A per-phase `false` disables just that phase."
15138
+ },
15139
+ "GraphEnterPhaseConfig": {
15140
+ "type": "object",
15141
+ "properties": {
15142
+ "duration": {
15143
+ "type": "number",
15144
+ "description": "Duration in ms."
15145
+ },
15146
+ "ease": {
15147
+ "$ref": "#/definitions/AnimationEase",
15148
+ "description": "Easing preset."
15149
+ },
15150
+ "spring": {
15151
+ "$ref": "#/definitions/SpringConfig",
15152
+ "description": "Spring mode. Cannot be combined with duration or ease in this phase."
15153
+ },
15154
+ "stagger": {
15155
+ "anyOf": [
15156
+ {
15157
+ "type": "boolean"
15158
+ },
15159
+ {
15160
+ "$ref": "#/definitions/AnimationStagger"
15161
+ }
15162
+ ],
15163
+ "description": "Stagger the reveal. Default: true. Graphs order their reveal by layout, so only on/off applies.",
15164
+ "deprecated": "The object form (`{ delay, order }`) is ignored: any value\nother than `false` staggers. Use `true` or `false`."
15165
+ },
15166
+ "trigger": {
15167
+ "type": "string",
15168
+ "enum": [
15169
+ "visible",
15170
+ "mount"
15171
+ ],
15172
+ "description": "When the entrance starts. Default: 'visible'.\n- `visible`: wait until the graph is on screen, then play.\n- `mount`: play as soon as the graph mounts."
15173
+ }
15174
+ },
15175
+ "additionalProperties": false,
15176
+ "description": "Graph entrance phase: adds the reveal stagger toggle and the trigger."
15177
+ },
15178
+ "GraphPhaseConfig": {
15179
+ "type": "object",
15180
+ "properties": {
15181
+ "duration": {
15182
+ "type": "number",
15183
+ "description": "Duration in ms."
15184
+ },
15185
+ "ease": {
15186
+ "$ref": "#/definitions/AnimationEase",
15187
+ "description": "Easing preset."
15188
+ },
15189
+ "spring": {
15190
+ "$ref": "#/definitions/SpringConfig",
15191
+ "description": "Spring mode. Cannot be combined with duration or ease in this phase."
15192
+ }
15193
+ },
15194
+ "additionalProperties": false,
15195
+ "description": "One graph motion phase: a tween (duration + ease) or a spring."
15096
15196
  },
15097
15197
  "GraphInteractionConfig": {
15098
15198
  "type": "object",
@@ -15254,7 +15354,20 @@
15254
15354
  },
15255
15355
  "animation": {
15256
15356
  "$ref": "#/definitions/AnimationSpec",
15257
- "description": "Animation configuration for entrance animations."
15357
+ "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."
15358
+ },
15359
+ "overrides": {
15360
+ "type": "object",
15361
+ "properties": {
15362
+ "compact": {
15363
+ "$ref": "#/definitions/SankeySpecOverride"
15364
+ },
15365
+ "medium": {
15366
+ "$ref": "#/definitions/SankeySpecOverride"
15367
+ }
15368
+ },
15369
+ "additionalProperties": false,
15370
+ "description": "Breakpoint-specific settings: `compact` applies under 400px, `medium` from 400 to 700px. The active block merges over the top-level spec; `chrome` merges one level deep, every other field replaces its top-level value. Typical use: fold small flows into \"Other\" only on phones."
15258
15371
  }
15259
15372
  },
15260
15373
  "required": [
@@ -15508,6 +15621,60 @@
15508
15621
  ],
15509
15622
  "description": "Link coloring strategy for sankey diagrams."
15510
15623
  },
15624
+ "SankeySpecOverride": {
15625
+ "type": "object",
15626
+ "properties": {
15627
+ "chrome": {
15628
+ "$ref": "#/definitions/Chrome",
15629
+ "description": "Editorial chrome at this breakpoint, merged over the top-level chrome."
15630
+ },
15631
+ "other": {
15632
+ "anyOf": [
15633
+ {
15634
+ "type": "number"
15635
+ },
15636
+ {
15637
+ "type": "object",
15638
+ "properties": {
15639
+ "threshold": {
15640
+ "type": "number"
15641
+ },
15642
+ "label": {
15643
+ "type": "string"
15644
+ }
15645
+ },
15646
+ "required": [
15647
+ "threshold"
15648
+ ],
15649
+ "additionalProperties": false
15650
+ }
15651
+ ],
15652
+ "description": "\"Other\" bucketing at this breakpoint (see `SankeySpec.other`)."
15653
+ },
15654
+ "nodeSort": {
15655
+ "type": "array",
15656
+ "items": {
15657
+ "type": "string"
15658
+ },
15659
+ "description": "Node order at this breakpoint (see `SankeySpec.nodeSort`)."
15660
+ },
15661
+ "nodeLabelAlign": {
15662
+ "type": "string",
15663
+ "enum": [
15664
+ "auto",
15665
+ "left",
15666
+ "right"
15667
+ ],
15668
+ "description": "Label side at this breakpoint (see `SankeySpec.nodeLabelAlign`)."
15669
+ },
15670
+ "nodePadding": {
15671
+ "type": "number",
15672
+ "description": "Vertical gap between nodes at this breakpoint, in pixels."
15673
+ }
15674
+ },
15675
+ "additionalProperties": false,
15676
+ "description": "Settings a sankey can change per breakpoint through `SankeySpec.overrides`. Each field means what it means on `SankeySpec`."
15677
+ },
15511
15678
  "TileMapSpec": {
15512
15679
  "type": "object",
15513
15680
  "properties": {
@@ -15570,7 +15737,7 @@
15570
15737
  },
15571
15738
  "animation": {
15572
15739
  "$ref": "#/definitions/AnimationSpec",
15573
- "description": "Animation configuration for entrance animations."
15740
+ "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."
15574
15741
  },
15575
15742
  "valueFormat": {
15576
15743
  "type": "string",
@@ -15703,7 +15870,7 @@
15703
15870
  },
15704
15871
  "animation": {
15705
15872
  "$ref": "#/definitions/AnimationSpec",
15706
- "description": "Animation configuration for entrance animations."
15873
+ "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."
15707
15874
  }
15708
15875
  },
15709
15876
  "required": [
@@ -16426,7 +16593,7 @@
16426
16593
  },
16427
16594
  "animation": {
16428
16595
  "$ref": "#/definitions/AnimationSpec",
16429
- "description": "Animation configuration for entrance animations."
16596
+ "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."
16430
16597
  }
16431
16598
  },
16432
16599
  "required": [
@@ -16523,6 +16690,1236 @@
16523
16690
  ],
16524
16691
  "description": "Authored mark text, kept verbatim for strings and formatted for numeric fields."
16525
16692
  },
16693
+ "RaceSpec": {
16694
+ "type": "object",
16695
+ "properties": {
16696
+ "type": {
16697
+ "type": "string",
16698
+ "const": "race",
16699
+ "description": "Discriminant, always `race`."
16700
+ },
16701
+ "data": {
16702
+ "type": "array",
16703
+ "items": {
16704
+ "$ref": "#/definitions/DataRow"
16705
+ },
16706
+ "description": "One data row per key and period."
16707
+ },
16708
+ "mark": {
16709
+ "anyOf": [
16710
+ {
16711
+ "$ref": "#/definitions/RaceMarkType"
16712
+ },
16713
+ {
16714
+ "$ref": "#/definitions/RaceMarkDef"
16715
+ }
16716
+ ],
16717
+ "description": "Required bar, line, or table mark. A string uses that mark's default options."
16718
+ },
16719
+ "encoding": {
16720
+ "$ref": "#/definitions/RaceEncoding",
16721
+ "description": "Maps fields to time, key, value, and optional color and label."
16722
+ },
16723
+ "race": {
16724
+ "$ref": "#/definitions/RaceConfig",
16725
+ "description": "Ranking and playback options. Omit to use the race defaults."
16726
+ },
16727
+ "chrome": {
16728
+ "$ref": "#/definitions/Chrome",
16729
+ "description": "Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text."
16730
+ },
16731
+ "theme": {
16732
+ "$ref": "#/definitions/ThemeConfig",
16733
+ "description": "Theme overrides. Omit to use the default theme."
16734
+ },
16735
+ "a11y": {
16736
+ "$ref": "#/definitions/A11yConfig",
16737
+ "description": "Accessibility overrides. Omit to use generated metadata."
16738
+ },
16739
+ "watermark": {
16740
+ "type": "boolean",
16741
+ "description": "Whether to show the OpenData watermark. Defaults to true."
16742
+ },
16743
+ "width": {
16744
+ "type": "number",
16745
+ "description": "Fixed render width in pixels. Defaults to container-driven sizing."
16746
+ },
16747
+ "height": {
16748
+ "type": "number",
16749
+ "description": "Fixed render height in pixels. Defaults to container-driven sizing."
16750
+ },
16751
+ "labels": {
16752
+ "type": "object",
16753
+ "properties": {
16754
+ "format": {
16755
+ "type": "string",
16756
+ "description": "Number format override for label values (d3-format string, e.g. \",.0f\")."
16757
+ }
16758
+ },
16759
+ "additionalProperties": false,
16760
+ "description": "Value label format override. Omit to use the value channel's format or automatic formatting."
16761
+ },
16762
+ "animation": {
16763
+ "$ref": "#/definitions/AnimationSpec",
16764
+ "description": "Set false to disable autoplay and open on the final frame. Playback otherwise follows `race`."
16765
+ }
16766
+ },
16767
+ "required": [
16768
+ "type",
16769
+ "data",
16770
+ "mark",
16771
+ "encoding"
16772
+ ],
16773
+ "additionalProperties": false,
16774
+ "description": "Animated top-N leaderboard over a sequence of periods."
16775
+ },
16776
+ "RaceMarkType": {
16777
+ "type": "string",
16778
+ "enum": [
16779
+ "bar",
16780
+ "line",
16781
+ "table"
16782
+ ],
16783
+ "description": "Mark used to draw each frame of a race."
16784
+ },
16785
+ "RaceMarkDef": {
16786
+ "anyOf": [
16787
+ {
16788
+ "$ref": "#/definitions/RaceBarMarkDef"
16789
+ },
16790
+ {
16791
+ "$ref": "#/definitions/RaceLineMarkDef"
16792
+ },
16793
+ {
16794
+ "$ref": "#/definitions/RaceTableMarkDef"
16795
+ }
16796
+ ],
16797
+ "description": "Race mark and its mark-specific options."
16798
+ },
16799
+ "RaceBarMarkDef": {
16800
+ "type": "object",
16801
+ "properties": {
16802
+ "type": {
16803
+ "type": "string",
16804
+ "const": "bar",
16805
+ "description": "Draw horizontal bars."
16806
+ },
16807
+ "cornerRadius": {
16808
+ "type": "number",
16809
+ "description": "Bar corner radius in pixels. Omit to use square corners."
16810
+ }
16811
+ },
16812
+ "required": [
16813
+ "type"
16814
+ ],
16815
+ "additionalProperties": false
16816
+ },
16817
+ "RaceLineMarkDef": {
16818
+ "type": "object",
16819
+ "properties": {
16820
+ "type": {
16821
+ "type": "string",
16822
+ "const": "line",
16823
+ "description": "Draw a line for each ranked series."
16824
+ },
16825
+ "window": {
16826
+ "type": "string",
16827
+ "enum": [
16828
+ "reveal",
16829
+ "all"
16830
+ ],
16831
+ "description": "Defaults to `reveal`, which expands the x domain to the playhead. `all` shows the full span."
16832
+ }
16833
+ },
16834
+ "required": [
16835
+ "type"
16836
+ ],
16837
+ "additionalProperties": false
16838
+ },
16839
+ "RaceTableMarkDef": {
16840
+ "type": "object",
16841
+ "properties": {
16842
+ "type": {
16843
+ "type": "string",
16844
+ "const": "table",
16845
+ "description": "Draw a table of ranked rows."
16846
+ },
16847
+ "columns": {
16848
+ "type": "array",
16849
+ "items": {
16850
+ "$ref": "#/definitions/RaceTableColumn"
16851
+ },
16852
+ "description": "Ordered columns. Defaults to all six in the listed order, with `bar` hidden below 520px."
16853
+ }
16854
+ },
16855
+ "required": [
16856
+ "type"
16857
+ ],
16858
+ "additionalProperties": false
16859
+ },
16860
+ "RaceTableColumn": {
16861
+ "type": "string",
16862
+ "enum": [
16863
+ "rank",
16864
+ "change",
16865
+ "name",
16866
+ "bar",
16867
+ "value",
16868
+ "share"
16869
+ ],
16870
+ "description": "Column in a race table."
16871
+ },
16872
+ "RaceEncoding": {
16873
+ "type": "object",
16874
+ "properties": {
16875
+ "time": {
16876
+ "type": "object",
16877
+ "additionalProperties": false,
16878
+ "properties": {
16879
+ "type": {
16880
+ "type": "string",
16881
+ "enum": [
16882
+ "temporal",
16883
+ "ordinal",
16884
+ "quantitative"
16885
+ ],
16886
+ "description": "How to interpret the field values."
16887
+ },
16888
+ "field": {
16889
+ "type": "string",
16890
+ "description": "Data field name (column in the data array).\n\nWhen using `ChartSpec<TData>` with a typed data array, this is constrained to the actual column names of `TData`. Typos fail at compile time and IDEs autocomplete your column names."
16891
+ },
16892
+ "interval": {
16893
+ "anyOf": [
16894
+ {
16895
+ "type": "string",
16896
+ "const": "day"
16897
+ },
16898
+ {
16899
+ "type": "string",
16900
+ "const": "week"
16901
+ },
16902
+ {
16903
+ "type": "string",
16904
+ "const": "month"
16905
+ },
16906
+ {
16907
+ "type": "string",
16908
+ "const": "quarter"
16909
+ },
16910
+ {
16911
+ "type": "string",
16912
+ "const": "year"
16913
+ },
16914
+ {
16915
+ "type": "number"
16916
+ }
16917
+ ],
16918
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
16919
+ },
16920
+ "aggregate": {
16921
+ "$ref": "#/definitions/AggregateOp",
16922
+ "description": "Optional aggregate to apply before encoding."
16923
+ },
16924
+ "axis": {
16925
+ "anyOf": [
16926
+ {
16927
+ "$ref": "#/definitions/AxisConfig"
16928
+ },
16929
+ {
16930
+ "type": "boolean",
16931
+ "const": false
16932
+ },
16933
+ {
16934
+ "type": "null"
16935
+ }
16936
+ ],
16937
+ "description": "Axis configuration. Set to `false` to suppress axis entirely (no space reserved). `null` is accepted as a VL-aligned alias for `false`."
16938
+ },
16939
+ "scale": {
16940
+ "$ref": "#/definitions/ScaleConfig",
16941
+ "description": "Scale configuration."
16942
+ },
16943
+ "stack": {
16944
+ "anyOf": [
16945
+ {
16946
+ "type": "boolean"
16947
+ },
16948
+ {
16949
+ "type": "string",
16950
+ "const": "zero"
16951
+ },
16952
+ {
16953
+ "type": "string",
16954
+ "const": "normalize"
16955
+ },
16956
+ {
16957
+ "type": "string",
16958
+ "const": "center"
16959
+ },
16960
+ {
16961
+ "type": "null"
16962
+ }
16963
+ ],
16964
+ "description": "Stacking behavior for quantitative channels (Vega-Lite aligned).\n\nVega-Lite accepts `'zero' | 'normalize' | 'center' | null`. OpenChart adds `true` (sugar for `'zero'`) and `false` (sugar for `null`) so callers can write `stack: true` / `stack: false` without learning the string forms. The string forms are still the canonical input — the boolean shorthand is normalized to the matching string before reaching layout.\n\n- undefined: chart-type default (see below) -- stacked for bar/column/area\n- true | 'zero': stack from zero baseline\n- 'normalize': stack and normalize to fraction of total (0-1 per category)\n- 'center': center stacks around zero (streamgraph style)\n- null | false: no stacking -- renders grouped/dodged (bar) or overlap (area)\n\n**Defaults differ by chart type:**\n- **Bar/Column**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) for grouped/side-by-side bars.\n- **Area**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) to opt into overlap rendering, where each series renders as a translucent gradient band anchored at the y-domain baseline.\n- **Line**: stacking is not applied (lines always overlap)."
16965
+ },
16966
+ "bin": {
16967
+ "anyOf": [
16968
+ {
16969
+ "type": "boolean"
16970
+ },
16971
+ {
16972
+ "$ref": "#/definitions/BinParams"
16973
+ }
16974
+ ],
16975
+ "description": "Encoding-level bin shorthand (Vega-Lite aligned). When set, auto-generates a BinTransform during normalization and updates the field reference to the binned output (convention: `bin_<fieldName>`).\n- true: bin with default params\n- BinParams: bin with custom params (maxbins, step, etc.)"
16976
+ },
16977
+ "timeUnit": {
16978
+ "$ref": "#/definitions/TimeUnit",
16979
+ "description": "Encoding-level timeUnit shorthand (Vega-Lite aligned). When set, auto-generates a TimeUnitTransform during normalization and updates the field reference to the output (convention: `<timeUnit>_<fieldName>`)."
16980
+ },
16981
+ "sort": {
16982
+ "anyOf": [
16983
+ {
16984
+ "type": "string",
16985
+ "const": "ascending"
16986
+ },
16987
+ {
16988
+ "type": "string",
16989
+ "const": "descending"
16990
+ },
16991
+ {
16992
+ "type": "null"
16993
+ },
16994
+ {
16995
+ "type": "string",
16996
+ "const": "x"
16997
+ },
16998
+ {
16999
+ "type": "string",
17000
+ "const": "-x"
17001
+ },
17002
+ {
17003
+ "type": "string",
17004
+ "const": "y"
17005
+ },
17006
+ {
17007
+ "type": "string",
17008
+ "const": "-y"
17009
+ },
17010
+ {
17011
+ "type": "array",
17012
+ "items": {
17013
+ "type": "string"
17014
+ }
17015
+ },
17016
+ {
17017
+ "$ref": "#/definitions/SortByField"
17018
+ }
17019
+ ],
17020
+ "description": "Sort order for categorical (nominal/ordinal) scale domains (Vega-Lite aligned).\n- 'ascending': sort domain values ascending (default VL behavior)\n- 'descending': sort domain values descending\n- null: use data order (no sorting)\n- undefined: ascending (VL default)\n- 'x' | '-x' | 'y' | '-y': sort by another channel's values ('-' prefix for descending). The VL ranked-bar idiom: `sort: '-y'` orders categories by value, largest first. Resolved into an explicit domain during the pre-validation sugar expansion.\n- string[]: explicit value order. Listed values come first (in the given order); unlisted data values follow in data order.\n- SortByField: sort by the aggregated values of another field."
17021
+ },
17022
+ "legend": {
17023
+ "anyOf": [
17024
+ {
17025
+ "$ref": "#/definitions/LegendConfig"
17026
+ },
17027
+ {
17028
+ "type": "null"
17029
+ }
17030
+ ],
17031
+ "description": "Legend configuration for this channel (Vega-Lite aligned). Only meaningful on the `color` channel. `null` hides the legend (the VL idiom for `legend.show = false`); a config object merges into the top-level `legend` (top-level keys win on conflict)."
17032
+ },
17033
+ "title": {
17034
+ "type": "string",
17035
+ "description": "Display title override (Vega-Lite aligned). Used as the label in tooltips instead of the raw field name. Also usable for axis titles, but `axis.title` takes precedence there."
17036
+ },
17037
+ "format": {
17038
+ "type": "string",
17039
+ "description": "Format string for values (Vega-Lite aligned). For quantitative fields: d3-format string (e.g. \",.0f\", \"$,.2f\"), or semantic keyword `'percent'` / `'currency'`. For temporal fields: d3-time-format string (e.g. \"%Y\", \"%b %d\"). Used in tooltips; `axis.format` takes precedence for axis tick labels."
17040
+ },
17041
+ "highlight": {
17042
+ "anyOf": [
17043
+ {
17044
+ "type": "string"
17045
+ },
17046
+ {
17047
+ "type": "array",
17048
+ "items": {
17049
+ "type": "string"
17050
+ }
17051
+ }
17052
+ ],
17053
+ "description": "Emphasis highlight for the color channel. Names one or more series values to visually emphasize; all other series are muted to a neutral gray.\n\nOnly meaningful on the `color` encoding channel. On other channels this property is ignored."
17054
+ }
17055
+ },
17056
+ "required": [
17057
+ "field"
17058
+ ],
17059
+ "description": "Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use `sort` or first-seen order."
17060
+ },
17061
+ "key": {
17062
+ "type": "object",
17063
+ "additionalProperties": false,
17064
+ "properties": {
17065
+ "type": {
17066
+ "$ref": "#/definitions/FieldType",
17067
+ "description": "How to interpret the field values."
17068
+ },
17069
+ "field": {
17070
+ "type": "string",
17071
+ "description": "Data field name (column in the data array).\n\nWhen using `ChartSpec<TData>` with a typed data array, this is constrained to the actual column names of `TData`. Typos fail at compile time and IDEs autocomplete your column names."
17072
+ },
17073
+ "interval": {
17074
+ "anyOf": [
17075
+ {
17076
+ "type": "string",
17077
+ "const": "day"
17078
+ },
17079
+ {
17080
+ "type": "string",
17081
+ "const": "week"
17082
+ },
17083
+ {
17084
+ "type": "string",
17085
+ "const": "month"
17086
+ },
17087
+ {
17088
+ "type": "string",
17089
+ "const": "quarter"
17090
+ },
17091
+ {
17092
+ "type": "string",
17093
+ "const": "year"
17094
+ },
17095
+ {
17096
+ "type": "number"
17097
+ }
17098
+ ],
17099
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
17100
+ },
17101
+ "aggregate": {
17102
+ "$ref": "#/definitions/AggregateOp",
17103
+ "description": "Optional aggregate to apply before encoding."
17104
+ },
17105
+ "axis": {
17106
+ "anyOf": [
17107
+ {
17108
+ "$ref": "#/definitions/AxisConfig"
17109
+ },
17110
+ {
17111
+ "type": "boolean",
17112
+ "const": false
17113
+ },
17114
+ {
17115
+ "type": "null"
17116
+ }
17117
+ ],
17118
+ "description": "Axis configuration. Set to `false` to suppress axis entirely (no space reserved). `null` is accepted as a VL-aligned alias for `false`."
17119
+ },
17120
+ "scale": {
17121
+ "$ref": "#/definitions/ScaleConfig",
17122
+ "description": "Scale configuration."
17123
+ },
17124
+ "stack": {
17125
+ "anyOf": [
17126
+ {
17127
+ "type": "boolean"
17128
+ },
17129
+ {
17130
+ "type": "string",
17131
+ "const": "zero"
17132
+ },
17133
+ {
17134
+ "type": "string",
17135
+ "const": "normalize"
17136
+ },
17137
+ {
17138
+ "type": "string",
17139
+ "const": "center"
17140
+ },
17141
+ {
17142
+ "type": "null"
17143
+ }
17144
+ ],
17145
+ "description": "Stacking behavior for quantitative channels (Vega-Lite aligned).\n\nVega-Lite accepts `'zero' | 'normalize' | 'center' | null`. OpenChart adds `true` (sugar for `'zero'`) and `false` (sugar for `null`) so callers can write `stack: true` / `stack: false` without learning the string forms. The string forms are still the canonical input — the boolean shorthand is normalized to the matching string before reaching layout.\n\n- undefined: chart-type default (see below) -- stacked for bar/column/area\n- true | 'zero': stack from zero baseline\n- 'normalize': stack and normalize to fraction of total (0-1 per category)\n- 'center': center stacks around zero (streamgraph style)\n- null | false: no stacking -- renders grouped/dodged (bar) or overlap (area)\n\n**Defaults differ by chart type:**\n- **Bar/Column**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) for grouped/side-by-side bars.\n- **Area**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) to opt into overlap rendering, where each series renders as a translucent gradient band anchored at the y-domain baseline.\n- **Line**: stacking is not applied (lines always overlap)."
17146
+ },
17147
+ "bin": {
17148
+ "anyOf": [
17149
+ {
17150
+ "type": "boolean"
17151
+ },
17152
+ {
17153
+ "$ref": "#/definitions/BinParams"
17154
+ }
17155
+ ],
17156
+ "description": "Encoding-level bin shorthand (Vega-Lite aligned). When set, auto-generates a BinTransform during normalization and updates the field reference to the binned output (convention: `bin_<fieldName>`).\n- true: bin with default params\n- BinParams: bin with custom params (maxbins, step, etc.)"
17157
+ },
17158
+ "timeUnit": {
17159
+ "$ref": "#/definitions/TimeUnit",
17160
+ "description": "Encoding-level timeUnit shorthand (Vega-Lite aligned). When set, auto-generates a TimeUnitTransform during normalization and updates the field reference to the output (convention: `<timeUnit>_<fieldName>`)."
17161
+ },
17162
+ "sort": {
17163
+ "anyOf": [
17164
+ {
17165
+ "type": "string",
17166
+ "const": "ascending"
17167
+ },
17168
+ {
17169
+ "type": "string",
17170
+ "const": "descending"
17171
+ },
17172
+ {
17173
+ "type": "null"
17174
+ },
17175
+ {
17176
+ "type": "string",
17177
+ "const": "x"
17178
+ },
17179
+ {
17180
+ "type": "string",
17181
+ "const": "-x"
17182
+ },
17183
+ {
17184
+ "type": "string",
17185
+ "const": "y"
17186
+ },
17187
+ {
17188
+ "type": "string",
17189
+ "const": "-y"
17190
+ },
17191
+ {
17192
+ "type": "array",
17193
+ "items": {
17194
+ "type": "string"
17195
+ }
17196
+ },
17197
+ {
17198
+ "$ref": "#/definitions/SortByField"
17199
+ }
17200
+ ],
17201
+ "description": "Sort order for categorical (nominal/ordinal) scale domains (Vega-Lite aligned).\n- 'ascending': sort domain values ascending (default VL behavior)\n- 'descending': sort domain values descending\n- null: use data order (no sorting)\n- undefined: ascending (VL default)\n- 'x' | '-x' | 'y' | '-y': sort by another channel's values ('-' prefix for descending). The VL ranked-bar idiom: `sort: '-y'` orders categories by value, largest first. Resolved into an explicit domain during the pre-validation sugar expansion.\n- string[]: explicit value order. Listed values come first (in the given order); unlisted data values follow in data order.\n- SortByField: sort by the aggregated values of another field."
17202
+ },
17203
+ "legend": {
17204
+ "anyOf": [
17205
+ {
17206
+ "$ref": "#/definitions/LegendConfig"
17207
+ },
17208
+ {
17209
+ "type": "null"
17210
+ }
17211
+ ],
17212
+ "description": "Legend configuration for this channel (Vega-Lite aligned). Only meaningful on the `color` channel. `null` hides the legend (the VL idiom for `legend.show = false`); a config object merges into the top-level `legend` (top-level keys win on conflict)."
17213
+ },
17214
+ "title": {
17215
+ "type": "string",
17216
+ "description": "Display title override (Vega-Lite aligned). Used as the label in tooltips instead of the raw field name. Also usable for axis titles, but `axis.title` takes precedence there."
17217
+ },
17218
+ "format": {
17219
+ "type": "string",
17220
+ "description": "Format string for values (Vega-Lite aligned). For quantitative fields: d3-format string (e.g. \",.0f\", \"$,.2f\"), or semantic keyword `'percent'` / `'currency'`. For temporal fields: d3-time-format string (e.g. \"%Y\", \"%b %d\"). Used in tooltips; `axis.format` takes precedence for axis tick labels."
17221
+ },
17222
+ "highlight": {
17223
+ "anyOf": [
17224
+ {
17225
+ "type": "string"
17226
+ },
17227
+ {
17228
+ "type": "array",
17229
+ "items": {
17230
+ "type": "string"
17231
+ }
17232
+ }
17233
+ ],
17234
+ "description": "Emphasis highlight for the color channel. Names one or more series values to visually emphasize; all other series are muted to a neutral gray.\n\nOnly meaningful on the `color` encoding channel. On other channels this property is ignored."
17235
+ }
17236
+ },
17237
+ "required": [
17238
+ "field"
17239
+ ],
17240
+ "description": "Stable identity across periods. Also the display name by default."
17241
+ },
17242
+ "value": {
17243
+ "type": "object",
17244
+ "additionalProperties": false,
17245
+ "properties": {
17246
+ "type": {
17247
+ "type": "string",
17248
+ "const": "quantitative",
17249
+ "description": "How to interpret the field values."
17250
+ },
17251
+ "field": {
17252
+ "type": "string",
17253
+ "description": "Data field name (column in the data array).\n\nWhen using `ChartSpec<TData>` with a typed data array, this is constrained to the actual column names of `TData`. Typos fail at compile time and IDEs autocomplete your column names."
17254
+ },
17255
+ "interval": {
17256
+ "anyOf": [
17257
+ {
17258
+ "type": "string",
17259
+ "const": "day"
17260
+ },
17261
+ {
17262
+ "type": "string",
17263
+ "const": "week"
17264
+ },
17265
+ {
17266
+ "type": "string",
17267
+ "const": "month"
17268
+ },
17269
+ {
17270
+ "type": "string",
17271
+ "const": "quarter"
17272
+ },
17273
+ {
17274
+ "type": "string",
17275
+ "const": "year"
17276
+ },
17277
+ {
17278
+ "type": "number"
17279
+ }
17280
+ ],
17281
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
17282
+ },
17283
+ "aggregate": {
17284
+ "$ref": "#/definitions/AggregateOp",
17285
+ "description": "Optional aggregate to apply before encoding."
17286
+ },
17287
+ "axis": {
17288
+ "anyOf": [
17289
+ {
17290
+ "$ref": "#/definitions/AxisConfig"
17291
+ },
17292
+ {
17293
+ "type": "boolean",
17294
+ "const": false
17295
+ },
17296
+ {
17297
+ "type": "null"
17298
+ }
17299
+ ],
17300
+ "description": "Axis configuration. Set to `false` to suppress axis entirely (no space reserved). `null` is accepted as a VL-aligned alias for `false`."
17301
+ },
17302
+ "scale": {
17303
+ "$ref": "#/definitions/ScaleConfig",
17304
+ "description": "Scale configuration."
17305
+ },
17306
+ "stack": {
17307
+ "anyOf": [
17308
+ {
17309
+ "type": "boolean"
17310
+ },
17311
+ {
17312
+ "type": "string",
17313
+ "const": "zero"
17314
+ },
17315
+ {
17316
+ "type": "string",
17317
+ "const": "normalize"
17318
+ },
17319
+ {
17320
+ "type": "string",
17321
+ "const": "center"
17322
+ },
17323
+ {
17324
+ "type": "null"
17325
+ }
17326
+ ],
17327
+ "description": "Stacking behavior for quantitative channels (Vega-Lite aligned).\n\nVega-Lite accepts `'zero' | 'normalize' | 'center' | null`. OpenChart adds `true` (sugar for `'zero'`) and `false` (sugar for `null`) so callers can write `stack: true` / `stack: false` without learning the string forms. The string forms are still the canonical input — the boolean shorthand is normalized to the matching string before reaching layout.\n\n- undefined: chart-type default (see below) -- stacked for bar/column/area\n- true | 'zero': stack from zero baseline\n- 'normalize': stack and normalize to fraction of total (0-1 per category)\n- 'center': center stacks around zero (streamgraph style)\n- null | false: no stacking -- renders grouped/dodged (bar) or overlap (area)\n\n**Defaults differ by chart type:**\n- **Bar/Column**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) for grouped/side-by-side bars.\n- **Area**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) to opt into overlap rendering, where each series renders as a translucent gradient band anchored at the y-domain baseline.\n- **Line**: stacking is not applied (lines always overlap)."
17328
+ },
17329
+ "bin": {
17330
+ "anyOf": [
17331
+ {
17332
+ "type": "boolean"
17333
+ },
17334
+ {
17335
+ "$ref": "#/definitions/BinParams"
17336
+ }
17337
+ ],
17338
+ "description": "Encoding-level bin shorthand (Vega-Lite aligned). When set, auto-generates a BinTransform during normalization and updates the field reference to the binned output (convention: `bin_<fieldName>`).\n- true: bin with default params\n- BinParams: bin with custom params (maxbins, step, etc.)"
17339
+ },
17340
+ "timeUnit": {
17341
+ "$ref": "#/definitions/TimeUnit",
17342
+ "description": "Encoding-level timeUnit shorthand (Vega-Lite aligned). When set, auto-generates a TimeUnitTransform during normalization and updates the field reference to the output (convention: `<timeUnit>_<fieldName>`)."
17343
+ },
17344
+ "sort": {
17345
+ "anyOf": [
17346
+ {
17347
+ "type": "string",
17348
+ "const": "ascending"
17349
+ },
17350
+ {
17351
+ "type": "string",
17352
+ "const": "descending"
17353
+ },
17354
+ {
17355
+ "type": "null"
17356
+ },
17357
+ {
17358
+ "type": "string",
17359
+ "const": "x"
17360
+ },
17361
+ {
17362
+ "type": "string",
17363
+ "const": "-x"
17364
+ },
17365
+ {
17366
+ "type": "string",
17367
+ "const": "y"
17368
+ },
17369
+ {
17370
+ "type": "string",
17371
+ "const": "-y"
17372
+ },
17373
+ {
17374
+ "type": "array",
17375
+ "items": {
17376
+ "type": "string"
17377
+ }
17378
+ },
17379
+ {
17380
+ "$ref": "#/definitions/SortByField"
17381
+ }
17382
+ ],
17383
+ "description": "Sort order for categorical (nominal/ordinal) scale domains (Vega-Lite aligned).\n- 'ascending': sort domain values ascending (default VL behavior)\n- 'descending': sort domain values descending\n- null: use data order (no sorting)\n- undefined: ascending (VL default)\n- 'x' | '-x' | 'y' | '-y': sort by another channel's values ('-' prefix for descending). The VL ranked-bar idiom: `sort: '-y'` orders categories by value, largest first. Resolved into an explicit domain during the pre-validation sugar expansion.\n- string[]: explicit value order. Listed values come first (in the given order); unlisted data values follow in data order.\n- SortByField: sort by the aggregated values of another field."
17384
+ },
17385
+ "legend": {
17386
+ "anyOf": [
17387
+ {
17388
+ "$ref": "#/definitions/LegendConfig"
17389
+ },
17390
+ {
17391
+ "type": "null"
17392
+ }
17393
+ ],
17394
+ "description": "Legend configuration for this channel (Vega-Lite aligned). Only meaningful on the `color` channel. `null` hides the legend (the VL idiom for `legend.show = false`); a config object merges into the top-level `legend` (top-level keys win on conflict)."
17395
+ },
17396
+ "title": {
17397
+ "type": "string",
17398
+ "description": "Display title override (Vega-Lite aligned). Used as the label in tooltips instead of the raw field name. Also usable for axis titles, but `axis.title` takes precedence there."
17399
+ },
17400
+ "format": {
17401
+ "type": "string",
17402
+ "description": "Format string for values (Vega-Lite aligned). For quantitative fields: d3-format string (e.g. \",.0f\", \"$,.2f\"), or semantic keyword `'percent'` / `'currency'`. For temporal fields: d3-time-format string (e.g. \"%Y\", \"%b %d\"). Used in tooltips; `axis.format` takes precedence for axis tick labels."
17403
+ },
17404
+ "highlight": {
17405
+ "anyOf": [
17406
+ {
17407
+ "type": "string"
17408
+ },
17409
+ {
17410
+ "type": "array",
17411
+ "items": {
17412
+ "type": "string"
17413
+ }
17414
+ }
17415
+ ],
17416
+ "description": "Emphasis highlight for the color channel. Names one or more series values to visually emphasize; all other series are muted to a neutral gray.\n\nOnly meaningful on the `color` encoding channel. On other channels this property is ignored."
17417
+ }
17418
+ },
17419
+ "required": [
17420
+ "field"
17421
+ ],
17422
+ "description": "Numeric field to rank and draw. Defaults to quantitative."
17423
+ },
17424
+ "color": {
17425
+ "anyOf": [
17426
+ {
17427
+ "type": "object",
17428
+ "additionalProperties": false,
17429
+ "properties": {
17430
+ "type": {
17431
+ "$ref": "#/definitions/FieldType",
17432
+ "description": "How to interpret the field values."
17433
+ },
17434
+ "field": {
17435
+ "type": "string",
17436
+ "description": "Data field name (column in the data array).\n\nWhen using `ChartSpec<TData>` with a typed data array, this is constrained to the actual column names of `TData`. Typos fail at compile time and IDEs autocomplete your column names."
17437
+ },
17438
+ "interval": {
17439
+ "anyOf": [
17440
+ {
17441
+ "type": "string",
17442
+ "const": "day"
17443
+ },
17444
+ {
17445
+ "type": "string",
17446
+ "const": "week"
17447
+ },
17448
+ {
17449
+ "type": "string",
17450
+ "const": "month"
17451
+ },
17452
+ {
17453
+ "type": "string",
17454
+ "const": "quarter"
17455
+ },
17456
+ {
17457
+ "type": "string",
17458
+ "const": "year"
17459
+ },
17460
+ {
17461
+ "type": "number"
17462
+ }
17463
+ ],
17464
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
17465
+ },
17466
+ "aggregate": {
17467
+ "$ref": "#/definitions/AggregateOp",
17468
+ "description": "Optional aggregate to apply before encoding."
17469
+ },
17470
+ "axis": {
17471
+ "anyOf": [
17472
+ {
17473
+ "$ref": "#/definitions/AxisConfig"
17474
+ },
17475
+ {
17476
+ "type": "boolean",
17477
+ "const": false
17478
+ },
17479
+ {
17480
+ "type": "null"
17481
+ }
17482
+ ],
17483
+ "description": "Axis configuration. Set to `false` to suppress axis entirely (no space reserved). `null` is accepted as a VL-aligned alias for `false`."
17484
+ },
17485
+ "scale": {
17486
+ "$ref": "#/definitions/ScaleConfig",
17487
+ "description": "Scale configuration."
17488
+ },
17489
+ "stack": {
17490
+ "anyOf": [
17491
+ {
17492
+ "type": "boolean"
17493
+ },
17494
+ {
17495
+ "type": "string",
17496
+ "const": "zero"
17497
+ },
17498
+ {
17499
+ "type": "string",
17500
+ "const": "normalize"
17501
+ },
17502
+ {
17503
+ "type": "string",
17504
+ "const": "center"
17505
+ },
17506
+ {
17507
+ "type": "null"
17508
+ }
17509
+ ],
17510
+ "description": "Stacking behavior for quantitative channels (Vega-Lite aligned).\n\nVega-Lite accepts `'zero' | 'normalize' | 'center' | null`. OpenChart adds `true` (sugar for `'zero'`) and `false` (sugar for `null`) so callers can write `stack: true` / `stack: false` without learning the string forms. The string forms are still the canonical input — the boolean shorthand is normalized to the matching string before reaching layout.\n\n- undefined: chart-type default (see below) -- stacked for bar/column/area\n- true | 'zero': stack from zero baseline\n- 'normalize': stack and normalize to fraction of total (0-1 per category)\n- 'center': center stacks around zero (streamgraph style)\n- null | false: no stacking -- renders grouped/dodged (bar) or overlap (area)\n\n**Defaults differ by chart type:**\n- **Bar/Column**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) for grouped/side-by-side bars.\n- **Area**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) to opt into overlap rendering, where each series renders as a translucent gradient band anchored at the y-domain baseline.\n- **Line**: stacking is not applied (lines always overlap)."
17511
+ },
17512
+ "bin": {
17513
+ "anyOf": [
17514
+ {
17515
+ "type": "boolean"
17516
+ },
17517
+ {
17518
+ "$ref": "#/definitions/BinParams"
17519
+ }
17520
+ ],
17521
+ "description": "Encoding-level bin shorthand (Vega-Lite aligned). When set, auto-generates a BinTransform during normalization and updates the field reference to the binned output (convention: `bin_<fieldName>`).\n- true: bin with default params\n- BinParams: bin with custom params (maxbins, step, etc.)"
17522
+ },
17523
+ "timeUnit": {
17524
+ "$ref": "#/definitions/TimeUnit",
17525
+ "description": "Encoding-level timeUnit shorthand (Vega-Lite aligned). When set, auto-generates a TimeUnitTransform during normalization and updates the field reference to the output (convention: `<timeUnit>_<fieldName>`)."
17526
+ },
17527
+ "sort": {
17528
+ "anyOf": [
17529
+ {
17530
+ "type": "string",
17531
+ "const": "ascending"
17532
+ },
17533
+ {
17534
+ "type": "string",
17535
+ "const": "descending"
17536
+ },
17537
+ {
17538
+ "type": "null"
17539
+ },
17540
+ {
17541
+ "type": "string",
17542
+ "const": "x"
17543
+ },
17544
+ {
17545
+ "type": "string",
17546
+ "const": "-x"
17547
+ },
17548
+ {
17549
+ "type": "string",
17550
+ "const": "y"
17551
+ },
17552
+ {
17553
+ "type": "string",
17554
+ "const": "-y"
17555
+ },
17556
+ {
17557
+ "type": "array",
17558
+ "items": {
17559
+ "type": "string"
17560
+ }
17561
+ },
17562
+ {
17563
+ "$ref": "#/definitions/SortByField"
17564
+ }
17565
+ ],
17566
+ "description": "Sort order for categorical (nominal/ordinal) scale domains (Vega-Lite aligned).\n- 'ascending': sort domain values ascending (default VL behavior)\n- 'descending': sort domain values descending\n- null: use data order (no sorting)\n- undefined: ascending (VL default)\n- 'x' | '-x' | 'y' | '-y': sort by another channel's values ('-' prefix for descending). The VL ranked-bar idiom: `sort: '-y'` orders categories by value, largest first. Resolved into an explicit domain during the pre-validation sugar expansion.\n- string[]: explicit value order. Listed values come first (in the given order); unlisted data values follow in data order.\n- SortByField: sort by the aggregated values of another field."
17567
+ },
17568
+ "legend": {
17569
+ "anyOf": [
17570
+ {
17571
+ "$ref": "#/definitions/LegendConfig"
17572
+ },
17573
+ {
17574
+ "type": "null"
17575
+ }
17576
+ ],
17577
+ "description": "Legend configuration for this channel (Vega-Lite aligned). Only meaningful on the `color` channel. `null` hides the legend (the VL idiom for `legend.show = false`); a config object merges into the top-level `legend` (top-level keys win on conflict)."
17578
+ },
17579
+ "title": {
17580
+ "type": "string",
17581
+ "description": "Display title override (Vega-Lite aligned). Used as the label in tooltips instead of the raw field name. Also usable for axis titles, but `axis.title` takes precedence there."
17582
+ },
17583
+ "format": {
17584
+ "type": "string",
17585
+ "description": "Format string for values (Vega-Lite aligned). For quantitative fields: d3-format string (e.g. \",.0f\", \"$,.2f\"), or semantic keyword `'percent'` / `'currency'`. For temporal fields: d3-time-format string (e.g. \"%Y\", \"%b %d\"). Used in tooltips; `axis.format` takes precedence for axis tick labels."
17586
+ },
17587
+ "highlight": {
17588
+ "anyOf": [
17589
+ {
17590
+ "type": "string"
17591
+ },
17592
+ {
17593
+ "type": "array",
17594
+ "items": {
17595
+ "type": "string"
17596
+ }
17597
+ }
17598
+ ],
17599
+ "description": "Emphasis highlight for the color channel. Names one or more series values to visually emphasize; all other series are muted to a neutral gray.\n\nOnly meaningful on the `color` encoding channel. On other channels this property is ignored."
17600
+ }
17601
+ },
17602
+ "required": [
17603
+ "field"
17604
+ ]
17605
+ },
17606
+ {
17607
+ "type": "object",
17608
+ "properties": {
17609
+ "value": {
17610
+ "type": "string"
17611
+ }
17612
+ },
17613
+ "required": [
17614
+ "value"
17615
+ ],
17616
+ "additionalProperties": false
17617
+ }
17618
+ ],
17619
+ "description": "Field or constant CSS color. Defaults to coloring by key in order of first appearance in the top N."
17620
+ },
17621
+ "label": {
17622
+ "type": "object",
17623
+ "additionalProperties": false,
17624
+ "properties": {
17625
+ "type": {
17626
+ "type": "string",
17627
+ "const": "nominal",
17628
+ "description": "How to interpret the field values."
17629
+ },
17630
+ "field": {
17631
+ "type": "string",
17632
+ "description": "Data field name (column in the data array).\n\nWhen using `ChartSpec<TData>` with a typed data array, this is constrained to the actual column names of `TData`. Typos fail at compile time and IDEs autocomplete your column names."
17633
+ },
17634
+ "interval": {
17635
+ "anyOf": [
17636
+ {
17637
+ "type": "string",
17638
+ "const": "day"
17639
+ },
17640
+ {
17641
+ "type": "string",
17642
+ "const": "week"
17643
+ },
17644
+ {
17645
+ "type": "string",
17646
+ "const": "month"
17647
+ },
17648
+ {
17649
+ "type": "string",
17650
+ "const": "quarter"
17651
+ },
17652
+ {
17653
+ "type": "string",
17654
+ "const": "year"
17655
+ },
17656
+ {
17657
+ "type": "number"
17658
+ }
17659
+ ],
17660
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
17661
+ },
17662
+ "aggregate": {
17663
+ "$ref": "#/definitions/AggregateOp",
17664
+ "description": "Optional aggregate to apply before encoding."
17665
+ },
17666
+ "axis": {
17667
+ "anyOf": [
17668
+ {
17669
+ "$ref": "#/definitions/AxisConfig"
17670
+ },
17671
+ {
17672
+ "type": "boolean",
17673
+ "const": false
17674
+ },
17675
+ {
17676
+ "type": "null"
17677
+ }
17678
+ ],
17679
+ "description": "Axis configuration. Set to `false` to suppress axis entirely (no space reserved). `null` is accepted as a VL-aligned alias for `false`."
17680
+ },
17681
+ "scale": {
17682
+ "$ref": "#/definitions/ScaleConfig",
17683
+ "description": "Scale configuration."
17684
+ },
17685
+ "stack": {
17686
+ "anyOf": [
17687
+ {
17688
+ "type": "boolean"
17689
+ },
17690
+ {
17691
+ "type": "string",
17692
+ "const": "zero"
17693
+ },
17694
+ {
17695
+ "type": "string",
17696
+ "const": "normalize"
17697
+ },
17698
+ {
17699
+ "type": "string",
17700
+ "const": "center"
17701
+ },
17702
+ {
17703
+ "type": "null"
17704
+ }
17705
+ ],
17706
+ "description": "Stacking behavior for quantitative channels (Vega-Lite aligned).\n\nVega-Lite accepts `'zero' | 'normalize' | 'center' | null`. OpenChart adds `true` (sugar for `'zero'`) and `false` (sugar for `null`) so callers can write `stack: true` / `stack: false` without learning the string forms. The string forms are still the canonical input — the boolean shorthand is normalized to the matching string before reaching layout.\n\n- undefined: chart-type default (see below) -- stacked for bar/column/area\n- true | 'zero': stack from zero baseline\n- 'normalize': stack and normalize to fraction of total (0-1 per category)\n- 'center': center stacks around zero (streamgraph style)\n- null | false: no stacking -- renders grouped/dodged (bar) or overlap (area)\n\n**Defaults differ by chart type:**\n- **Bar/Column**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) for grouped/side-by-side bars.\n- **Area**: defaults to stacked (`'zero'`), Vega-Lite aligned. Use `stack: null` (or `false`) to opt into overlap rendering, where each series renders as a translucent gradient band anchored at the y-domain baseline.\n- **Line**: stacking is not applied (lines always overlap)."
17707
+ },
17708
+ "bin": {
17709
+ "anyOf": [
17710
+ {
17711
+ "type": "boolean"
17712
+ },
17713
+ {
17714
+ "$ref": "#/definitions/BinParams"
17715
+ }
17716
+ ],
17717
+ "description": "Encoding-level bin shorthand (Vega-Lite aligned). When set, auto-generates a BinTransform during normalization and updates the field reference to the binned output (convention: `bin_<fieldName>`).\n- true: bin with default params\n- BinParams: bin with custom params (maxbins, step, etc.)"
17718
+ },
17719
+ "timeUnit": {
17720
+ "$ref": "#/definitions/TimeUnit",
17721
+ "description": "Encoding-level timeUnit shorthand (Vega-Lite aligned). When set, auto-generates a TimeUnitTransform during normalization and updates the field reference to the output (convention: `<timeUnit>_<fieldName>`)."
17722
+ },
17723
+ "sort": {
17724
+ "anyOf": [
17725
+ {
17726
+ "type": "string",
17727
+ "const": "ascending"
17728
+ },
17729
+ {
17730
+ "type": "string",
17731
+ "const": "descending"
17732
+ },
17733
+ {
17734
+ "type": "null"
17735
+ },
17736
+ {
17737
+ "type": "string",
17738
+ "const": "x"
17739
+ },
17740
+ {
17741
+ "type": "string",
17742
+ "const": "-x"
17743
+ },
17744
+ {
17745
+ "type": "string",
17746
+ "const": "y"
17747
+ },
17748
+ {
17749
+ "type": "string",
17750
+ "const": "-y"
17751
+ },
17752
+ {
17753
+ "type": "array",
17754
+ "items": {
17755
+ "type": "string"
17756
+ }
17757
+ },
17758
+ {
17759
+ "$ref": "#/definitions/SortByField"
17760
+ }
17761
+ ],
17762
+ "description": "Sort order for categorical (nominal/ordinal) scale domains (Vega-Lite aligned).\n- 'ascending': sort domain values ascending (default VL behavior)\n- 'descending': sort domain values descending\n- null: use data order (no sorting)\n- undefined: ascending (VL default)\n- 'x' | '-x' | 'y' | '-y': sort by another channel's values ('-' prefix for descending). The VL ranked-bar idiom: `sort: '-y'` orders categories by value, largest first. Resolved into an explicit domain during the pre-validation sugar expansion.\n- string[]: explicit value order. Listed values come first (in the given order); unlisted data values follow in data order.\n- SortByField: sort by the aggregated values of another field."
17763
+ },
17764
+ "legend": {
17765
+ "anyOf": [
17766
+ {
17767
+ "$ref": "#/definitions/LegendConfig"
17768
+ },
17769
+ {
17770
+ "type": "null"
17771
+ }
17772
+ ],
17773
+ "description": "Legend configuration for this channel (Vega-Lite aligned). Only meaningful on the `color` channel. `null` hides the legend (the VL idiom for `legend.show = false`); a config object merges into the top-level `legend` (top-level keys win on conflict)."
17774
+ },
17775
+ "title": {
17776
+ "type": "string",
17777
+ "description": "Display title override (Vega-Lite aligned). Used as the label in tooltips instead of the raw field name. Also usable for axis titles, but `axis.title` takes precedence there."
17778
+ },
17779
+ "format": {
17780
+ "type": "string",
17781
+ "description": "Format string for values (Vega-Lite aligned). For quantitative fields: d3-format string (e.g. \",.0f\", \"$,.2f\"), or semantic keyword `'percent'` / `'currency'`. For temporal fields: d3-time-format string (e.g. \"%Y\", \"%b %d\"). Used in tooltips; `axis.format` takes precedence for axis tick labels."
17782
+ },
17783
+ "highlight": {
17784
+ "anyOf": [
17785
+ {
17786
+ "type": "string"
17787
+ },
17788
+ {
17789
+ "type": "array",
17790
+ "items": {
17791
+ "type": "string"
17792
+ }
17793
+ }
17794
+ ],
17795
+ "description": "Emphasis highlight for the color channel. Names one or more series values to visually emphasize; all other series are muted to a neutral gray.\n\nOnly meaningful on the `color` encoding channel. On other channels this property is ignored."
17796
+ }
17797
+ },
17798
+ "required": [
17799
+ "field"
17800
+ ],
17801
+ "description": "Nominal display label. The last non-null label wins per key. Defaults to the key."
17802
+ }
17803
+ },
17804
+ "required": [
17805
+ "time",
17806
+ "key",
17807
+ "value"
17808
+ ],
17809
+ "additionalProperties": false,
17810
+ "description": "Field mappings shared by bar, line, and table races."
17811
+ },
17812
+ "RaceConfig": {
17813
+ "type": "object",
17814
+ "properties": {
17815
+ "top": {
17816
+ "type": "number",
17817
+ "description": "Number of visible slots. Defaults to 10."
17818
+ },
17819
+ "duration": {
17820
+ "type": "number",
17821
+ "description": "Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`."
17822
+ },
17823
+ "step": {
17824
+ "type": "number",
17825
+ "description": "Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`."
17826
+ },
17827
+ "swap": {
17828
+ "type": "number",
17829
+ "description": "Reorder duration in milliseconds. Defaults to 400."
17830
+ },
17831
+ "rescale": {
17832
+ "anyOf": [
17833
+ {
17834
+ "type": "string",
17835
+ "const": "frame"
17836
+ },
17837
+ {
17838
+ "type": "string",
17839
+ "const": "fixed"
17840
+ },
17841
+ {
17842
+ "type": "object",
17843
+ "properties": {
17844
+ "min": {
17845
+ "type": "number"
17846
+ }
17847
+ },
17848
+ "required": [
17849
+ "min"
17850
+ ],
17851
+ "additionalProperties": false
17852
+ }
17853
+ ],
17854
+ "description": "Value domain policy. Defaults to `frame` for the visible items. Use `fixed` for the full run or `{ min }` for a floor on the frame maximum."
17855
+ },
17856
+ "gaps": {
17857
+ "type": "string",
17858
+ "enum": [
17859
+ "interpolate",
17860
+ "hold",
17861
+ "drop"
17862
+ ],
17863
+ "description": "Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent."
17864
+ },
17865
+ "holdEnd": {
17866
+ "type": "number",
17867
+ "description": "Time to dwell on the final frame in milliseconds. Defaults to 1500."
17868
+ },
17869
+ "loop": {
17870
+ "type": "boolean",
17871
+ "description": "Restart after the final hold. Defaults to false."
17872
+ },
17873
+ "autoplay": {
17874
+ "anyOf": [
17875
+ {
17876
+ "type": "string",
17877
+ "const": "visible"
17878
+ },
17879
+ {
17880
+ "type": "boolean"
17881
+ }
17882
+ ],
17883
+ "description": "Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay."
17884
+ },
17885
+ "controls": {
17886
+ "type": "boolean",
17887
+ "description": "Show play/pause, scrubber, and period readout. Defaults to true."
17888
+ },
17889
+ "period": {
17890
+ "anyOf": [
17891
+ {
17892
+ "type": "boolean",
17893
+ "const": false
17894
+ },
17895
+ {
17896
+ "type": "object",
17897
+ "properties": {
17898
+ "format": {
17899
+ "type": "string",
17900
+ "description": "Overrides the time channel's format."
17901
+ }
17902
+ },
17903
+ "additionalProperties": false
17904
+ }
17905
+ ],
17906
+ "description": "Large period label. On by default with automatic placement and the time channel's format. Set false to hide it."
17907
+ },
17908
+ "summary": {
17909
+ "type": [
17910
+ "string",
17911
+ "boolean"
17912
+ ],
17913
+ "enum": [
17914
+ "sum",
17915
+ false
17916
+ ],
17917
+ "description": "Show the sum of the top N values. Defaults to false."
17918
+ }
17919
+ },
17920
+ "additionalProperties": false,
17921
+ "description": "Ranking and playback options for a race."
17922
+ },
16526
17923
  "ChartSpecBase": {
16527
17924
  "type": "object",
16528
17925
  "additionalProperties": false,
@@ -16701,7 +18098,7 @@
16701
18098
  },
16702
18099
  "animation": {
16703
18100
  "$ref": "#/definitions/AnimationSpec",
16704
- "description": "Animation configuration.\n- true: enable entrance animation with sensible defaults\n- false/omitted: no animation (current behavior)\n- AnimationConfig: full control via enter/update/exit phases"
18101
+ "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."
16705
18102
  },
16706
18103
  "crosshair": {
16707
18104
  "type": "boolean",