@opendata-ai/openchart-core 9.0.0-rc.2 → 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.
@@ -8,6 +8,105 @@
8
8
  },
9
9
  "ChartSpec": {
10
10
  "anyOf": [
11
+ {
12
+ "allOf": [
13
+ {
14
+ "$ref": "#/definitions/ChartSpecBase"
15
+ },
16
+ {
17
+ "type": "object",
18
+ "required": [
19
+ "data",
20
+ "encoding",
21
+ "mark"
22
+ ],
23
+ "properties": {
24
+ "mark": {
25
+ "anyOf": [
26
+ {
27
+ "type": "string",
28
+ "const": "errorbar"
29
+ },
30
+ {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "ticks": {
35
+ "type": "boolean",
36
+ "description": "Draw decorative end caps on an explicit interval; default false."
37
+ },
38
+ "type": {
39
+ "type": "string",
40
+ "const": "errorbar"
41
+ },
42
+ "size": {
43
+ "type": "number",
44
+ "description": "Bar/column marks: fixed bar thickness in pixels. When set, bars are this height (horizontal) or width (vertical), centered within the band.\n\nPoint marks: the dot RADIUS in pixels (default 5, typical 2-12). This is NOT Vega-Lite's point `size`, which is an area in px^2 -- a VL size of 110 corresponds to `size: 6` here (r = sqrt(area / pi)). Validation rejects values above 50 with the conversion."
45
+ },
46
+ "filled": {
47
+ "type": "boolean",
48
+ "description": "Whether the mark is filled (vs stroked only)."
49
+ },
50
+ "opacity": {
51
+ "type": "number",
52
+ "description": "Default opacity (0-1)."
53
+ },
54
+ "fillOpacity": {
55
+ "type": "number",
56
+ "description": "Fill opacity (0-1), independent of stroke (Vega-Lite aligned).\n\nOn a binned bar with more than one color group this defaults to 0.55 so overlapping distributions stay readable; set it explicitly to override. On an area, setting it switches the fill from the default gradient to a flat translucent series color — gradients and overlapping fills don't mix."
57
+ },
58
+ "fill": {
59
+ "anyOf": [
60
+ {
61
+ "type": "string"
62
+ },
63
+ {
64
+ "$ref": "#/definitions/GradientDef"
65
+ }
66
+ ],
67
+ "description": "Default fill color or gradient."
68
+ },
69
+ "stroke": {
70
+ "type": "string",
71
+ "description": "Default stroke color."
72
+ },
73
+ "strokeWidth": {
74
+ "type": "number",
75
+ "description": "Default stroke width."
76
+ },
77
+ "tooltip": {
78
+ "type": [
79
+ "boolean",
80
+ "null"
81
+ ],
82
+ "description": "Tooltip behavior. null disables tooltips."
83
+ },
84
+ "clip": {
85
+ "type": "boolean",
86
+ "description": "Clip marks to the chart area."
87
+ },
88
+ "fillPattern": {
89
+ "type": "string",
90
+ "enum": [
91
+ "auto",
92
+ "none"
93
+ ],
94
+ "description": "Pattern-fill reinforcement for filled marks (bar, area, arc).\n\n- `'auto'`: assign a per-series SVG pattern (diagonal hatch, dots, crosshatch, vertical lines) layered over each series color so series remain distinguishable without color vision. Marks too small to show a legible pattern keep their solid fill.\n- `'none'` (default): solid fills only."
95
+ }
96
+ },
97
+ "required": [
98
+ "type"
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ "encoding": {
104
+ "$ref": "#/definitions/ErrorbarEncoding%3CDataRow%3E"
105
+ }
106
+ }
107
+ }
108
+ ]
109
+ },
11
110
  {
12
111
  "allOf": [
13
112
  {
@@ -2210,9 +2309,13 @@
2210
2309
  "additionalProperties": false,
2211
2310
  "description": "Radial gradient definition. Coordinates are in [0,1] normalized space relative to the mark's bounding box."
2212
2311
  },
2213
- "ArcEncoding<DataRow>": {
2312
+ "ErrorbarEncoding<DataRow>": {
2214
2313
  "type": "object",
2215
2314
  "properties": {
2315
+ "description": {
2316
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
2317
+ "description": "Accessible mark description; static output exposes it as a native title."
2318
+ },
2216
2319
  "x": {
2217
2320
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
2218
2321
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -2228,6 +2331,9 @@
2228
2331
  },
2229
2332
  {
2230
2333
  "$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
2334
+ },
2335
+ {
2336
+ "$ref": "#/definitions/ValueDef"
2231
2337
  }
2232
2338
  ],
2233
2339
  "description": "Color channel. Required for arc marks (determines pie/donut slice coloring). Optional for all other marks -- used for series differentiation on multi-series charts, or heatmap intensity. Accepts a conditional definition to apply colors based on data predicates, or a bare `{ value }` constant (VL aligned; expanded to the mark-level fill/stroke)."
@@ -2304,7 +2410,7 @@
2304
2410
  },
2305
2411
  "theta": {
2306
2412
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
2307
- "description": "Canonical value channel for arc marks (quantitative — the slice value)."
2413
+ "description": "Angular position (slice value) for arc marks (pie/donut), the canonical value channel in v8. Waffle and parliament marks accept it too (the same part-to-whole value channel). The compiler populates internal `y` from `theta`; authored `y` aliases are rejected. Not used by any other mark type."
2308
2414
  },
2309
2415
  "facet": {
2310
2416
  "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
@@ -2320,11 +2426,59 @@
2320
2426
  }
2321
2427
  },
2322
2428
  "required": [
2323
- "theta",
2324
- "color"
2429
+ "x",
2430
+ "y"
2325
2431
  ],
2326
2432
  "additionalProperties": false,
2327
- "description": "Encoding for arc marks (pie/donut charts).\n- `theta`: required (quantitative — the canonical slice value channel)\n- `color`: required (nominal/ordinal — the category)"
2433
+ "description": "Explicit interval bounds; runtime validation requires exactly one of x2/y2."
2434
+ },
2435
+ "DescriptionEncoding<DataRow>": {
2436
+ "anyOf": [
2437
+ {
2438
+ "type": "object",
2439
+ "additionalProperties": false,
2440
+ "properties": {
2441
+ "type": {
2442
+ "$ref": "#/definitions/FieldType",
2443
+ "description": "How to interpret the field values.\n- quantitative: continuous numbers (scale: linear)\n- temporal: dates/times (scale: time)\n- nominal: unordered categories (scale: ordinal)\n- ordinal: ordered categories (scale: ordinal)"
2444
+ },
2445
+ "format": {
2446
+ "type": "string",
2447
+ "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."
2448
+ },
2449
+ "field": {
2450
+ "type": "string",
2451
+ "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."
2452
+ }
2453
+ },
2454
+ "required": [
2455
+ "field"
2456
+ ]
2457
+ },
2458
+ {
2459
+ "type": "object",
2460
+ "properties": {
2461
+ "value": {
2462
+ "type": "string"
2463
+ }
2464
+ },
2465
+ "required": [
2466
+ "value"
2467
+ ],
2468
+ "additionalProperties": false
2469
+ }
2470
+ ],
2471
+ "description": "Authored mark text, kept verbatim for strings and formatted for numeric fields."
2472
+ },
2473
+ "FieldType": {
2474
+ "type": "string",
2475
+ "enum": [
2476
+ "quantitative",
2477
+ "temporal",
2478
+ "nominal",
2479
+ "ordinal"
2480
+ ],
2481
+ "description": "Data field type, following Vega-Lite conventions."
2328
2482
  },
2329
2483
  "EncodingChannel<DataRow>": {
2330
2484
  "type": "object",
@@ -2337,6 +2491,34 @@
2337
2491
  "$ref": "#/definitions/FieldType",
2338
2492
  "description": "How to interpret the field values.\n- quantitative: continuous numbers (scale: linear)\n- temporal: dates/times (scale: time)\n- nominal: unordered categories (scale: ordinal)\n- ordinal: ordered categories (scale: ordinal)"
2339
2493
  },
2494
+ "interval": {
2495
+ "anyOf": [
2496
+ {
2497
+ "type": "string",
2498
+ "const": "day"
2499
+ },
2500
+ {
2501
+ "type": "string",
2502
+ "const": "week"
2503
+ },
2504
+ {
2505
+ "type": "string",
2506
+ "const": "month"
2507
+ },
2508
+ {
2509
+ "type": "string",
2510
+ "const": "quarter"
2511
+ },
2512
+ {
2513
+ "type": "string",
2514
+ "const": "year"
2515
+ },
2516
+ {
2517
+ "type": "number"
2518
+ }
2519
+ ],
2520
+ "description": "Temporal bar position interval; numbers are milliseconds. Bar marks only."
2521
+ },
2340
2522
  "aggregate": {
2341
2523
  "$ref": "#/definitions/AggregateOp",
2342
2524
  "description": "Optional aggregate to apply before encoding."
@@ -2480,16 +2662,6 @@
2480
2662
  "additionalProperties": false,
2481
2663
  "description": "A single encoding channel mapping a data field to a visual property.\n\nFollows the Vega-Lite encoding model: field identifies the column, type determines how the engine interprets values, aggregate applies a transformation before encoding."
2482
2664
  },
2483
- "FieldType": {
2484
- "type": "string",
2485
- "enum": [
2486
- "quantitative",
2487
- "temporal",
2488
- "nominal",
2489
- "ordinal"
2490
- ],
2491
- "description": "Data field type, following Vega-Lite conventions."
2492
- },
2493
2665
  "AggregateOp": {
2494
2666
  "type": "string",
2495
2667
  "enum": [
@@ -3205,6 +3377,19 @@
3205
3377
  "additionalProperties": false,
3206
3378
  "description": "Facet channel definition: partitions data into small-multiple panels.\n\nUnlike positional channels, facet only needs a field, a categorical type, and optional layout hints (columns, sort). It does not carry scale/axis config because it produces a grid, not a visual encoding."
3207
3379
  },
3380
+ "FrameConfig": {
3381
+ "type": "object",
3382
+ "properties": {
3383
+ "left": {
3384
+ "type": "number"
3385
+ },
3386
+ "right": {
3387
+ "type": "number"
3388
+ }
3389
+ },
3390
+ "additionalProperties": false,
3391
+ "description": "Fixed horizontal figure gutters in CSS pixels."
3392
+ },
3208
3393
  "FieldMetadata": {
3209
3394
  "type": "object",
3210
3395
  "properties": {
@@ -3823,6 +4008,10 @@
3823
4008
  "type": "string",
3824
4009
  "description": "Alt text announced by screen readers for the chart as a whole. Replaces the auto-generated description. Also settable via the top-level `description` field (Vega-Lite convention); this field wins when both are present."
3825
4010
  },
4011
+ "table": {
4012
+ "type": "boolean",
4013
+ "description": "Render the hidden screen-reader data table. Defaults to true; navigation stays enabled."
4014
+ },
3826
4015
  "hidden": {
3827
4016
  "type": "boolean",
3828
4017
  "description": "Hide the chart from assistive technology entirely (`aria-hidden`). Use only when the chart is decorative or the surrounding content already conveys the same information. Also suppresses the hidden screen-reader data table and keyboard mark navigation."
@@ -4302,6 +4491,10 @@
4302
4491
  "LabelConfig": {
4303
4492
  "type": "object",
4304
4493
  "properties": {
4494
+ "content": {
4495
+ "$ref": "#/definitions/EndpointLabelContent",
4496
+ "description": "Compose category/series names and formatted values; default value only."
4497
+ },
4305
4498
  "placement": {
4306
4499
  "type": "string",
4307
4500
  "enum": [
@@ -4340,6 +4533,15 @@
4340
4533
  "additionalProperties": false,
4341
4534
  "description": "Label display configuration for chart data labels."
4342
4535
  },
4536
+ "EndpointLabelContent": {
4537
+ "type": "string",
4538
+ "enum": [
4539
+ "label",
4540
+ "value",
4541
+ "label value"
4542
+ ],
4543
+ "description": "Content composition for an endpoint-label entry: the series name, the formatted value, or both joined on one line. See {@link EndpointLabelsConfig.content } ."
4544
+ },
4343
4545
  "LabelDensity": {
4344
4546
  "type": "string",
4345
4547
  "enum": [
@@ -4448,15 +4650,6 @@
4448
4650
  "additionalProperties": false,
4449
4651
  "description": "Configuration for the endpoint labels column rendered at the chart's right edge for multi-series line/area charts. Each entry pairs the series name with its last formatted value, optionally anchored to the line by an open-circle marker.\n\nThe column and traditional legend are independent identification surfaces. For multi-series line/area charts:\n\n| `legend.show` | `endpointLabels` | Traditional legend | Endpoint column | |--|--|--|--| | unset | unset | hidden | shown | | true | unset | shown | shown | | unset | false | shown | hidden | | false | false | hidden (accessibility warning) | hidden | | true | false | shown | hidden | | false | true | hidden | shown | | true | true | shown | shown |\n\nSingle-series charts: column is hidden by default (nothing to identify).\n\nThe implementation is in `packages/engine/src/legend/suppression.ts` — `resolveSuppression` is the single source of truth. The table above is a user-facing mirror; if the two ever diverge, the engine wins. Tests in `legend/__tests__/suppression.test.ts` enforce every cell."
4450
4652
  },
4451
- "EndpointLabelContent": {
4452
- "type": "string",
4453
- "enum": [
4454
- "label",
4455
- "value",
4456
- "label value"
4457
- ],
4458
- "description": "Content composition for an endpoint-label entry: the series name, the formatted value, or both joined on one line. See {@link EndpointLabelsConfig.content } ."
4459
- },
4460
4653
  "ResponsiveConfig": {
4461
4654
  "type": "object",
4462
4655
  "properties": {
@@ -4500,14 +4693,14 @@
4500
4693
  "categorical": {
4501
4694
  "type": "array",
4502
4695
  "items": {
4503
- "type": "string"
4696
+ "$ref": "#/definitions/TokenValue"
4504
4697
  },
4505
- "description": "Categorical stroke palette for nominal data (array of CSS color strings)."
4698
+ "description": "Categorical stroke palette: CSS colors or explicit light/dark pairs."
4506
4699
  },
4507
4700
  "categoricalFill": {
4508
4701
  "type": "array",
4509
4702
  "items": {
4510
- "type": "string"
4703
+ "$ref": "#/definitions/TokenValue"
4511
4704
  },
4512
4705
  "description": "Categorical palette for area-filling marks (bar, area, arc, waffle, calendar, rect). Defaults to `categorical` when only that is set."
4513
4706
  },
@@ -5322,7 +5515,7 @@
5322
5515
  "$ref": "#/definitions/AnimationConfig"
5323
5516
  }
5324
5517
  ],
5325
- "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"
5518
+ "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"
5326
5519
  },
5327
5520
  "AnimationPreset": {
5328
5521
  "type": "string",
@@ -5342,13 +5535,13 @@
5342
5535
  "enter": {
5343
5536
  "anyOf": [
5344
5537
  {
5345
- "$ref": "#/definitions/AnimationPhaseConfig"
5538
+ "$ref": "#/definitions/EnterPhaseConfig"
5346
5539
  },
5347
5540
  {
5348
5541
  "type": "boolean"
5349
5542
  }
5350
5543
  ],
5351
- "description": "Entrance animation when chart first renders."
5544
+ "description": "Entrance animation when chart first renders (by default, once it scrolls into view)."
5352
5545
  },
5353
5546
  "update": {
5354
5547
  "anyOf": [
@@ -5374,13 +5567,13 @@
5374
5567
  },
5375
5568
  "annotationDelay": {
5376
5569
  "type": "number",
5377
- "description": "Delay before annotations animate in (ms after marks). Default: 200."
5570
+ "description": "Gap in ms between the last mark reaching 90% of its entrance and annotations starting. Default: 150 (0 under a preset)."
5378
5571
  }
5379
5572
  },
5380
5573
  "additionalProperties": false,
5381
5574
  "description": "Full animation config object. Structured as enter/update/exit phases following Vega's encoding set model."
5382
5575
  },
5383
- "AnimationPhaseConfig": {
5576
+ "EnterPhaseConfig": {
5384
5577
  "type": "object",
5385
5578
  "properties": {
5386
5579
  "spring": {
@@ -5389,11 +5582,11 @@
5389
5582
  },
5390
5583
  "duration": {
5391
5584
  "type": "number",
5392
- "description": "Duration in ms. Default: 500 for enter."
5585
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5393
5586
  },
5394
5587
  "ease": {
5395
5588
  "$ref": "#/definitions/AnimationEase",
5396
- "description": "Easing preset. Default: 'smooth'."
5589
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5397
5590
  },
5398
5591
  "stagger": {
5399
5592
  "anyOf": [
@@ -5405,10 +5598,18 @@
5405
5598
  }
5406
5599
  ],
5407
5600
  "description": "Stagger config. true = defaults, false = no stagger. Default: true for enter."
5601
+ },
5602
+ "trigger": {
5603
+ "type": "string",
5604
+ "enum": [
5605
+ "visible",
5606
+ "mount"
5607
+ ],
5608
+ "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."
5408
5609
  }
5409
5610
  },
5410
5611
  "additionalProperties": false,
5411
- "description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
5612
+ "description": "Entrance phase config. Adds `trigger` on top of the shared phase options."
5412
5613
  },
5413
5614
  "SpringConfig": {
5414
5615
  "type": "object",
@@ -5430,16 +5631,17 @@
5430
5631
  "type": "string",
5431
5632
  "enum": [
5432
5633
  "smooth",
5433
- "snappy"
5634
+ "snappy",
5635
+ "gentle"
5434
5636
  ],
5435
- "description": "Named easing presets for entrance animations. Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention."
5637
+ "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."
5436
5638
  },
5437
5639
  "AnimationStagger": {
5438
5640
  "type": "object",
5439
5641
  "properties": {
5440
5642
  "delay": {
5441
5643
  "type": "number",
5442
- "description": "Delay between each element in ms. Default: 80"
5644
+ "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."
5443
5645
  },
5444
5646
  "order": {
5445
5647
  "type": "string",
@@ -5463,11 +5665,11 @@
5463
5665
  },
5464
5666
  "duration": {
5465
5667
  "type": "number",
5466
- "description": "Duration in ms. Default: 500 for enter."
5668
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5467
5669
  },
5468
5670
  "ease": {
5469
5671
  "$ref": "#/definitions/AnimationEase",
5470
- "description": "Easing preset. Default: 'smooth'."
5672
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5471
5673
  },
5472
5674
  "stagger": {
5473
5675
  "anyOf": [
@@ -5482,19 +5684,49 @@
5482
5684
  },
5483
5685
  "maxMarks": {
5484
5686
  "type": "number",
5485
- "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."
5687
+ "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."
5486
5688
  }
5487
5689
  },
5488
5690
  "additionalProperties": false,
5489
5691
  "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."
5490
5692
  },
5693
+ "AnimationPhaseConfig": {
5694
+ "type": "object",
5695
+ "properties": {
5696
+ "spring": {
5697
+ "$ref": "#/definitions/SpringConfig",
5698
+ "description": "Spring mode. Cannot be combined with duration or ease in this phase."
5699
+ },
5700
+ "duration": {
5701
+ "type": "number",
5702
+ "description": "Duration in ms. Default: 800 for enter, 500 for update, 120 for exit."
5703
+ },
5704
+ "ease": {
5705
+ "$ref": "#/definitions/AnimationEase",
5706
+ "description": "Easing preset. Default: 'smooth' ('gentle' for exit)."
5707
+ },
5708
+ "stagger": {
5709
+ "anyOf": [
5710
+ {
5711
+ "$ref": "#/definitions/AnimationStagger"
5712
+ },
5713
+ {
5714
+ "type": "boolean"
5715
+ }
5716
+ ],
5717
+ "description": "Stagger config. true = defaults, false = no stagger. Default: true for enter."
5718
+ }
5719
+ },
5720
+ "additionalProperties": false,
5721
+ "description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
5722
+ },
5491
5723
  "Display": {
5492
5724
  "type": "string",
5493
5725
  "enum": [
5494
5726
  "full",
5495
5727
  "sparkline"
5496
5728
  ],
5497
- "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."
5729
+ "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."
5498
5730
  },
5499
5731
  "SeriesSearchConfig": {
5500
5732
  "type": "object",
@@ -5616,9 +5848,133 @@
5616
5848
  ],
5617
5849
  "description": "Resolution strategy for shared resources across layers. 'shared' (default): union domains, single axis/legend. 'independent': each layer gets its own scale/axis/legend."
5618
5850
  },
5851
+ "ArcEncoding<DataRow>": {
5852
+ "type": "object",
5853
+ "properties": {
5854
+ "description": {
5855
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
5856
+ "description": "Accessible mark description; static output exposes it as a native title."
5857
+ },
5858
+ "x": {
5859
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5860
+ "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
5861
+ },
5862
+ "y": {
5863
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5864
+ "description": "Vertical position channel. Required for: bar, line, area, point, tick, rect, arc, lollipop. For arc marks, this is the value field (slice size). For all others it's the y-axis position."
5865
+ },
5866
+ "color": {
5867
+ "anyOf": [
5868
+ {
5869
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
5870
+ },
5871
+ {
5872
+ "$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
5873
+ }
5874
+ ],
5875
+ "description": "Color channel. Required for arc marks (determines pie/donut slice coloring). Optional for all other marks -- used for series differentiation on multi-series charts, or heatmap intensity. Accepts a conditional definition to apply colors based on data predicates, or a bare `{ value }` constant (VL aligned; expanded to the mark-level fill/stroke)."
5876
+ },
5877
+ "size": {
5878
+ "anyOf": [
5879
+ {
5880
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
5881
+ },
5882
+ {
5883
+ "$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
5884
+ },
5885
+ {
5886
+ "$ref": "#/definitions/ValueDef"
5887
+ }
5888
+ ],
5889
+ "description": "Size channel. Used by point/bubble charts to scale dots by a quantitative field, area-proportionally (sqrt curve). The units are dot RADII in px: `scale.range` defaults to [3, 30] for scatter, and a bare `{ value }` constant expands to `mark.size`, also a radius. This differs from Vega-Lite, where point size is an area in px^2 -- VL-scale values (60-900) are rejected by validation with the conversion. Accepts a conditional definition to vary size based on data predicates."
5890
+ },
5891
+ "detail": {
5892
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5893
+ "description": "Detail channel. Groups data into multiple series without mapping to a visual property. Useful when you want separate lines per category but don't need the color to differ."
5894
+ },
5895
+ "key": {
5896
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5897
+ "description": "Identity channel for data-update transitions. Maps a field whose value uniquely identifies each datum across updates. Mirrors Vega-Lite's key channel. Not visually encoded. Optional: charts derive sensible default keys."
5898
+ },
5899
+ "x2": {
5900
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5901
+ "description": "Secondary x position. Used with `x` to define a horizontal span (rect marks, error bars). Both `x` and `x2` must be quantitative."
5902
+ },
5903
+ "y2": {
5904
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5905
+ "description": "Secondary y position. Used with `y` to define a vertical span (rect marks, error bands). Both `y` and `y2` must be quantitative."
5906
+ },
5907
+ "opacity": {
5908
+ "anyOf": [
5909
+ {
5910
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
5911
+ },
5912
+ {
5913
+ "$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
5914
+ },
5915
+ {
5916
+ "$ref": "#/definitions/ValueDef"
5917
+ }
5918
+ ],
5919
+ "description": "Data-driven opacity (0-1 range). Accepts a conditional definition to vary opacity based on data predicates (e.g., highlight selected points), or a bare `{ value }` constant (VL aligned; expanded to `mark.opacity`)."
5920
+ },
5921
+ "strokeDash": {
5922
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5923
+ "description": "Stroke dash pattern encoding. Maps a nominal/ordinal field to different dash patterns on line and rule marks. Useful when color alone doesn't distinguish series well."
5924
+ },
5925
+ "angle": {
5926
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5927
+ "description": "Rotation angle encoding for point marks. Maps a quantitative field to 0-360 degrees."
5928
+ },
5929
+ "text": {
5930
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5931
+ "description": "Text content for `text` marks. Required when mark is `'text'`. Not meaningful for other mark types."
5932
+ },
5933
+ "tooltip": {
5934
+ "anyOf": [
5935
+ {
5936
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
5937
+ },
5938
+ {
5939
+ "type": "array",
5940
+ "items": {
5941
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
5942
+ }
5943
+ }
5944
+ ],
5945
+ "description": "Tooltip field(s). Shown on hover. Can be a single channel or an array for multi-field tooltips. Independent of the x/y/color encoding."
5946
+ },
5947
+ "theta": {
5948
+ "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5949
+ "description": "Canonical value channel for arc marks (quantitative — the slice value)."
5950
+ },
5951
+ "facet": {
5952
+ "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
5953
+ "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."
5954
+ },
5955
+ "row": {
5956
+ "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
5957
+ "description": "Row facet channel: partitions data into vertically-stacked panels. Each unique value of the row field produces one panel, arranged in a single column. Shares the x-axis scale by default; y-axis is independent. Mutually exclusive with `facet` and `column`."
5958
+ },
5959
+ "column": {
5960
+ "$ref": "#/definitions/FacetChannel%3CDataRow%3E",
5961
+ "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`."
5962
+ }
5963
+ },
5964
+ "required": [
5965
+ "theta",
5966
+ "color"
5967
+ ],
5968
+ "additionalProperties": false,
5969
+ "description": "Encoding for arc marks (pie/donut charts).\n- `theta`: required (quantitative — the canonical slice value channel)\n- `color`: required (nominal/ordinal — the category)"
5970
+ },
5619
5971
  "LineEncoding<DataRow>": {
5620
5972
  "type": "object",
5621
5973
  "properties": {
5974
+ "description": {
5975
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
5976
+ "description": "Accessible mark description; static output exposes it as a native title."
5977
+ },
5622
5978
  "x": {
5623
5979
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5624
5980
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -5738,6 +6094,10 @@
5738
6094
  "BarEncoding<DataRow>": {
5739
6095
  "type": "object",
5740
6096
  "properties": {
6097
+ "description": {
6098
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6099
+ "description": "Accessible mark description; static output exposes it as a native title."
6100
+ },
5741
6101
  "x": {
5742
6102
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5743
6103
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -5857,6 +6217,10 @@
5857
6217
  "AreaEncoding<DataRow>": {
5858
6218
  "type": "object",
5859
6219
  "properties": {
6220
+ "description": {
6221
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6222
+ "description": "Accessible mark description; static output exposes it as a native title."
6223
+ },
5860
6224
  "x": {
5861
6225
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
5862
6226
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -5999,6 +6363,10 @@
5999
6363
  "PointEncoding<DataRow>": {
6000
6364
  "type": "object",
6001
6365
  "properties": {
6366
+ "description": {
6367
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6368
+ "description": "Accessible mark description; static output exposes it as a native title."
6369
+ },
6002
6370
  "x": {
6003
6371
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6004
6372
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6118,6 +6486,10 @@
6118
6486
  "CircleEncoding<DataRow>": {
6119
6487
  "type": "object",
6120
6488
  "properties": {
6489
+ "description": {
6490
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6491
+ "description": "Accessible mark description; static output exposes it as a native title."
6492
+ },
6121
6493
  "x": {
6122
6494
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6123
6495
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6237,6 +6609,10 @@
6237
6609
  "LollipopEncoding<DataRow>": {
6238
6610
  "type": "object",
6239
6611
  "properties": {
6612
+ "description": {
6613
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6614
+ "description": "Accessible mark description; static output exposes it as a native title."
6615
+ },
6240
6616
  "x": {
6241
6617
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6242
6618
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6356,6 +6732,10 @@
6356
6732
  "BeeswarmEncoding<DataRow>": {
6357
6733
  "type": "object",
6358
6734
  "properties": {
6735
+ "description": {
6736
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6737
+ "description": "Accessible mark description; static output exposes it as a native title."
6738
+ },
6359
6739
  "x": {
6360
6740
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6361
6741
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6471,6 +6851,10 @@
6471
6851
  "RangeEncoding<DataRow>": {
6472
6852
  "type": "object",
6473
6853
  "properties": {
6854
+ "description": {
6855
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6856
+ "description": "Accessible mark description; static output exposes it as a native title."
6857
+ },
6474
6858
  "x": {
6475
6859
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6476
6860
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6584,12 +6968,15 @@
6584
6968
  "x",
6585
6969
  "y"
6586
6970
  ],
6587
- "additionalProperties": false,
6588
- "description": "Encoding for range marks (dumbbell / arrow / range-bar plots).\n- Horizontal (the common editorial form): `y` nominal/ordinal category, `x` quantitative start, `x2` quantitative end.\n- Vertical: `x` nominal/ordinal category, `y` quantitative start, `y2` quantitative end."
6971
+ "additionalProperties": false
6589
6972
  },
6590
6973
  "WaffleEncoding<DataRow>": {
6591
6974
  "type": "object",
6592
6975
  "properties": {
6976
+ "description": {
6977
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
6978
+ "description": "Accessible mark description; static output exposes it as a native title."
6979
+ },
6593
6980
  "x": {
6594
6981
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6595
6982
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6705,6 +7092,10 @@
6705
7092
  "TextEncoding<DataRow>": {
6706
7093
  "type": "object",
6707
7094
  "properties": {
7095
+ "description": {
7096
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7097
+ "description": "Accessible mark description; static output exposes it as a native title."
7098
+ },
6708
7099
  "x": {
6709
7100
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6710
7101
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6823,6 +7214,10 @@
6823
7214
  "TickEncoding<DataRow>": {
6824
7215
  "type": "object",
6825
7216
  "properties": {
7217
+ "description": {
7218
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7219
+ "description": "Accessible mark description; static output exposes it as a native title."
7220
+ },
6826
7221
  "x": {
6827
7222
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6828
7223
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -6942,6 +7337,10 @@
6942
7337
  "RectEncoding<DataRow>": {
6943
7338
  "type": "object",
6944
7339
  "properties": {
7340
+ "description": {
7341
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7342
+ "description": "Accessible mark description; static output exposes it as a native title."
7343
+ },
6945
7344
  "x": {
6946
7345
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
6947
7346
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7061,6 +7460,10 @@
7061
7460
  "Encoding<DataRow>": {
7062
7461
  "type": "object",
7063
7462
  "properties": {
7463
+ "description": {
7464
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7465
+ "description": "Accessible mark description; static output exposes it as a native title."
7466
+ },
7064
7467
  "x": {
7065
7468
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
7066
7469
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7170,12 +7573,15 @@
7170
7573
  "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`."
7171
7574
  }
7172
7575
  },
7173
- "additionalProperties": false,
7174
- "description": "Encoding object mapping visual channels to data fields. Which channels are required depends on the mark type — see the per-mark encoding interfaces (ArcEncoding, LineEncoding, etc.) and MARK_ENCODING_RULES in encoding.ts for the full requirements table."
7576
+ "additionalProperties": false
7175
7577
  },
7176
7578
  "CalendarEncoding<DataRow>": {
7177
7579
  "type": "object",
7178
7580
  "properties": {
7581
+ "description": {
7582
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7583
+ "description": "Accessible mark description; static output exposes it as a native title."
7584
+ },
7179
7585
  "x": {
7180
7586
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
7181
7587
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7285,6 +7691,10 @@
7285
7691
  "ParliamentEncoding<DataRow>": {
7286
7692
  "type": "object",
7287
7693
  "properties": {
7694
+ "description": {
7695
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7696
+ "description": "Accessible mark description; static output exposes it as a native title."
7697
+ },
7288
7698
  "x": {
7289
7699
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
7290
7700
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7400,6 +7810,10 @@
7400
7810
  "HistogramEncoding<DataRow>": {
7401
7811
  "type": "object",
7402
7812
  "properties": {
7813
+ "description": {
7814
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7815
+ "description": "Accessible mark description; static output exposes it as a native title."
7816
+ },
7403
7817
  "x": {
7404
7818
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
7405
7819
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7518,6 +7932,10 @@
7518
7932
  "DensityEncoding<DataRow>": {
7519
7933
  "type": "object",
7520
7934
  "properties": {
7935
+ "description": {
7936
+ "$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
7937
+ "description": "Accessible mark description; static output exposes it as a native title."
7938
+ },
7521
7939
  "x": {
7522
7940
  "$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
7523
7941
  "description": "Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop. Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories, `'quantitative'` for numbers."
@@ -7643,6 +8061,10 @@
7643
8061
  "encoding": {
7644
8062
  "description": "Encoding channel map."
7645
8063
  },
8064
+ "frame": {
8065
+ "$ref": "#/definitions/FrameConfig",
8066
+ "description": "Fixed horizontal plot gutters."
8067
+ },
7646
8068
  "fields": {
7647
8069
  "type": "object",
7648
8070
  "additionalProperties": {
@@ -7807,7 +8229,7 @@
7807
8229
  },
7808
8230
  "animation": {
7809
8231
  "$ref": "#/definitions/AnimationSpec",
7810
- "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"
8232
+ "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."
7811
8233
  },
7812
8234
  "crosshair": {
7813
8235
  "type": "boolean",