@opendata-ai/openchart-core 9.0.0-rc.2 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +125 -23
- package/dist/index.js +63 -23
- package/dist/index.js.map +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +414 -31
- package/schema/table.schema.json +3 -3
- package/schema/vizspec.schema.json +1133 -143
package/schema/chart.schema.json
CHANGED
|
@@ -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
|
-
"
|
|
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": "
|
|
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
|
-
"
|
|
2324
|
-
"
|
|
2429
|
+
"x",
|
|
2430
|
+
"y"
|
|
2325
2431
|
],
|
|
2326
2432
|
"additionalProperties": false,
|
|
2327
|
-
"description": "
|
|
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
|
-
"
|
|
4696
|
+
"$ref": "#/definitions/TokenValue"
|
|
4504
4697
|
},
|
|
4505
|
-
"description": "Categorical stroke palette
|
|
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
|
-
"
|
|
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
|
},
|
|
@@ -5616,9 +5809,133 @@
|
|
|
5616
5809
|
],
|
|
5617
5810
|
"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
5811
|
},
|
|
5812
|
+
"ArcEncoding<DataRow>": {
|
|
5813
|
+
"type": "object",
|
|
5814
|
+
"properties": {
|
|
5815
|
+
"description": {
|
|
5816
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
5817
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
5818
|
+
},
|
|
5819
|
+
"x": {
|
|
5820
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5821
|
+
"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."
|
|
5822
|
+
},
|
|
5823
|
+
"y": {
|
|
5824
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5825
|
+
"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."
|
|
5826
|
+
},
|
|
5827
|
+
"color": {
|
|
5828
|
+
"anyOf": [
|
|
5829
|
+
{
|
|
5830
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
"$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
|
|
5834
|
+
}
|
|
5835
|
+
],
|
|
5836
|
+
"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)."
|
|
5837
|
+
},
|
|
5838
|
+
"size": {
|
|
5839
|
+
"anyOf": [
|
|
5840
|
+
{
|
|
5841
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
|
|
5842
|
+
},
|
|
5843
|
+
{
|
|
5844
|
+
"$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
|
|
5845
|
+
},
|
|
5846
|
+
{
|
|
5847
|
+
"$ref": "#/definitions/ValueDef"
|
|
5848
|
+
}
|
|
5849
|
+
],
|
|
5850
|
+
"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."
|
|
5851
|
+
},
|
|
5852
|
+
"detail": {
|
|
5853
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5854
|
+
"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."
|
|
5855
|
+
},
|
|
5856
|
+
"key": {
|
|
5857
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5858
|
+
"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."
|
|
5859
|
+
},
|
|
5860
|
+
"x2": {
|
|
5861
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5862
|
+
"description": "Secondary x position. Used with `x` to define a horizontal span (rect marks, error bars). Both `x` and `x2` must be quantitative."
|
|
5863
|
+
},
|
|
5864
|
+
"y2": {
|
|
5865
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5866
|
+
"description": "Secondary y position. Used with `y` to define a vertical span (rect marks, error bands). Both `y` and `y2` must be quantitative."
|
|
5867
|
+
},
|
|
5868
|
+
"opacity": {
|
|
5869
|
+
"anyOf": [
|
|
5870
|
+
{
|
|
5871
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
|
|
5872
|
+
},
|
|
5873
|
+
{
|
|
5874
|
+
"$ref": "#/definitions/ConditionalValueDef%3CDataRow%3E"
|
|
5875
|
+
},
|
|
5876
|
+
{
|
|
5877
|
+
"$ref": "#/definitions/ValueDef"
|
|
5878
|
+
}
|
|
5879
|
+
],
|
|
5880
|
+
"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`)."
|
|
5881
|
+
},
|
|
5882
|
+
"strokeDash": {
|
|
5883
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5884
|
+
"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."
|
|
5885
|
+
},
|
|
5886
|
+
"angle": {
|
|
5887
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5888
|
+
"description": "Rotation angle encoding for point marks. Maps a quantitative field to 0-360 degrees."
|
|
5889
|
+
},
|
|
5890
|
+
"text": {
|
|
5891
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5892
|
+
"description": "Text content for `text` marks. Required when mark is `'text'`. Not meaningful for other mark types."
|
|
5893
|
+
},
|
|
5894
|
+
"tooltip": {
|
|
5895
|
+
"anyOf": [
|
|
5896
|
+
{
|
|
5897
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
|
|
5898
|
+
},
|
|
5899
|
+
{
|
|
5900
|
+
"type": "array",
|
|
5901
|
+
"items": {
|
|
5902
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E"
|
|
5903
|
+
}
|
|
5904
|
+
}
|
|
5905
|
+
],
|
|
5906
|
+
"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."
|
|
5907
|
+
},
|
|
5908
|
+
"theta": {
|
|
5909
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5910
|
+
"description": "Canonical value channel for arc marks (quantitative — the slice value)."
|
|
5911
|
+
},
|
|
5912
|
+
"facet": {
|
|
5913
|
+
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
5914
|
+
"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."
|
|
5915
|
+
},
|
|
5916
|
+
"row": {
|
|
5917
|
+
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
5918
|
+
"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`."
|
|
5919
|
+
},
|
|
5920
|
+
"column": {
|
|
5921
|
+
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
5922
|
+
"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`."
|
|
5923
|
+
}
|
|
5924
|
+
},
|
|
5925
|
+
"required": [
|
|
5926
|
+
"theta",
|
|
5927
|
+
"color"
|
|
5928
|
+
],
|
|
5929
|
+
"additionalProperties": false,
|
|
5930
|
+
"description": "Encoding for arc marks (pie/donut charts).\n- `theta`: required (quantitative — the canonical slice value channel)\n- `color`: required (nominal/ordinal — the category)"
|
|
5931
|
+
},
|
|
5619
5932
|
"LineEncoding<DataRow>": {
|
|
5620
5933
|
"type": "object",
|
|
5621
5934
|
"properties": {
|
|
5935
|
+
"description": {
|
|
5936
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
5937
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
5938
|
+
},
|
|
5622
5939
|
"x": {
|
|
5623
5940
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5624
5941
|
"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 +6055,10 @@
|
|
|
5738
6055
|
"BarEncoding<DataRow>": {
|
|
5739
6056
|
"type": "object",
|
|
5740
6057
|
"properties": {
|
|
6058
|
+
"description": {
|
|
6059
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6060
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6061
|
+
},
|
|
5741
6062
|
"x": {
|
|
5742
6063
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5743
6064
|
"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 +6178,10 @@
|
|
|
5857
6178
|
"AreaEncoding<DataRow>": {
|
|
5858
6179
|
"type": "object",
|
|
5859
6180
|
"properties": {
|
|
6181
|
+
"description": {
|
|
6182
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6183
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6184
|
+
},
|
|
5860
6185
|
"x": {
|
|
5861
6186
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
5862
6187
|
"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 +6324,10 @@
|
|
|
5999
6324
|
"PointEncoding<DataRow>": {
|
|
6000
6325
|
"type": "object",
|
|
6001
6326
|
"properties": {
|
|
6327
|
+
"description": {
|
|
6328
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6329
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6330
|
+
},
|
|
6002
6331
|
"x": {
|
|
6003
6332
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6004
6333
|
"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 +6447,10 @@
|
|
|
6118
6447
|
"CircleEncoding<DataRow>": {
|
|
6119
6448
|
"type": "object",
|
|
6120
6449
|
"properties": {
|
|
6450
|
+
"description": {
|
|
6451
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6452
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6453
|
+
},
|
|
6121
6454
|
"x": {
|
|
6122
6455
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6123
6456
|
"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 +6570,10 @@
|
|
|
6237
6570
|
"LollipopEncoding<DataRow>": {
|
|
6238
6571
|
"type": "object",
|
|
6239
6572
|
"properties": {
|
|
6573
|
+
"description": {
|
|
6574
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6575
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6576
|
+
},
|
|
6240
6577
|
"x": {
|
|
6241
6578
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6242
6579
|
"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 +6693,10 @@
|
|
|
6356
6693
|
"BeeswarmEncoding<DataRow>": {
|
|
6357
6694
|
"type": "object",
|
|
6358
6695
|
"properties": {
|
|
6696
|
+
"description": {
|
|
6697
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6698
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6699
|
+
},
|
|
6359
6700
|
"x": {
|
|
6360
6701
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6361
6702
|
"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 +6812,10 @@
|
|
|
6471
6812
|
"RangeEncoding<DataRow>": {
|
|
6472
6813
|
"type": "object",
|
|
6473
6814
|
"properties": {
|
|
6815
|
+
"description": {
|
|
6816
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6817
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6818
|
+
},
|
|
6474
6819
|
"x": {
|
|
6475
6820
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6476
6821
|
"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 +6929,15 @@
|
|
|
6584
6929
|
"x",
|
|
6585
6930
|
"y"
|
|
6586
6931
|
],
|
|
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."
|
|
6932
|
+
"additionalProperties": false
|
|
6589
6933
|
},
|
|
6590
6934
|
"WaffleEncoding<DataRow>": {
|
|
6591
6935
|
"type": "object",
|
|
6592
6936
|
"properties": {
|
|
6937
|
+
"description": {
|
|
6938
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
6939
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
6940
|
+
},
|
|
6593
6941
|
"x": {
|
|
6594
6942
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6595
6943
|
"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 +7053,10 @@
|
|
|
6705
7053
|
"TextEncoding<DataRow>": {
|
|
6706
7054
|
"type": "object",
|
|
6707
7055
|
"properties": {
|
|
7056
|
+
"description": {
|
|
7057
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7058
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7059
|
+
},
|
|
6708
7060
|
"x": {
|
|
6709
7061
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6710
7062
|
"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 +7175,10 @@
|
|
|
6823
7175
|
"TickEncoding<DataRow>": {
|
|
6824
7176
|
"type": "object",
|
|
6825
7177
|
"properties": {
|
|
7178
|
+
"description": {
|
|
7179
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7180
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7181
|
+
},
|
|
6826
7182
|
"x": {
|
|
6827
7183
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6828
7184
|
"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 +7298,10 @@
|
|
|
6942
7298
|
"RectEncoding<DataRow>": {
|
|
6943
7299
|
"type": "object",
|
|
6944
7300
|
"properties": {
|
|
7301
|
+
"description": {
|
|
7302
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7303
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7304
|
+
},
|
|
6945
7305
|
"x": {
|
|
6946
7306
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6947
7307
|
"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 +7421,10 @@
|
|
|
7061
7421
|
"Encoding<DataRow>": {
|
|
7062
7422
|
"type": "object",
|
|
7063
7423
|
"properties": {
|
|
7424
|
+
"description": {
|
|
7425
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7426
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7427
|
+
},
|
|
7064
7428
|
"x": {
|
|
7065
7429
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
7066
7430
|
"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 +7534,15 @@
|
|
|
7170
7534
|
"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
7535
|
}
|
|
7172
7536
|
},
|
|
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."
|
|
7537
|
+
"additionalProperties": false
|
|
7175
7538
|
},
|
|
7176
7539
|
"CalendarEncoding<DataRow>": {
|
|
7177
7540
|
"type": "object",
|
|
7178
7541
|
"properties": {
|
|
7542
|
+
"description": {
|
|
7543
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7544
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7545
|
+
},
|
|
7179
7546
|
"x": {
|
|
7180
7547
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
7181
7548
|
"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 +7652,10 @@
|
|
|
7285
7652
|
"ParliamentEncoding<DataRow>": {
|
|
7286
7653
|
"type": "object",
|
|
7287
7654
|
"properties": {
|
|
7655
|
+
"description": {
|
|
7656
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7657
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7658
|
+
},
|
|
7288
7659
|
"x": {
|
|
7289
7660
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
7290
7661
|
"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 +7771,10 @@
|
|
|
7400
7771
|
"HistogramEncoding<DataRow>": {
|
|
7401
7772
|
"type": "object",
|
|
7402
7773
|
"properties": {
|
|
7774
|
+
"description": {
|
|
7775
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7776
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7777
|
+
},
|
|
7403
7778
|
"x": {
|
|
7404
7779
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
7405
7780
|
"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 +7893,10 @@
|
|
|
7518
7893
|
"DensityEncoding<DataRow>": {
|
|
7519
7894
|
"type": "object",
|
|
7520
7895
|
"properties": {
|
|
7896
|
+
"description": {
|
|
7897
|
+
"$ref": "#/definitions/DescriptionEncoding%3CDataRow%3E",
|
|
7898
|
+
"description": "Accessible mark description; static output exposes it as a native title."
|
|
7899
|
+
},
|
|
7521
7900
|
"x": {
|
|
7522
7901
|
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
7523
7902
|
"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 +8022,10 @@
|
|
|
7643
8022
|
"encoding": {
|
|
7644
8023
|
"description": "Encoding channel map."
|
|
7645
8024
|
},
|
|
8025
|
+
"frame": {
|
|
8026
|
+
"$ref": "#/definitions/FrameConfig",
|
|
8027
|
+
"description": "Fixed horizontal plot gutters."
|
|
8028
|
+
},
|
|
7646
8029
|
"fields": {
|
|
7647
8030
|
"type": "object",
|
|
7648
8031
|
"additionalProperties": {
|