@opendata-ai/openchart-core 9.1.0 → 9.2.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 +93 -3
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +122 -0
- package/schema/vizspec.schema.json +298 -1
package/schema/chart.schema.json
CHANGED
|
@@ -417,6 +417,10 @@
|
|
|
417
417
|
],
|
|
418
418
|
"description": "Corner radius for rect/bar marks. 'pill' sets rx to half the bar thickness."
|
|
419
419
|
},
|
|
420
|
+
"mirror": {
|
|
421
|
+
"type": "boolean",
|
|
422
|
+
"description": "Mirror horizontal bars around a shared center axis (a population pyramid). Only meaningful when `type` is `'bar'`; needs a color field with exactly two values, the first drawn to the left. Defaults to false."
|
|
423
|
+
},
|
|
420
424
|
"type": {
|
|
421
425
|
"type": "string",
|
|
422
426
|
"const": "bar"
|
|
@@ -5848,6 +5852,108 @@
|
|
|
5848
5852
|
],
|
|
5849
5853
|
"description": "Resolution strategy for shared resources across layers. 'shared' (default): union domains, single axis/legend. 'independent': each layer gets its own scale/axis/legend."
|
|
5850
5854
|
},
|
|
5855
|
+
"PlaybackConfig": {
|
|
5856
|
+
"type": "object",
|
|
5857
|
+
"properties": {
|
|
5858
|
+
"duration": {
|
|
5859
|
+
"type": "number",
|
|
5860
|
+
"description": "Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`."
|
|
5861
|
+
},
|
|
5862
|
+
"step": {
|
|
5863
|
+
"type": "number",
|
|
5864
|
+
"description": "Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`."
|
|
5865
|
+
},
|
|
5866
|
+
"gaps": {
|
|
5867
|
+
"type": "string",
|
|
5868
|
+
"enum": [
|
|
5869
|
+
"interpolate",
|
|
5870
|
+
"hold",
|
|
5871
|
+
"drop"
|
|
5872
|
+
],
|
|
5873
|
+
"description": "Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent."
|
|
5874
|
+
},
|
|
5875
|
+
"holdEnd": {
|
|
5876
|
+
"type": "number",
|
|
5877
|
+
"description": "Time to dwell on the final frame in milliseconds. Defaults to 1500."
|
|
5878
|
+
},
|
|
5879
|
+
"loop": {
|
|
5880
|
+
"type": "boolean",
|
|
5881
|
+
"description": "Restart after the final hold. Defaults to false."
|
|
5882
|
+
},
|
|
5883
|
+
"autoplay": {
|
|
5884
|
+
"anyOf": [
|
|
5885
|
+
{
|
|
5886
|
+
"type": "string",
|
|
5887
|
+
"const": "visible"
|
|
5888
|
+
},
|
|
5889
|
+
{
|
|
5890
|
+
"type": "boolean"
|
|
5891
|
+
}
|
|
5892
|
+
],
|
|
5893
|
+
"description": "Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay."
|
|
5894
|
+
},
|
|
5895
|
+
"controls": {
|
|
5896
|
+
"type": "boolean",
|
|
5897
|
+
"description": "Show play/pause, scrubber, and period readout. Defaults to true."
|
|
5898
|
+
},
|
|
5899
|
+
"period": {
|
|
5900
|
+
"anyOf": [
|
|
5901
|
+
{
|
|
5902
|
+
"type": "boolean",
|
|
5903
|
+
"const": false
|
|
5904
|
+
},
|
|
5905
|
+
{
|
|
5906
|
+
"type": "object",
|
|
5907
|
+
"properties": {
|
|
5908
|
+
"format": {
|
|
5909
|
+
"type": "string",
|
|
5910
|
+
"description": "Overrides the time channel's format."
|
|
5911
|
+
},
|
|
5912
|
+
"position": {
|
|
5913
|
+
"$ref": "#/definitions/PlaybackPeriodPosition",
|
|
5914
|
+
"description": "Where the label sits. Defaults to `auto`: centered for point charts, upper right for bars, and the corner that covers the least geography on maps."
|
|
5915
|
+
}
|
|
5916
|
+
},
|
|
5917
|
+
"additionalProperties": false
|
|
5918
|
+
}
|
|
5919
|
+
],
|
|
5920
|
+
"description": "Large period label. On by default with automatic placement and the time channel's format. Set false to hide it."
|
|
5921
|
+
},
|
|
5922
|
+
"labels": {
|
|
5923
|
+
"type": "array",
|
|
5924
|
+
"items": {
|
|
5925
|
+
"type": "string"
|
|
5926
|
+
},
|
|
5927
|
+
"description": "Point marks only: keys whose name is drawn next to the mark for the whole run."
|
|
5928
|
+
},
|
|
5929
|
+
"trails": {
|
|
5930
|
+
"anyOf": [
|
|
5931
|
+
{
|
|
5932
|
+
"type": "boolean"
|
|
5933
|
+
},
|
|
5934
|
+
{
|
|
5935
|
+
"type": "array",
|
|
5936
|
+
"items": {
|
|
5937
|
+
"type": "string"
|
|
5938
|
+
}
|
|
5939
|
+
}
|
|
5940
|
+
],
|
|
5941
|
+
"description": "Point marks only: draw past positions as a trail. `true` is every key; an array names keys. Defaults to false."
|
|
5942
|
+
}
|
|
5943
|
+
},
|
|
5944
|
+
"additionalProperties": false,
|
|
5945
|
+
"description": "Playback options for charts and maps with a `time` channel. Fields shared with the race's `race` block have the same names, types and defaults."
|
|
5946
|
+
},
|
|
5947
|
+
"PlaybackPeriodPosition": {
|
|
5948
|
+
"type": "string",
|
|
5949
|
+
"enum": [
|
|
5950
|
+
"auto",
|
|
5951
|
+
"center",
|
|
5952
|
+
"top-right",
|
|
5953
|
+
"bottom-left"
|
|
5954
|
+
],
|
|
5955
|
+
"description": "Placement of the large faint period label behind a playback chart."
|
|
5956
|
+
},
|
|
5851
5957
|
"ArcEncoding<DataRow>": {
|
|
5852
5958
|
"type": "object",
|
|
5853
5959
|
"properties": {
|
|
@@ -6205,6 +6311,10 @@
|
|
|
6205
6311
|
"column": {
|
|
6206
6312
|
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
6207
6313
|
"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`."
|
|
6314
|
+
},
|
|
6315
|
+
"time": {
|
|
6316
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6317
|
+
"description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
|
|
6208
6318
|
}
|
|
6209
6319
|
},
|
|
6210
6320
|
"required": [
|
|
@@ -6474,6 +6584,10 @@
|
|
|
6474
6584
|
"column": {
|
|
6475
6585
|
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
6476
6586
|
"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`."
|
|
6587
|
+
},
|
|
6588
|
+
"time": {
|
|
6589
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6590
|
+
"description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
|
|
6477
6591
|
}
|
|
6478
6592
|
},
|
|
6479
6593
|
"required": [
|
|
@@ -6597,6 +6711,10 @@
|
|
|
6597
6711
|
"column": {
|
|
6598
6712
|
"$ref": "#/definitions/FacetChannel%3CDataRow%3E",
|
|
6599
6713
|
"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`."
|
|
6714
|
+
},
|
|
6715
|
+
"time": {
|
|
6716
|
+
"$ref": "#/definitions/EncodingChannel%3CDataRow%3E",
|
|
6717
|
+
"description": "Playback field. Each distinct value is one period, and the chart animates through them with the shared `playback` controls. Temporal and quantitative periods sort by value; ordinal periods follow `sort` or first-seen order."
|
|
6600
6718
|
}
|
|
6601
6719
|
},
|
|
6602
6720
|
"required": [
|
|
@@ -8261,6 +8379,10 @@
|
|
|
8261
8379
|
"zIndex": {
|
|
8262
8380
|
"type": "number",
|
|
8263
8381
|
"description": "Render order within a LayerSpec. Higher values render on top. When omitted, layers render in array order (later layers paint on top). Axis assignment (left/right y) is always determined by array position, not zIndex."
|
|
8382
|
+
},
|
|
8383
|
+
"playback": {
|
|
8384
|
+
"$ref": "#/definitions/PlaybackConfig",
|
|
8385
|
+
"description": "Playback timing, controls and period label for a chart with `encoding.time` (point, circle and bar marks). Ignored with a warning when the chart has no time channel."
|
|
8264
8386
|
}
|
|
8265
8387
|
}
|
|
8266
8388
|
}
|