@opendata-ai/openchart-core 8.0.0-rc.12 → 8.0.0-rc.13
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 +135 -2
- 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/vizspec.schema.json +249 -1
|
@@ -16831,6 +16831,34 @@
|
|
|
16831
16831
|
"$ref": "#/definitions/DarkMode",
|
|
16832
16832
|
"description": "Dark mode behavior."
|
|
16833
16833
|
},
|
|
16834
|
+
"animation": {
|
|
16835
|
+
"$ref": "#/definitions/GraphAnimationSpec",
|
|
16836
|
+
"description": "Motion configuration. DEFAULT-ON: omit for full defaults, `false` to opt out of choreography (layout warmup still applies)."
|
|
16837
|
+
},
|
|
16838
|
+
"interaction": {
|
|
16839
|
+
"$ref": "#/definitions/GraphInteractionConfig",
|
|
16840
|
+
"description": "Interaction behavior (hover mode, select-fly, opt-in physics)."
|
|
16841
|
+
},
|
|
16842
|
+
"legend": {
|
|
16843
|
+
"anyOf": [
|
|
16844
|
+
{
|
|
16845
|
+
"type": "boolean"
|
|
16846
|
+
},
|
|
16847
|
+
{
|
|
16848
|
+
"type": "object",
|
|
16849
|
+
"properties": {
|
|
16850
|
+
"interactive": {
|
|
16851
|
+
"type": "boolean"
|
|
16852
|
+
},
|
|
16853
|
+
"counts": {
|
|
16854
|
+
"type": "boolean"
|
|
16855
|
+
}
|
|
16856
|
+
},
|
|
16857
|
+
"additionalProperties": false
|
|
16858
|
+
}
|
|
16859
|
+
],
|
|
16860
|
+
"description": "Built-in legend. Interactive by default. Set `false` if you render your own legend, so the built-in filter UI doesn't compete with it."
|
|
16861
|
+
},
|
|
16834
16862
|
"watermark": {
|
|
16835
16863
|
"type": "boolean",
|
|
16836
16864
|
"description": "Whether to show the tryOpenData.ai watermark. Defaults to true."
|
|
@@ -16889,7 +16917,11 @@
|
|
|
16889
16917
|
},
|
|
16890
16918
|
"nodeSize": {
|
|
16891
16919
|
"$ref": "#/definitions/GraphEncodingChannel",
|
|
16892
|
-
"description": "Size mapping for nodes."
|
|
16920
|
+
"description": "Size mapping for nodes. `scale.type` defaults to `'sqrt'` (area-perceptual, today's behavior); set `scale.type: 'linear'` for a linear radius ramp. `scale.range` sets the pixel radius extent (default `[3, 12]`)."
|
|
16921
|
+
},
|
|
16922
|
+
"nodeOpacity": {
|
|
16923
|
+
"$ref": "#/definitions/GraphEncodingChannel",
|
|
16924
|
+
"description": "Opacity mapping for nodes (VL opacity channel). Quantitative fields map linearly to `[0.25, 1]`; `scale.range` overrides.\n\nNOTE: there is deliberately no `edgeOpacity` channel — edge alpha is owned by the interaction alpha-tier machinery (hover dimming, search)."
|
|
16893
16925
|
},
|
|
16894
16926
|
"edgeColor": {
|
|
16895
16927
|
"$ref": "#/definitions/GraphEncodingChannel",
|
|
@@ -16925,6 +16957,42 @@
|
|
|
16925
16957
|
"scale": {
|
|
16926
16958
|
"$ref": "#/definitions/ScaleConfig",
|
|
16927
16959
|
"description": "Scale configuration. Auto-derived from data if omitted."
|
|
16960
|
+
},
|
|
16961
|
+
"sort": {
|
|
16962
|
+
"anyOf": [
|
|
16963
|
+
{
|
|
16964
|
+
"type": "string",
|
|
16965
|
+
"const": "ascending"
|
|
16966
|
+
},
|
|
16967
|
+
{
|
|
16968
|
+
"type": "string",
|
|
16969
|
+
"const": "descending"
|
|
16970
|
+
},
|
|
16971
|
+
{
|
|
16972
|
+
"type": "null"
|
|
16973
|
+
},
|
|
16974
|
+
{
|
|
16975
|
+
"type": "array",
|
|
16976
|
+
"items": {
|
|
16977
|
+
"type": "string"
|
|
16978
|
+
}
|
|
16979
|
+
}
|
|
16980
|
+
],
|
|
16981
|
+
"description": "Category ordering for the color domain and legend. Graph channels default `'ascending'` (VL-aligned, deterministic); `string[]` pins an explicit order; `null` keeps data order.\n\nNOTE: chart encoding channels keep data-order — this graph default is a deliberate divergence this release (see docs/migrating-v8.md)."
|
|
16982
|
+
},
|
|
16983
|
+
"highlight": {
|
|
16984
|
+
"anyOf": [
|
|
16985
|
+
{
|
|
16986
|
+
"type": "string"
|
|
16987
|
+
},
|
|
16988
|
+
{
|
|
16989
|
+
"type": "array",
|
|
16990
|
+
"items": {
|
|
16991
|
+
"type": "string"
|
|
16992
|
+
}
|
|
16993
|
+
}
|
|
16994
|
+
],
|
|
16995
|
+
"description": "Category values to emphasize on load; the rest dim. Mirrors the chart `encoding.color.highlight` value list. Distinct from the `highlight()` runtime verb and `interaction.hover.mode`."
|
|
16928
16996
|
}
|
|
16929
16997
|
},
|
|
16930
16998
|
"required": [
|
|
@@ -16978,6 +17046,35 @@
|
|
|
16978
17046
|
"centerForce": {
|
|
16979
17047
|
"type": "boolean",
|
|
16980
17048
|
"description": "Whether to apply center force (default true)."
|
|
17049
|
+
},
|
|
17050
|
+
"seed": {
|
|
17051
|
+
"type": "number",
|
|
17052
|
+
"description": "Deterministic layout seed. Same spec + seed ⇒ identical settled layout within a given execution path (worker vs sync parity is not guaranteed)."
|
|
17053
|
+
},
|
|
17054
|
+
"energy": {
|
|
17055
|
+
"type": "string",
|
|
17056
|
+
"enum": [
|
|
17057
|
+
"gentle",
|
|
17058
|
+
"balanced",
|
|
17059
|
+
"energetic"
|
|
17060
|
+
],
|
|
17061
|
+
"description": "Repulsion preset (plain-language, no d3 jargon): `gentle`/`balanced`/`energetic` → chargeStrength −150/−300/−600 and velocityDecay 0.5/0.4/0.3. A raw `chargeStrength` wins over the preset."
|
|
17062
|
+
},
|
|
17063
|
+
"settle": {
|
|
17064
|
+
"type": "string",
|
|
17065
|
+
"enum": [
|
|
17066
|
+
"quick",
|
|
17067
|
+
"balanced",
|
|
17068
|
+
"thorough"
|
|
17069
|
+
],
|
|
17070
|
+
"description": "Settle-speed preset: `quick`/`balanced`/`thorough` → alphaDecay 0.05/0.0228/0.01. Higher = faster cool-down, less final refinement."
|
|
17071
|
+
},
|
|
17072
|
+
"warmup": {
|
|
17073
|
+
"type": [
|
|
17074
|
+
"boolean",
|
|
17075
|
+
"number"
|
|
17076
|
+
],
|
|
17077
|
+
"description": "Headless settle ticks run before the first paint. `true` → 100 ticks under a 250ms budget; a number sets an explicit tick count; `false` disables.\n\nLives in `layout`, NOT `animation`, on purpose: warmup *reduces* motion, so it must survive `animation: false` (opt-out consumers get less settling chaos, not more)."
|
|
16981
17078
|
}
|
|
16982
17079
|
},
|
|
16983
17080
|
"required": [
|
|
@@ -17013,6 +17110,157 @@
|
|
|
17013
17110
|
"additionalProperties": false,
|
|
17014
17111
|
"description": "Per-node visual overrides, keyed by node id."
|
|
17015
17112
|
},
|
|
17113
|
+
"GraphAnimationSpec": {
|
|
17114
|
+
"anyOf": [
|
|
17115
|
+
{
|
|
17116
|
+
"type": "boolean"
|
|
17117
|
+
},
|
|
17118
|
+
{
|
|
17119
|
+
"$ref": "#/definitions/GraphAnimationConfig"
|
|
17120
|
+
}
|
|
17121
|
+
],
|
|
17122
|
+
"description": "Graph motion spec.\n- omitted → full defaults (default-ON)\n- `false` → no choreography (warmup still applies)\n- object → per-phase control\n\n`prefers-reduced-motion` is always respected regardless of this value."
|
|
17123
|
+
},
|
|
17124
|
+
"GraphAnimationConfig": {
|
|
17125
|
+
"type": "object",
|
|
17126
|
+
"properties": {
|
|
17127
|
+
"enter": {
|
|
17128
|
+
"anyOf": [
|
|
17129
|
+
{
|
|
17130
|
+
"$ref": "#/definitions/AnimationPhaseConfig"
|
|
17131
|
+
},
|
|
17132
|
+
{
|
|
17133
|
+
"type": "boolean"
|
|
17134
|
+
}
|
|
17135
|
+
],
|
|
17136
|
+
"description": "Node/edge reveal on first render. Default `{ duration: 600, ease: 'smooth', stagger: true }`."
|
|
17137
|
+
},
|
|
17138
|
+
"update": {
|
|
17139
|
+
"anyOf": [
|
|
17140
|
+
{
|
|
17141
|
+
"$ref": "#/definitions/AnimationPhaseConfig"
|
|
17142
|
+
},
|
|
17143
|
+
{
|
|
17144
|
+
"type": "boolean"
|
|
17145
|
+
}
|
|
17146
|
+
],
|
|
17147
|
+
"description": "Data-update enter-fade for newly added marks. Default `{ duration: 300, ease: 'smooth' }`."
|
|
17148
|
+
},
|
|
17149
|
+
"exit": {
|
|
17150
|
+
"anyOf": [
|
|
17151
|
+
{
|
|
17152
|
+
"$ref": "#/definitions/AnimationPhaseConfig"
|
|
17153
|
+
},
|
|
17154
|
+
{
|
|
17155
|
+
"type": "boolean"
|
|
17156
|
+
}
|
|
17157
|
+
],
|
|
17158
|
+
"description": "Ghost fade-out for removed marks. Default `{ duration: 300, ease: 'smooth' }`."
|
|
17159
|
+
},
|
|
17160
|
+
"camera": {
|
|
17161
|
+
"anyOf": [
|
|
17162
|
+
{
|
|
17163
|
+
"type": "object",
|
|
17164
|
+
"properties": {
|
|
17165
|
+
"duration": {
|
|
17166
|
+
"type": "number"
|
|
17167
|
+
},
|
|
17168
|
+
"ease": {
|
|
17169
|
+
"$ref": "#/definitions/AnimationEase"
|
|
17170
|
+
}
|
|
17171
|
+
},
|
|
17172
|
+
"additionalProperties": false
|
|
17173
|
+
},
|
|
17174
|
+
{
|
|
17175
|
+
"type": "boolean"
|
|
17176
|
+
}
|
|
17177
|
+
],
|
|
17178
|
+
"description": "Camera flight easing. Default duration `'auto'` (derived from the zoom distance)."
|
|
17179
|
+
},
|
|
17180
|
+
"hover": {
|
|
17181
|
+
"anyOf": [
|
|
17182
|
+
{
|
|
17183
|
+
"type": "object",
|
|
17184
|
+
"properties": {
|
|
17185
|
+
"duration": {
|
|
17186
|
+
"type": "number"
|
|
17187
|
+
},
|
|
17188
|
+
"ease": {
|
|
17189
|
+
"$ref": "#/definitions/AnimationEase"
|
|
17190
|
+
}
|
|
17191
|
+
},
|
|
17192
|
+
"additionalProperties": false
|
|
17193
|
+
},
|
|
17194
|
+
{
|
|
17195
|
+
"type": "boolean"
|
|
17196
|
+
}
|
|
17197
|
+
],
|
|
17198
|
+
"description": "Hover emphasis crossfade. Default `{ duration: 150, ease: 'smooth' }`."
|
|
17199
|
+
}
|
|
17200
|
+
},
|
|
17201
|
+
"additionalProperties": false,
|
|
17202
|
+
"description": "Per-phase and per-behavior motion config for a graph.\n\nDEFAULT-ON semantics (deliberately different from charts, which are opt-in): omit `animation` → the resolver returns full defaults; `animation: false` → no choreography (but `layout.warmup` still applies); a per-phase `false` disables just that phase. Graphs are default-on because physics motion already exists on load and choreography reduces the chaos."
|
|
17203
|
+
},
|
|
17204
|
+
"GraphInteractionConfig": {
|
|
17205
|
+
"type": "object",
|
|
17206
|
+
"properties": {
|
|
17207
|
+
"hover": {
|
|
17208
|
+
"type": "object",
|
|
17209
|
+
"properties": {
|
|
17210
|
+
"mode": {
|
|
17211
|
+
"type": "string",
|
|
17212
|
+
"enum": [
|
|
17213
|
+
"neighbors",
|
|
17214
|
+
"category",
|
|
17215
|
+
"node",
|
|
17216
|
+
"none"
|
|
17217
|
+
]
|
|
17218
|
+
},
|
|
17219
|
+
"dimOpacity": {
|
|
17220
|
+
"type": "number"
|
|
17221
|
+
}
|
|
17222
|
+
},
|
|
17223
|
+
"additionalProperties": false,
|
|
17224
|
+
"description": "Hover emphasis behavior. `neighbors` (default) lights the hovered node and its adjacency; `category` lights same-category nodes; `node` lights only the hovered node; `none` disables. `dimOpacity` (default 0.15) is the node dim tier. Named `mode` (not `highlight`) to avoid colliding with the three other meanings of \"highlight\" (the encoding value list, the `highlight()` verb)."
|
|
17225
|
+
},
|
|
17226
|
+
"select": {
|
|
17227
|
+
"type": "object",
|
|
17228
|
+
"properties": {
|
|
17229
|
+
"flyTo": {
|
|
17230
|
+
"type": "boolean"
|
|
17231
|
+
}
|
|
17232
|
+
},
|
|
17233
|
+
"additionalProperties": false,
|
|
17234
|
+
"description": "Selecting a node flies the camera to it. Default `false`."
|
|
17235
|
+
},
|
|
17236
|
+
"cursorRepulsion": {
|
|
17237
|
+
"anyOf": [
|
|
17238
|
+
{
|
|
17239
|
+
"type": "boolean"
|
|
17240
|
+
},
|
|
17241
|
+
{
|
|
17242
|
+
"type": "object",
|
|
17243
|
+
"properties": {
|
|
17244
|
+
"radius": {
|
|
17245
|
+
"type": "number"
|
|
17246
|
+
},
|
|
17247
|
+
"strength": {
|
|
17248
|
+
"type": "number"
|
|
17249
|
+
}
|
|
17250
|
+
},
|
|
17251
|
+
"additionalProperties": false
|
|
17252
|
+
}
|
|
17253
|
+
],
|
|
17254
|
+
"description": "Opt-in cursor repulsion (nodes drift away from the pointer). Disabled under `prefers-reduced-motion` and above the node-count gate."
|
|
17255
|
+
},
|
|
17256
|
+
"springyDrag": {
|
|
17257
|
+
"type": "boolean",
|
|
17258
|
+
"description": "Opt-in springy node drag (user-initiated; no reduced-motion gate)."
|
|
17259
|
+
}
|
|
17260
|
+
},
|
|
17261
|
+
"additionalProperties": false,
|
|
17262
|
+
"description": "Interaction behavior for a graph (hover mode, select-fly, opt-in physics)."
|
|
17263
|
+
},
|
|
17016
17264
|
"SankeySpec": {
|
|
17017
17265
|
"type": "object",
|
|
17018
17266
|
"properties": {
|