@opendata-ai/openchart-core 8.8.0 → 8.9.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 +142 -2
- package/dist/index.js +101 -0
- 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 +116 -0
- package/schema/table.schema.json +117 -0
- package/schema/vizspec.schema.json +265 -0
package/package.json
CHANGED
package/schema/chart.schema.json
CHANGED
|
@@ -7386,6 +7386,67 @@
|
|
|
7386
7386
|
"additionalProperties": false,
|
|
7387
7387
|
"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."
|
|
7388
7388
|
},
|
|
7389
|
+
"FieldMetadata": {
|
|
7390
|
+
"type": "object",
|
|
7391
|
+
"properties": {
|
|
7392
|
+
"type": {
|
|
7393
|
+
"type": "string",
|
|
7394
|
+
"enum": [
|
|
7395
|
+
"text",
|
|
7396
|
+
"number",
|
|
7397
|
+
"date"
|
|
7398
|
+
],
|
|
7399
|
+
"description": "Explicit imported field type; preserved with the portable document."
|
|
7400
|
+
},
|
|
7401
|
+
"role": {
|
|
7402
|
+
"type": "string",
|
|
7403
|
+
"const": "identity",
|
|
7404
|
+
"description": "Identifies an internal, persistent row identity column."
|
|
7405
|
+
},
|
|
7406
|
+
"label": {
|
|
7407
|
+
"type": "string"
|
|
7408
|
+
},
|
|
7409
|
+
"unit": {
|
|
7410
|
+
"type": "string"
|
|
7411
|
+
},
|
|
7412
|
+
"measure": {
|
|
7413
|
+
"type": "string"
|
|
7414
|
+
},
|
|
7415
|
+
"provenance": {
|
|
7416
|
+
"type": "string"
|
|
7417
|
+
},
|
|
7418
|
+
"representation": {
|
|
7419
|
+
"type": "string",
|
|
7420
|
+
"enum": [
|
|
7421
|
+
"number",
|
|
7422
|
+
"percent",
|
|
7423
|
+
"proportion"
|
|
7424
|
+
],
|
|
7425
|
+
"description": "Percent is encoded 0–100; proportion is encoded 0–1."
|
|
7426
|
+
},
|
|
7427
|
+
"interval": {
|
|
7428
|
+
"type": "object",
|
|
7429
|
+
"properties": {
|
|
7430
|
+
"lower": {
|
|
7431
|
+
"type": "string"
|
|
7432
|
+
},
|
|
7433
|
+
"upper": {
|
|
7434
|
+
"type": "string"
|
|
7435
|
+
}
|
|
7436
|
+
},
|
|
7437
|
+
"required": [
|
|
7438
|
+
"lower",
|
|
7439
|
+
"upper"
|
|
7440
|
+
],
|
|
7441
|
+
"additionalProperties": false
|
|
7442
|
+
},
|
|
7443
|
+
"statusField": {
|
|
7444
|
+
"type": "string"
|
|
7445
|
+
}
|
|
7446
|
+
},
|
|
7447
|
+
"additionalProperties": false,
|
|
7448
|
+
"description": "Supplied semantics; the library never invents a measure or uncertainty."
|
|
7449
|
+
},
|
|
7389
7450
|
"DataRow": {
|
|
7390
7451
|
"type": "object",
|
|
7391
7452
|
"additionalProperties": {},
|
|
@@ -8541,6 +8602,14 @@
|
|
|
8541
8602
|
"ResponsiveConfig": {
|
|
8542
8603
|
"type": "object",
|
|
8543
8604
|
"properties": {
|
|
8605
|
+
"preserveEnd": {
|
|
8606
|
+
"type": "boolean",
|
|
8607
|
+
"description": "Preserve the final temporal boundary before thinning interior ticks."
|
|
8608
|
+
},
|
|
8609
|
+
"labelSummary": {
|
|
8610
|
+
"type": "boolean",
|
|
8611
|
+
"description": "Move direct series labels into a keyed list when the inline column cannot fit."
|
|
8612
|
+
},
|
|
8544
8613
|
"autoThin": {
|
|
8545
8614
|
"type": "boolean",
|
|
8546
8615
|
"description": "Automatic annotation thinning at narrow widths. When true (default), annotations that can't be placed without overlap are demoted to numbered dot markers with footnote text below the chart. Set false to restore the pre-auto-thinning behavior (annotations hidden at compact breakpoints)."
|
|
@@ -8995,15 +9064,31 @@
|
|
|
8995
9064
|
{
|
|
8996
9065
|
"type": "boolean"
|
|
8997
9066
|
},
|
|
9067
|
+
{
|
|
9068
|
+
"$ref": "#/definitions/AnimationPreset"
|
|
9069
|
+
},
|
|
8998
9070
|
{
|
|
8999
9071
|
"$ref": "#/definitions/AnimationConfig"
|
|
9000
9072
|
}
|
|
9001
9073
|
],
|
|
9002
9074
|
"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"
|
|
9003
9075
|
},
|
|
9076
|
+
"AnimationPreset": {
|
|
9077
|
+
"type": "string",
|
|
9078
|
+
"enum": [
|
|
9079
|
+
"fluid",
|
|
9080
|
+
"subtle",
|
|
9081
|
+
"legacy"
|
|
9082
|
+
],
|
|
9083
|
+
"description": "Opt-in motion language. `legacy` preserves the v8 tween timing."
|
|
9084
|
+
},
|
|
9004
9085
|
"AnimationConfig": {
|
|
9005
9086
|
"type": "object",
|
|
9006
9087
|
"properties": {
|
|
9088
|
+
"preset": {
|
|
9089
|
+
"$ref": "#/definitions/AnimationPreset",
|
|
9090
|
+
"description": "Base preset; explicit phase settings take precedence."
|
|
9091
|
+
},
|
|
9007
9092
|
"enter": {
|
|
9008
9093
|
"anyOf": [
|
|
9009
9094
|
{
|
|
@@ -9048,6 +9133,10 @@
|
|
|
9048
9133
|
"AnimationPhaseConfig": {
|
|
9049
9134
|
"type": "object",
|
|
9050
9135
|
"properties": {
|
|
9136
|
+
"spring": {
|
|
9137
|
+
"$ref": "#/definitions/SpringConfig",
|
|
9138
|
+
"description": "Spring mode. Cannot be combined with duration or ease in this phase."
|
|
9139
|
+
},
|
|
9051
9140
|
"duration": {
|
|
9052
9141
|
"type": "number",
|
|
9053
9142
|
"description": "Duration in ms. Default: 500 for enter."
|
|
@@ -9071,6 +9160,22 @@
|
|
|
9071
9160
|
"additionalProperties": false,
|
|
9072
9161
|
"description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
|
|
9073
9162
|
},
|
|
9163
|
+
"SpringConfig": {
|
|
9164
|
+
"type": "object",
|
|
9165
|
+
"properties": {
|
|
9166
|
+
"stiffness": {
|
|
9167
|
+
"type": "number"
|
|
9168
|
+
},
|
|
9169
|
+
"damping": {
|
|
9170
|
+
"type": "number"
|
|
9171
|
+
},
|
|
9172
|
+
"mass": {
|
|
9173
|
+
"type": "number"
|
|
9174
|
+
}
|
|
9175
|
+
},
|
|
9176
|
+
"additionalProperties": false,
|
|
9177
|
+
"description": "Physical spring parameters. Quantitative motion is bounded at critical damping."
|
|
9178
|
+
},
|
|
9074
9179
|
"AnimationEase": {
|
|
9075
9180
|
"type": "string",
|
|
9076
9181
|
"enum": [
|
|
@@ -9102,6 +9207,10 @@
|
|
|
9102
9207
|
"UpdatePhaseConfig": {
|
|
9103
9208
|
"type": "object",
|
|
9104
9209
|
"properties": {
|
|
9210
|
+
"spring": {
|
|
9211
|
+
"$ref": "#/definitions/SpringConfig",
|
|
9212
|
+
"description": "Spring mode. Cannot be combined with duration or ease in this phase."
|
|
9213
|
+
},
|
|
9105
9214
|
"duration": {
|
|
9106
9215
|
"type": "number",
|
|
9107
9216
|
"description": "Duration in ms. Default: 500 for enter."
|
|
@@ -11261,6 +11370,13 @@
|
|
|
11261
11370
|
"encoding": {
|
|
11262
11371
|
"description": "Encoding channel map."
|
|
11263
11372
|
},
|
|
11373
|
+
"fields": {
|
|
11374
|
+
"type": "object",
|
|
11375
|
+
"additionalProperties": {
|
|
11376
|
+
"$ref": "#/definitions/FieldMetadata"
|
|
11377
|
+
},
|
|
11378
|
+
"description": "Optional authored measure, unit, provenance, and supplied interval metadata."
|
|
11379
|
+
},
|
|
11264
11380
|
"data": {
|
|
11265
11381
|
"type": "array",
|
|
11266
11382
|
"items": {
|
package/schema/table.schema.json
CHANGED
|
@@ -9,6 +9,22 @@
|
|
|
9
9
|
"TableSpec": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"properties": {
|
|
12
|
+
"mobileLayout": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"cards",
|
|
16
|
+
"priority",
|
|
17
|
+
"scroll"
|
|
18
|
+
],
|
|
19
|
+
"description": "Compact layout. v8 defaults to cards; priority retains comparable columns with expandable details."
|
|
20
|
+
},
|
|
21
|
+
"fields": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": {
|
|
24
|
+
"$ref": "#/definitions/FieldMetadata"
|
|
25
|
+
},
|
|
26
|
+
"description": "Optional authored measure, unit, provenance, and supplied interval metadata."
|
|
27
|
+
},
|
|
12
28
|
"type": {
|
|
13
29
|
"type": "string",
|
|
14
30
|
"const": "table",
|
|
@@ -126,6 +142,67 @@
|
|
|
126
142
|
"additionalProperties": false,
|
|
127
143
|
"description": "Table specification: input for data table visualizations.\n\nTables are a visualization type, not just an HTML grid. They support heatmap coloring, inline sparklines, sorted columns, search, and pagination."
|
|
128
144
|
},
|
|
145
|
+
"FieldMetadata": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {
|
|
148
|
+
"type": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"enum": [
|
|
151
|
+
"text",
|
|
152
|
+
"number",
|
|
153
|
+
"date"
|
|
154
|
+
],
|
|
155
|
+
"description": "Explicit imported field type; preserved with the portable document."
|
|
156
|
+
},
|
|
157
|
+
"role": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"const": "identity",
|
|
160
|
+
"description": "Identifies an internal, persistent row identity column."
|
|
161
|
+
},
|
|
162
|
+
"label": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"unit": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"measure": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"provenance": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"representation": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"enum": [
|
|
177
|
+
"number",
|
|
178
|
+
"percent",
|
|
179
|
+
"proportion"
|
|
180
|
+
],
|
|
181
|
+
"description": "Percent is encoded 0–100; proportion is encoded 0–1."
|
|
182
|
+
},
|
|
183
|
+
"interval": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": {
|
|
186
|
+
"lower": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"upper": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": [
|
|
194
|
+
"lower",
|
|
195
|
+
"upper"
|
|
196
|
+
],
|
|
197
|
+
"additionalProperties": false
|
|
198
|
+
},
|
|
199
|
+
"statusField": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"description": "Supplied semantics; the library never invents a measure or uncertainty."
|
|
205
|
+
},
|
|
129
206
|
"DataRow": {
|
|
130
207
|
"type": "object",
|
|
131
208
|
"additionalProperties": {},
|
|
@@ -919,15 +996,31 @@
|
|
|
919
996
|
{
|
|
920
997
|
"type": "boolean"
|
|
921
998
|
},
|
|
999
|
+
{
|
|
1000
|
+
"$ref": "#/definitions/AnimationPreset"
|
|
1001
|
+
},
|
|
922
1002
|
{
|
|
923
1003
|
"$ref": "#/definitions/AnimationConfig"
|
|
924
1004
|
}
|
|
925
1005
|
],
|
|
926
1006
|
"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"
|
|
927
1007
|
},
|
|
1008
|
+
"AnimationPreset": {
|
|
1009
|
+
"type": "string",
|
|
1010
|
+
"enum": [
|
|
1011
|
+
"fluid",
|
|
1012
|
+
"subtle",
|
|
1013
|
+
"legacy"
|
|
1014
|
+
],
|
|
1015
|
+
"description": "Opt-in motion language. `legacy` preserves the v8 tween timing."
|
|
1016
|
+
},
|
|
928
1017
|
"AnimationConfig": {
|
|
929
1018
|
"type": "object",
|
|
930
1019
|
"properties": {
|
|
1020
|
+
"preset": {
|
|
1021
|
+
"$ref": "#/definitions/AnimationPreset",
|
|
1022
|
+
"description": "Base preset; explicit phase settings take precedence."
|
|
1023
|
+
},
|
|
931
1024
|
"enter": {
|
|
932
1025
|
"anyOf": [
|
|
933
1026
|
{
|
|
@@ -972,6 +1065,10 @@
|
|
|
972
1065
|
"AnimationPhaseConfig": {
|
|
973
1066
|
"type": "object",
|
|
974
1067
|
"properties": {
|
|
1068
|
+
"spring": {
|
|
1069
|
+
"$ref": "#/definitions/SpringConfig",
|
|
1070
|
+
"description": "Spring mode. Cannot be combined with duration or ease in this phase."
|
|
1071
|
+
},
|
|
975
1072
|
"duration": {
|
|
976
1073
|
"type": "number",
|
|
977
1074
|
"description": "Duration in ms. Default: 500 for enter."
|
|
@@ -995,6 +1092,22 @@
|
|
|
995
1092
|
"additionalProperties": false,
|
|
996
1093
|
"description": "Animation phase config. Follows Vega's enter/update/exit model. Each phase can be true (use defaults) or a config object."
|
|
997
1094
|
},
|
|
1095
|
+
"SpringConfig": {
|
|
1096
|
+
"type": "object",
|
|
1097
|
+
"properties": {
|
|
1098
|
+
"stiffness": {
|
|
1099
|
+
"type": "number"
|
|
1100
|
+
},
|
|
1101
|
+
"damping": {
|
|
1102
|
+
"type": "number"
|
|
1103
|
+
},
|
|
1104
|
+
"mass": {
|
|
1105
|
+
"type": "number"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
"additionalProperties": false,
|
|
1109
|
+
"description": "Physical spring parameters. Quantitative motion is bounded at critical damping."
|
|
1110
|
+
},
|
|
998
1111
|
"AnimationEase": {
|
|
999
1112
|
"type": "string",
|
|
1000
1113
|
"enum": [
|
|
@@ -1026,6 +1139,10 @@
|
|
|
1026
1139
|
"UpdatePhaseConfig": {
|
|
1027
1140
|
"type": "object",
|
|
1028
1141
|
"properties": {
|
|
1142
|
+
"spring": {
|
|
1143
|
+
"$ref": "#/definitions/SpringConfig",
|
|
1144
|
+
"description": "Spring mode. Cannot be combined with duration or ease in this phase."
|
|
1145
|
+
},
|
|
1029
1146
|
"duration": {
|
|
1030
1147
|
"type": "number",
|
|
1031
1148
|
"description": "Duration in ms. Default: 500 for enter."
|