ggaction 0.0.21 → 0.0.23
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/CHANGELOG.md +90 -0
- package/README.md +83 -90
- package/knowledge/action-card.schema.json +1 -1
- package/knowledge/action-cards.json +1 -1
- package/knowledge/intent-taxonomy.json +1 -1
- package/knowledge/mcp-resources.json +1 -1
- package/package.json +11 -4
- package/src/BasicChartProgram.js +1 -1
- package/src/accessibility.js +1 -0
- package/src/actions/boxPlots/components.js +1 -96
- package/src/actions/boxPlots/create.js +6 -1
- package/src/actions/boxPlots/edit.js +8 -0
- package/src/actions/boxPlots/materialize.js +3 -0
- package/src/actions/boxPlots/options.js +1 -1
- package/src/actions/canvas/actions.js +2 -1
- package/src/actions/canvas/index.js +3 -0
- package/src/actions/canvas/plotBorder.js +2 -1
- package/src/actions/canvas/plotOrder.js +14 -0
- package/src/actions/charts/area.js +1 -1
- package/src/actions/charts/bar.js +4 -4
- package/src/actions/charts/density.js +1 -1
- package/src/actions/charts/ecdf.js +1 -1
- package/src/actions/charts/endpoints.js +54 -5
- package/src/actions/charts/heatmap.js +1 -1
- package/src/actions/charts/histogram.js +1 -1
- package/src/actions/charts/horizon.js +1 -1
- package/src/actions/charts/index.js +2 -1
- package/src/actions/charts/interval-regression.js +3 -3
- package/src/actions/charts/line.js +1 -1
- package/src/actions/charts/radar.js +63 -3
- package/src/actions/charts/raincloud.js +37 -6
- package/src/actions/charts/rug-strip.js +2 -2
- package/src/actions/charts/scatter.js +3 -3
- package/src/actions/charts/text.js +1 -1
- package/src/actions/composition/actions.js +10 -3
- package/src/actions/coordinates/actions.js +2 -0
- package/src/actions/data/basic.js +6 -0
- package/src/actions/data/derived.js +6 -2
- package/src/actions/data/edit.js +22 -36
- package/src/actions/data/filter.js +1 -376
- package/src/actions/data/flatten.js +19 -0
- package/src/actions/data/index.js +6 -0
- package/src/actions/data/lookup.js +50 -0
- package/src/actions/data/raincloudFilter.js +56 -0
- package/src/actions/data/shared.js +10 -0
- package/src/actions/data/timeUnit.js +1 -1
- package/src/actions/distributions/revision.js +3 -1
- package/src/actions/encodings/angle.js +2 -1
- package/src/actions/encodings/appearance.js +38 -13
- package/src/actions/encodings/channels.js +14 -3
- package/src/actions/encodings/color/continuous.js +26 -10
- package/src/actions/encodings/color/index.js +50 -20
- package/src/actions/encodings/color/policy.js +57 -4
- package/src/actions/encodings/parallel.js +4 -0
- package/src/actions/encodings/position/policies/bar.js +10 -6
- package/src/actions/encodings/position/policies/line.js +1 -152
- package/src/actions/encodings/position/resolve.js +4 -1
- package/src/actions/encodings/ranged.js +46 -0
- package/src/actions/encodings/remove.js +1 -1
- package/src/actions/encodings/ruleAppearance.js +7 -6
- package/src/actions/encodings/shared.js +14 -2
- package/src/actions/encodings/stroke.js +20 -14
- package/src/actions/encodings/strokeDash.js +9 -11
- package/src/actions/encodings/text.js +30 -2
- package/src/actions/errorBars/edit.js +24 -4
- package/src/actions/facets/actions.js +1 -793
- package/src/actions/facets/derive.js +34 -5
- package/src/actions/facets/replay.js +1 -38
- package/src/actions/gradientPlots/components.js +21 -9
- package/src/actions/gradientPlots/create.js +4 -2
- package/src/actions/gradientPlots/edit.js +18 -1
- package/src/actions/gradientPlots/materialize.js +35 -36
- package/src/actions/gradientPlots/options.js +1 -1
- package/src/actions/gradientPlots/paint.js +13 -7
- package/src/actions/guides/applicability.js +2 -0
- package/src/actions/guides/axes/axes.js +39 -0
- package/src/actions/guides/axes/axis.js +9 -5
- package/src/actions/guides/axes/edit.js +11 -8
- package/src/actions/guides/axes/labels.js +24 -8
- package/src/actions/guides/axes/parallel/policy.js +3 -5
- package/src/actions/guides/axes/parallel/resolve.js +4 -3
- package/src/actions/guides/axes/policy.js +22 -0
- package/src/actions/guides/axes/tickGroups.js +4 -2
- package/src/actions/guides/axes/ticks.js +22 -4
- package/src/actions/guides/axes/titles.js +19 -6
- package/src/actions/guides/facadeAxes.js +3 -0
- package/src/actions/guides/grids/grid.js +3 -1
- package/src/actions/guides/grids/resolve.js +7 -11
- package/src/actions/guides/guides.js +21 -1
- package/src/actions/guides/legends/categorical/actions.js +1 -515
- package/src/actions/guides/legends/categorical/components.js +1 -4
- package/src/actions/guides/legends/categorical/layout.js +5 -2
- package/src/actions/guides/legends/categorical/options.js +4 -0
- package/src/actions/guides/legends/categorical/resolve.js +8 -3
- package/src/actions/guides/legends/categorical/symbols.js +3 -3
- package/src/actions/guides/legends/colorSize.js +2 -0
- package/src/actions/guides/legends/continuous/common.js +1 -1
- package/src/actions/guides/legends/continuous/gradient.js +1 -360
- package/src/actions/guides/legends/continuous/interval.js +1 -1
- package/src/actions/guides/legends/continuous/opacity.js +15 -1
- package/src/actions/guides/legends/edit.js +1 -1
- package/src/actions/guides/legends/focused.js +1 -1
- package/src/actions/guides/legends/lane.js +1 -1
- package/src/actions/guides/legends/sampling.js +1 -140
- package/src/actions/guides/legends/strokeWidth.js +3 -2
- package/src/actions/guides/legends/transition.js +19 -2
- package/src/actions/guides/polar/axes/facade.js +5 -4
- package/src/actions/guides/polar/axes/labels.js +5 -4
- package/src/actions/guides/polar/axes/titles.js +5 -4
- package/src/actions/guides/polar/resolve.js +2 -1
- package/src/actions/guides/tickValues.js +7 -7
- package/src/actions/marks/arc/actions.js +5 -7
- package/src/actions/marks/area/actions.js +9 -3
- package/src/actions/marks/bar/create.js +4 -2
- package/src/actions/marks/bar/edit.js +9 -6
- package/src/actions/marks/bar/materialize.js +5 -3
- package/src/actions/marks/dependentReferences.js +87 -0
- package/src/actions/marks/index.js +2 -0
- package/src/actions/marks/lifecycle.js +2 -1
- package/src/actions/marks/line/actions.js +24 -6
- package/src/actions/marks/line/materialize.js +7 -3
- package/src/actions/marks/point/create.js +5 -4
- package/src/actions/marks/point/edit.js +6 -3
- package/src/actions/marks/point/jitter.js +6 -6
- package/src/actions/marks/point/materialize.js +36 -39
- package/src/actions/marks/rect/actions.js +16 -4
- package/src/actions/marks/references.js +183 -35
- package/src/actions/marks/rule/actions.js +20 -9
- package/src/actions/marks/shared.js +2 -1
- package/src/actions/marks/text/actions.js +10 -3
- package/src/actions/marks/tick/actions.js +11 -2
- package/src/actions/primitives/editGraphics.js +28 -3
- package/src/actions/primitives/index.js +9 -0
- package/src/actions/primitives/semanticAction.js +13 -7
- package/src/actions/primitives/semanticValidation/layer.js +20 -0
- package/src/actions/primitives/semanticValidation/scale.js +8 -1
- package/src/actions/regression/create.js +6 -1
- package/src/actions/regression/edit.js +10 -1
- package/src/actions/scales/channels.js +1 -1
- package/src/actions/scales/consumers/common.js +19 -1
- package/src/actions/scales/consumers/families.js +2 -2
- package/src/actions/scales/consumers/seriesLayout.js +4 -3
- package/src/actions/scales/edit.js +11 -0
- package/src/actions/scales/editPolicy.js +5 -3
- package/src/actions/scales/preview.js +2 -1
- package/src/actions/scales/quantitativeColor.js +2 -4
- package/src/actions/selection/actions.js +10 -1
- package/src/actions/theme/reconcile.js +37 -9
- package/src/core/compositionState.js +26 -7
- package/src/core/datasetReferences.js +17 -0
- package/src/core/facetAxisPolicy.js +30 -0
- package/src/core/immutable.js +1 -0
- package/src/core/resourceReferences.js +5 -3
- package/src/core/validation.js +4 -0
- package/src/core/vocabulary.js +24 -2
- package/src/grammar/aggregate.js +1 -0
- package/src/grammar/arcs.js +1 -1
- package/src/grammar/areaSeries.js +1 -1
- package/src/grammar/axisTextPlacement.js +1 -1
- package/src/grammar/bars/policy.js +2 -2
- package/src/grammar/curveCommands.js +35 -2
- package/src/grammar/datasetDependencies.js +97 -0
- package/src/grammar/datasetSchema.js +32 -2
- package/src/grammar/facetHeaders.js +1 -0
- package/src/grammar/facets/dependencies.js +6 -2
- package/src/grammar/facets/guides.js +7 -5
- package/src/grammar/facets/legendIntent.js +6 -2
- package/src/grammar/facets/scales.js +27 -7
- package/src/grammar/flatten.js +85 -0
- package/src/grammar/histogram.js +13 -1
- package/src/grammar/horizon.js +1 -494
- package/src/grammar/jitter.js +2 -2
- package/src/grammar/legendSpacing.js +45 -0
- package/src/grammar/lineMissing.js +90 -0
- package/src/grammar/lineSeries.js +1 -376
- package/src/grammar/lookup.js +97 -0
- package/src/grammar/markFilter.js +4 -2
- package/src/grammar/markLabels.js +8 -3
- package/src/grammar/numeric.js +1 -1
- package/src/grammar/pathCommands.js +1 -1
- package/src/grammar/pathSeries.js +1 -109
- package/src/grammar/pointPolygon.js +81 -0
- package/src/grammar/pointShapes.js +15 -15
- package/src/grammar/rects.js +1 -1
- package/src/grammar/regression/derive.js +1 -195
- package/src/grammar/regression/parameters.js +7 -0
- package/src/grammar/scales/appearance.js +1 -1
- package/src/grammar/scales/color.js +1 -1
- package/src/grammar/scales/colorConsumers.js +1 -63
- package/src/grammar/scales/continuous.js +58 -1
- package/src/grammar/scales/definition.js +1 -1
- package/src/grammar/scales/ordinal.js +5 -2
- package/src/grammar/scales/policies.js +3 -3
- package/src/grammar/schemas/graphicBounds.js +40 -12
- package/src/grammar/schemas/graphicClip.js +23 -0
- package/src/grammar/schemas/graphicTree.js +16 -0
- package/src/grammar/statisticalReference.js +22 -0
- package/src/grammar/text.js +65 -1
- package/src/grammar/ticks.js +92 -1
- package/src/grammar/timeUnit.js +9 -3
- package/src/grammar/transformTopology.js +3 -1
- package/src/grammar/transforms.js +24 -0
- package/src/inspection.js +1 -495
- package/src/inspectionDescriptors.js +1 -1
- package/src/layout/canvas.js +1 -1
- package/src/layout/facetContentFlow.js +101 -0
- package/src/layout/facetHeaderTitles.js +1 -0
- package/src/layout/facetTopLane.js +29 -0
- package/src/layout/facets.js +1 -1
- package/src/layout/guideCollisions.js +9 -3
- package/src/layout/legendGroup.js +1 -1
- package/src/layout/legendItems.js +26 -10
- package/src/layout/legendSpacing.js +66 -0
- package/src/layout/plotDrawOrder.js +17 -0
- package/src/materialization/bars/histogram.js +8 -2
- package/src/materialization/bars/resolve.js +1 -1
- package/src/materialization/composition.js +1 -0
- package/src/materialization/compositionSnapshot.js +22 -2
- package/src/materialization/dataProvenance.js +1 -1
- package/src/materialization/facetContentBounds.js +96 -0
- package/src/materialization/facetGuides/layout.js +1 -1
- package/src/materialization/facetGuides/placement.js +39 -11
- package/src/materialization/facetGuides/preparation.js +43 -24
- package/src/materialization/facetHeaders.js +1 -1
- package/src/materialization/facetTopLane.js +25 -0
- package/src/materialization/facets.js +1 -1
- package/src/materialization/graphicHierarchy.js +30 -1
- package/src/materialization/graphicTranslation.js +2 -0
- package/src/materialization/guides/layout.js +1 -1
- package/src/materialization/guides/resources.js +1 -1
- package/src/materialization/legends.js +1 -1
- package/src/materialization/markClip.js +26 -0
- package/src/materialization/marks/capabilities.js +3 -2
- package/src/materialization/marks/grouping.js +7 -5
- package/src/materialization/marks/index.js +4 -2
- package/src/materialization/marks/policies.js +4 -0
- package/src/materialization/plotDrawOrder.js +44 -0
- package/src/materialization/rect.js +11 -3
- package/src/materialization/scaleGuideDependencies.js +13 -5
- package/src/materialization/selection/items/common.js +1 -1
- package/src/materialization/selection/items/path.js +1 -0
- package/src/materialization/selection/policies/index.js +2 -1
- package/src/materialization/text.js +10 -5
- package/src/mcp/cli.js +0 -0
- package/src/persistence/validation.js +114 -18
- package/src/persistence.js +4 -2
- package/src/renderers/canvas/index.js +16 -0
- package/src/renderers/canvas/isolated.js +11 -1
- package/src/renderers/canvas/native.js +7 -0
- package/src/renderers/canvas/scene.js +66 -0
- package/src/renderers/canvas/text.js +3 -2
- package/src/renderers/svg.js +1 -617
- package/src/renderers/svgSerialization.js +643 -0
- package/src/renderers/transitionScene.js +67 -0
- package/src/scene.js +89 -0
- package/src/selectors/axes.js +1 -1
- package/src/selectors/datasets.js +1 -0
- package/src/selectors/grids.js +9 -0
- package/src/selectors/markClip.js +28 -0
- package/src/selectors/raincloud.js +7 -0
- package/src/version.js +1 -1
- package/types/basic.d.ts +7 -0
- package/types/index.d.ts +8 -0
- package/types/program.d.ts +286 -70
- package/types/scene.d.ts +35 -0
package/types/program.d.ts
CHANGED
|
@@ -100,6 +100,7 @@ export type CurveInterpolation =
|
|
|
100
100
|
| "basis"
|
|
101
101
|
| "cardinal"
|
|
102
102
|
| "monotone"
|
|
103
|
+
| "monotone-steffen"
|
|
103
104
|
| "natural";
|
|
104
105
|
export type DashStyle = "solid" | "dashed" | "dotted" | "dashdot";
|
|
105
106
|
export type DashPattern = readonly number[];
|
|
@@ -108,7 +109,7 @@ export type JitterMaxOffset =
|
|
|
108
109
|
| { pixels?: never; band: number };
|
|
109
110
|
export interface JitterPointsOptions {
|
|
110
111
|
target?: string;
|
|
111
|
-
channel: "x" | "y";
|
|
112
|
+
channel: "x" | "y" | "both";
|
|
112
113
|
maxOffset: JitterMaxOffset;
|
|
113
114
|
seed?: string | number;
|
|
114
115
|
key?: string;
|
|
@@ -168,9 +169,12 @@ export interface EditCompositionLayoutOptions {
|
|
|
168
169
|
gap?: number;
|
|
169
170
|
align?: CompositionAlign;
|
|
170
171
|
padding?: number | CompositionPadding;
|
|
171
|
-
/** Interpret gap between child canvases (default) or
|
|
172
|
-
spacing?: "canvas" | "plot";
|
|
172
|
+
/** Interpret gap between child canvases (default), inner plots, or retained full content (wrapped facets). */
|
|
173
|
+
spacing?: "canvas" | "plot" | "content";
|
|
174
|
+
/** Share existing top margin with parent title and headers; requires plot spacing. Stacked restores the default. */
|
|
175
|
+
topLane?: FacetTopLaneMode;
|
|
173
176
|
}
|
|
177
|
+
export type FacetTopLaneMode = "stacked" | "shared";
|
|
174
178
|
export interface ReplaceCompositionChildOptions {
|
|
175
179
|
target: string;
|
|
176
180
|
program: ChartProgram;
|
|
@@ -210,12 +214,13 @@ interface StoredFacetLegendIntent {
|
|
|
210
214
|
readonly groups: Readonly<Record<string, unknown>>;
|
|
211
215
|
}
|
|
212
216
|
export interface FacetGuideOptions {
|
|
213
|
-
axes?: "each" | "outer";
|
|
217
|
+
axes?: "each" | "outer" | { x?: "each" | "outer"; y?: "each" | "outer" };
|
|
214
218
|
legend?: false | "shared" | LegendOptions;
|
|
215
219
|
}
|
|
216
220
|
export interface FacetOptions {
|
|
217
221
|
id?: string;
|
|
218
222
|
field: string;
|
|
223
|
+
/** Common row-preserving ancestor, or an explicit materialized fold ancestor of every layer. */
|
|
219
224
|
data?: string;
|
|
220
225
|
values?: readonly DatasetScalar[];
|
|
221
226
|
columns?: number;
|
|
@@ -225,8 +230,10 @@ export interface FacetOptions {
|
|
|
225
230
|
scales?: FacetScaleResolutions;
|
|
226
231
|
guides?: FacetGuideOptions;
|
|
227
232
|
headers?: FacetHeadersOptions;
|
|
228
|
-
/** Interpret gap between child canvases (default) or
|
|
229
|
-
spacing?: "canvas" | "plot";
|
|
233
|
+
/** Interpret gap between child canvases (default), inner plots, or retained full content (wrapped facets). */
|
|
234
|
+
spacing?: "canvas" | "plot" | "content";
|
|
235
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
236
|
+
topLane?: FacetTopLaneMode;
|
|
230
237
|
}
|
|
231
238
|
export interface FacetGridRole {
|
|
232
239
|
field: string;
|
|
@@ -244,8 +251,10 @@ export interface FacetGridOptions {
|
|
|
244
251
|
scales?: FacetScaleResolutions;
|
|
245
252
|
guides?: FacetGuideOptions;
|
|
246
253
|
headers?: FacetHeadersOptions;
|
|
247
|
-
/** Interpret gap between child canvases (default) or
|
|
254
|
+
/** Interpret gap between child canvases (default), inner plots, or retained full content (wrapped facets). */
|
|
248
255
|
spacing?: "canvas" | "plot";
|
|
256
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
257
|
+
topLane?: FacetTopLaneMode;
|
|
249
258
|
}
|
|
250
259
|
export interface RepeatChartsOptions {
|
|
251
260
|
id?: string;
|
|
@@ -259,22 +268,44 @@ export interface RepeatChartsOptions {
|
|
|
259
268
|
scales?: FacetScaleResolutions;
|
|
260
269
|
guides?: FacetGuideOptions;
|
|
261
270
|
headers?: FacetHeadersOptions;
|
|
262
|
-
/** Interpret gap between child canvases (default) or
|
|
263
|
-
spacing?: "canvas" | "plot";
|
|
271
|
+
/** Interpret gap between child canvases (default), inner plots, or retained full content (wrapped facets). */
|
|
272
|
+
spacing?: "canvas" | "plot" | "content";
|
|
273
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
274
|
+
topLane?: FacetTopLaneMode;
|
|
275
|
+
}
|
|
276
|
+
export type EditFacetSourceOptions =
|
|
277
|
+
| { program: ChartProgram; action?: never }
|
|
278
|
+
| { program?: never; action: { method: string; options?: Readonly<Record<string, unknown>> } };
|
|
279
|
+
export interface FacetHeaderTitleOptions {
|
|
280
|
+
/** Required when introducing a title; edits preserve the existing text. One line. */
|
|
281
|
+
text?: string;
|
|
282
|
+
fontSize?: number;
|
|
283
|
+
fontFamily?: string;
|
|
284
|
+
fontWeight?: string | number;
|
|
285
|
+
color?: string;
|
|
286
|
+
offset?: number;
|
|
287
|
+
align?: FacetHeaderAlign;
|
|
288
|
+
rotation?: RotationInput;
|
|
289
|
+
alongOffset?: number;
|
|
264
290
|
}
|
|
265
|
-
export interface EditFacetSourceOptions { program: ChartProgram; }
|
|
266
291
|
export interface EditFacetHeadersOptions {
|
|
267
292
|
fontSize?: number;
|
|
268
293
|
fontFamily?: string;
|
|
269
294
|
fontWeight?: string | number;
|
|
270
295
|
color?: string;
|
|
271
296
|
offset?: number;
|
|
297
|
+
/** Content follows concrete mark bounds with plot spacing; plot preserves existing placement. */
|
|
298
|
+
anchor?: "plot" | "content" | "view";
|
|
272
299
|
role?: FacetHeaderRole;
|
|
273
300
|
labelMap?: DisplayLabelMap | "auto";
|
|
274
301
|
side?: FacetHeaderSide;
|
|
275
302
|
align?: FacetHeaderAlign;
|
|
303
|
+
/** Numbers are radians; zero restores the existing unrotated header layout. */
|
|
304
|
+
rotation?: RotationInput;
|
|
305
|
+
/** Requires an explicit row or column role. False removes that role's field title. */
|
|
306
|
+
title?: FacetHeaderTitleOptions | false;
|
|
276
307
|
}
|
|
277
|
-
export type FacetHeadersOptions = Omit<EditFacetHeadersOptions, "role" | "side"> & {
|
|
308
|
+
export type FacetHeadersOptions = Omit<EditFacetHeadersOptions, "role" | "side" | "title"> & {
|
|
278
309
|
row?: Omit<EditFacetHeadersOptions, "role">;
|
|
279
310
|
column?: Omit<EditFacetHeadersOptions, "role">;
|
|
280
311
|
};
|
|
@@ -294,7 +325,9 @@ export interface FacetCompositionSpec {
|
|
|
294
325
|
readonly type: "facet";
|
|
295
326
|
readonly children: readonly string[];
|
|
296
327
|
readonly columns: number;
|
|
297
|
-
readonly spacing?: "canvas" | "plot";
|
|
328
|
+
readonly spacing?: "canvas" | "plot" | "content";
|
|
329
|
+
/** Canonical opt-in intent; stacked is represented by omission. */
|
|
330
|
+
readonly topLane?: "shared";
|
|
298
331
|
readonly gap: number;
|
|
299
332
|
readonly align: CompositionAlign;
|
|
300
333
|
readonly padding: Readonly<Required<CompositionPadding>>;
|
|
@@ -322,7 +355,7 @@ export interface FacetCompositionSpec {
|
|
|
322
355
|
};
|
|
323
356
|
readonly scales: Readonly<Required<FacetScaleResolutions>>;
|
|
324
357
|
readonly guides: {
|
|
325
|
-
readonly axes: "each" | "outer";
|
|
358
|
+
readonly axes: "each" | "outer" | { readonly x: "each" | "outer"; readonly y: "each" | "outer" };
|
|
326
359
|
readonly legend: false | "shared" | Readonly<LegendOptions> | StoredFacetLegendIntent;
|
|
327
360
|
};
|
|
328
361
|
};
|
|
@@ -703,6 +736,7 @@ export type TimeUnit =
|
|
|
703
736
|
| "week"
|
|
704
737
|
| "weekday";
|
|
705
738
|
type DatasetTimeUnitTransformBase = {
|
|
739
|
+
readonly missing?: "error" | "null";
|
|
706
740
|
readonly type: "timeUnit";
|
|
707
741
|
readonly field: string;
|
|
708
742
|
readonly temporalUnit?: TemporalInputUnit;
|
|
@@ -796,6 +830,21 @@ export interface DatasetBinTransform {
|
|
|
796
830
|
readonly boundaries: readonly [number, number, ...number[]];
|
|
797
831
|
};
|
|
798
832
|
}
|
|
833
|
+
export interface DatasetFlattenTransform {
|
|
834
|
+
readonly type: "flatten";
|
|
835
|
+
readonly fields: readonly string[];
|
|
836
|
+
readonly as: readonly string[];
|
|
837
|
+
}
|
|
838
|
+
export interface DatasetLookupTransform {
|
|
839
|
+
readonly type: "lookup";
|
|
840
|
+
readonly field: string;
|
|
841
|
+
readonly lookup: {
|
|
842
|
+
readonly data: string;
|
|
843
|
+
readonly key: string;
|
|
844
|
+
readonly fields: readonly string[];
|
|
845
|
+
readonly as: readonly string[];
|
|
846
|
+
};
|
|
847
|
+
}
|
|
799
848
|
export interface DatasetFoldTransform {
|
|
800
849
|
readonly type: "fold";
|
|
801
850
|
readonly fields: readonly string[];
|
|
@@ -962,6 +1011,8 @@ export type DatasetTransform =
|
|
|
962
1011
|
| DatasetImputedTransform
|
|
963
1012
|
| DatasetNormalizedTransform
|
|
964
1013
|
| DatasetFilterTransform
|
|
1014
|
+
| DatasetFlattenTransform
|
|
1015
|
+
| DatasetLookupTransform
|
|
965
1016
|
| DatasetFoldTransform
|
|
966
1017
|
| DatasetRegressionTransform
|
|
967
1018
|
| DatasetRegressionStatisticsTransform
|
|
@@ -1128,6 +1179,7 @@ export type ParameterizedAggregateOperation =
|
|
|
1128
1179
|
export type AggregateOperation =
|
|
1129
1180
|
| ScalarAggregateOperation
|
|
1130
1181
|
| ParameterizedAggregateOperation;
|
|
1182
|
+
/** HCL modes borrow a chromatic endpoint's hue across an exact RGB-neutral endpoint. */
|
|
1131
1183
|
export type ContinuousColorInterpolation =
|
|
1132
1184
|
| "rgb"
|
|
1133
1185
|
| "hsl"
|
|
@@ -1137,6 +1189,11 @@ export type ContinuousColorInterpolation =
|
|
|
1137
1189
|
| "hcl-long"
|
|
1138
1190
|
| "cubehelix"
|
|
1139
1191
|
| "cubehelix-long";
|
|
1192
|
+
/** A simple polygon around its unchanged input origin; defaults to equal-area normalization. */
|
|
1193
|
+
export type PointPolygonShape = {
|
|
1194
|
+
polygon: readonly { x: number; y: number }[];
|
|
1195
|
+
normalization?: "area" | "radius";
|
|
1196
|
+
};
|
|
1140
1197
|
export type PointShape =
|
|
1141
1198
|
| "circle"
|
|
1142
1199
|
| "square"
|
|
@@ -1151,7 +1208,8 @@ export type PointShape =
|
|
|
1151
1208
|
| "hexagon"
|
|
1152
1209
|
| "wye"
|
|
1153
1210
|
| "wedge"
|
|
1154
|
-
| "arrow"
|
|
1211
|
+
| "arrow"
|
|
1212
|
+
| PointPolygonShape;
|
|
1155
1213
|
export type StrokeStyleDetails = {
|
|
1156
1214
|
lineCap?: "butt" | "round" | "square";
|
|
1157
1215
|
lineJoin?: "miter" | "round" | "bevel";
|
|
@@ -1306,7 +1364,13 @@ export interface GraphicItem {
|
|
|
1306
1364
|
readonly properties: Readonly<Record<string, unknown>>;
|
|
1307
1365
|
}
|
|
1308
1366
|
|
|
1367
|
+
export interface GraphicClipRect {
|
|
1368
|
+
readonly x: number; readonly y: number; readonly width: number; readonly height: number;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1309
1371
|
export interface GraphicObject {
|
|
1372
|
+
/** Optional named non-Canvas owner clip in its unchanged parent frame. */
|
|
1373
|
+
readonly clip?: GraphicClipRect;
|
|
1310
1374
|
readonly type: GraphicType;
|
|
1311
1375
|
readonly properties?: Readonly<Record<string, unknown>>;
|
|
1312
1376
|
readonly items?: readonly GraphicItem[];
|
|
@@ -1331,6 +1395,8 @@ export interface CanvasOptions {
|
|
|
1331
1395
|
color?: string;
|
|
1332
1396
|
/** Positive finite width smaller than both plot dimensions. Defaults to 1. */
|
|
1333
1397
|
lineWidth?: number;
|
|
1398
|
+
/** Paint this border before ordinary marks. Defaults to false. */
|
|
1399
|
+
underlay?: boolean;
|
|
1334
1400
|
};
|
|
1335
1401
|
}
|
|
1336
1402
|
|
|
@@ -1353,12 +1419,16 @@ export type RotationUnit = "radians" | "degrees";
|
|
|
1353
1419
|
export type RotationInput = number | { value: number; unit: RotationUnit };
|
|
1354
1420
|
type ValueFormatDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
1355
1421
|
type ValueFormatPrecision = ValueFormatDigit | 10 | 11 | 12 | `0${ValueFormatDigit}`;
|
|
1356
|
-
type TimeAxisDirective = "Y" | "m" | "d" | "b" | "H" | "M" | "S" | "L";
|
|
1357
|
-
export type NumericFormatString =
|
|
1422
|
+
type TimeAxisDirective = "Y" | "m" | "d" | "b" | "a" | "H" | "M" | "S" | "L";
|
|
1423
|
+
export type NumericFormatString =
|
|
1424
|
+
| `.${ValueFormatPrecision}${"f" | "%" | "e"}`
|
|
1425
|
+
| ","
|
|
1426
|
+
| `,.${ValueFormatPrecision}f`;
|
|
1358
1427
|
export type UtcFormatString = `${string}%${TimeAxisDirective}${string}`;
|
|
1359
1428
|
export type ValueFormat = "auto" | NumericFormatString | UtcFormatString;
|
|
1360
1429
|
export type AxisFormatString = NumericFormatString | UtcFormatString;
|
|
1361
1430
|
export type AxisFormat =
|
|
1431
|
+
| "ticks"
|
|
1362
1432
|
| ValueFormat
|
|
1363
1433
|
| { decimals: number };
|
|
1364
1434
|
export type AxisValue = string | boolean | number;
|
|
@@ -1412,12 +1482,14 @@ export interface AxisLabelLayoutOptions {
|
|
|
1412
1482
|
/** Defaults to error; allow stores an intentional label-label overlap policy. */
|
|
1413
1483
|
overlap?: "error" | "allow";
|
|
1414
1484
|
}
|
|
1485
|
+
export type AxisTickRounding = "ceiling" | "nearest";
|
|
1415
1486
|
export interface AxisTicksAndLabelsOptions<P extends string> {
|
|
1416
1487
|
/** Axis resource identity; omission prefers canonical, then a unique named owner. */
|
|
1417
1488
|
target?: string;
|
|
1418
1489
|
scale?: string;
|
|
1419
1490
|
position?: P;
|
|
1420
1491
|
count?: number;
|
|
1492
|
+
rounding?: AxisTickRounding;
|
|
1421
1493
|
values?: readonly AxisValue[];
|
|
1422
1494
|
ticks?: CartesianAxisTickStyleOptions;
|
|
1423
1495
|
labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
|
|
@@ -1428,6 +1500,8 @@ export interface AxisTitleOptions<P extends string> {
|
|
|
1428
1500
|
/** Signed logical pixels: positive right for x, down for y, independent of scale reversal. */
|
|
1429
1501
|
alongOffset?: number;
|
|
1430
1502
|
align?: "left" | "center" | "right";
|
|
1503
|
+
/** Defaults to error; allow permits only this title to intersect its own axis labels. */
|
|
1504
|
+
overlap?: "error" | "allow";
|
|
1431
1505
|
baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
|
|
1432
1506
|
/** Hard breaks retain ordered lines with the chosen block baseline, spaced at 1.2 times fontSize. */
|
|
1433
1507
|
text?: string;
|
|
@@ -1443,6 +1517,8 @@ export interface AxisTitleOptions<P extends string> {
|
|
|
1443
1517
|
fontWeight?: string | number;
|
|
1444
1518
|
}
|
|
1445
1519
|
export interface CompleteAxisOptions<P extends string> {
|
|
1520
|
+
/** Paint the complete Cartesian axis before ordinary marks. Defaults to false. */
|
|
1521
|
+
underlay?: boolean;
|
|
1446
1522
|
/** Omission retains the canonical x/y identity. */
|
|
1447
1523
|
id?: string;
|
|
1448
1524
|
/** Non-negative outward displacement of the complete axis frame in logical pixels. */
|
|
@@ -1472,6 +1548,7 @@ export interface AxisTickOptions<P extends string>
|
|
|
1472
1548
|
scale?: string;
|
|
1473
1549
|
position?: P;
|
|
1474
1550
|
count?: number;
|
|
1551
|
+
rounding?: AxisTickRounding;
|
|
1475
1552
|
values?: readonly AxisValue[];
|
|
1476
1553
|
}
|
|
1477
1554
|
/** Cartesian label maps use typed category values or finite numeric/timestamp keys on continuous scales. Empty mapped labels are omitted without removing ticks. */
|
|
@@ -1482,6 +1559,7 @@ export interface AxisLabelOptions<P extends string>
|
|
|
1482
1559
|
scale?: string;
|
|
1483
1560
|
position?: P;
|
|
1484
1561
|
count?: number;
|
|
1562
|
+
rounding?: AxisTickRounding;
|
|
1485
1563
|
values?: readonly AxisValue[];
|
|
1486
1564
|
}
|
|
1487
1565
|
|
|
@@ -1804,6 +1882,11 @@ export type EditCoordinateOptions = EditCoordinateTarget & (
|
|
|
1804
1882
|
|
|
1805
1883
|
export type RadialMapping = "area" | "radius-length";
|
|
1806
1884
|
|
|
1885
|
+
/** Automatic linear position-domain rounding density, not a guide tick count. */
|
|
1886
|
+
export interface LinearNiceCountOptions {
|
|
1887
|
+
readonly count: number;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1807
1890
|
export interface ScaleOptions {
|
|
1808
1891
|
radialMapping?: RadialMapping;
|
|
1809
1892
|
id?: string;
|
|
@@ -1811,7 +1894,7 @@ export interface ScaleOptions {
|
|
|
1811
1894
|
domain?: "auto" | readonly unknown[];
|
|
1812
1895
|
emptyDomain?: "preserve" | "require-explicit";
|
|
1813
1896
|
range?: ScaleRange;
|
|
1814
|
-
nice?: boolean;
|
|
1897
|
+
nice?: boolean | LinearNiceCountOptions;
|
|
1815
1898
|
zero?: boolean;
|
|
1816
1899
|
clamp?: boolean;
|
|
1817
1900
|
reverse?: boolean;
|
|
@@ -1825,6 +1908,7 @@ export interface ScaleOptions {
|
|
|
1825
1908
|
palette?: Palette;
|
|
1826
1909
|
interpolate?: ContinuousColorInterpolation;
|
|
1827
1910
|
whitePoint?: "d65" | "d50";
|
|
1911
|
+
/** Finite Cubehelix lightness gamma, including zero and negative values. Defaults to 1. */
|
|
1828
1912
|
gamma?: number;
|
|
1829
1913
|
midpoint?: number | "auto";
|
|
1830
1914
|
unknown?: unknown;
|
|
@@ -1834,25 +1918,31 @@ export type QuantitativePositionScaleType =
|
|
|
1834
1918
|
| "linear" | "log" | "pow" | "sqrt" | "symlog";
|
|
1835
1919
|
type ScaleFields<Keys extends keyof ScaleOptions> = Pick<ScaleOptions, Keys>;
|
|
1836
1920
|
export type NonPointQuantitativePositionScaleOptions = ScaleFields<
|
|
1837
|
-
"id" | "
|
|
1921
|
+
"id" | "zero" | "clamp" | "reverse" |
|
|
1838
1922
|
"base" | "exponent" | "constant"
|
|
1839
1923
|
> & {
|
|
1840
|
-
type?: QuantitativePositionScaleType;
|
|
1841
1924
|
domain?: "auto" | readonly [number, number];
|
|
1842
1925
|
range?: "auto" | readonly [number, number];
|
|
1843
|
-
}
|
|
1926
|
+
} & (
|
|
1927
|
+
| { type?: "linear"; nice?: boolean | LinearNiceCountOptions }
|
|
1928
|
+
| { type: Exclude<QuantitativePositionScaleType, "linear">; nice?: boolean }
|
|
1929
|
+
);
|
|
1844
1930
|
export type QuantitativePositionScaleOptions =
|
|
1845
1931
|
NonPointQuantitativePositionScaleOptions & { unknown?: number };
|
|
1846
1932
|
export type ZeroSupportingPositionScaleType =
|
|
1847
1933
|
| "linear" | "pow" | "sqrt" | "symlog";
|
|
1848
1934
|
export type NonPointZeroSupportingPositionScaleOptions = Omit<
|
|
1849
1935
|
NonPointQuantitativePositionScaleOptions,
|
|
1850
|
-
"base" | "type"
|
|
1851
|
-
> &
|
|
1936
|
+
"base" | "type" | "nice"
|
|
1937
|
+
> & (
|
|
1938
|
+
| { type?: "linear"; nice?: boolean | LinearNiceCountOptions }
|
|
1939
|
+
| { type: Exclude<ZeroSupportingPositionScaleType, "linear">; nice?: boolean }
|
|
1940
|
+
);
|
|
1852
1941
|
export type NonPointTemporalPositionScaleOptions = ScaleFields<
|
|
1853
|
-
"id" | "
|
|
1942
|
+
"id" | "clamp" | "reverse"
|
|
1854
1943
|
> & {
|
|
1855
1944
|
type?: "time";
|
|
1945
|
+
nice?: boolean;
|
|
1856
1946
|
domain?: "auto" | readonly [number, number];
|
|
1857
1947
|
range?: "auto" | readonly [number, number];
|
|
1858
1948
|
};
|
|
@@ -1968,7 +2058,7 @@ export interface EditScaleOptions {
|
|
|
1968
2058
|
domain?: "auto" | readonly unknown[];
|
|
1969
2059
|
emptyDomain?: "preserve" | "require-explicit";
|
|
1970
2060
|
range?: ScaleRange;
|
|
1971
|
-
nice?: boolean;
|
|
2061
|
+
nice?: boolean | LinearNiceCountOptions;
|
|
1972
2062
|
zero?: boolean;
|
|
1973
2063
|
clamp?: boolean;
|
|
1974
2064
|
reverse?: boolean;
|
|
@@ -1982,6 +2072,7 @@ export interface EditScaleOptions {
|
|
|
1982
2072
|
palette?: Palette;
|
|
1983
2073
|
interpolate?: ContinuousColorInterpolation;
|
|
1984
2074
|
whitePoint?: "d65" | "d50" | "auto";
|
|
2075
|
+
/** Finite Cubehelix lightness gamma; auto restores 1. */
|
|
1985
2076
|
gamma?: number | "auto";
|
|
1986
2077
|
midpoint?: number | "auto";
|
|
1987
2078
|
unknown?: unknown;
|
|
@@ -2054,7 +2145,8 @@ export type EditSizeScaleOptions = FocusedScaleSelection &
|
|
|
2054
2145
|
export type EditOpacityScaleOptions = FocusedScaleSelection & WithoutScaleId<OpacityScaleOptions>;
|
|
2055
2146
|
export type EditShapeScaleOptions = FocusedScaleSelection & WithoutScaleId<ShapeScaleOptions>;
|
|
2056
2147
|
export type EditStrokeWidthScaleOptions = FocusedScaleSelection & WithoutScaleId<StrokeWidthScaleOptions>;
|
|
2057
|
-
export type EditStrokeDashScaleOptions = FocusedScaleSelection &
|
|
2148
|
+
export type EditStrokeDashScaleOptions = FocusedScaleSelection &
|
|
2149
|
+
Omit<WithoutScaleId<DashScaleOptions>, "unknown"> & { unknown?: DashStyle | DashPattern | undefined };
|
|
2058
2150
|
|
|
2059
2151
|
interface PositionEncodingBase {
|
|
2060
2152
|
field: string;
|
|
@@ -2226,26 +2318,25 @@ export type SecondaryPositionEncodingOptions =
|
|
|
2226
2318
|
| { datum: unknown; field?: never; fieldType?: "quantitative"; target?: string; scale?: { id?: string }; coordinate?: string }
|
|
2227
2319
|
| ({ field: string; datum?: never; target?: string; scale?: { id?: string }; coordinate?: string } & TemporalBindingBranch);
|
|
2228
2320
|
|
|
2229
|
-
type
|
|
2321
|
+
type QuantitativeRangePositionEncodingOptions = {
|
|
2322
|
+
lower: string | { datum: number };
|
|
2323
|
+
upper: string | { datum: number };
|
|
2230
2324
|
target?: string;
|
|
2231
2325
|
coordinate?: string;
|
|
2232
2326
|
fieldType?: "quantitative";
|
|
2233
2327
|
temporalUnit?: never;
|
|
2234
2328
|
scale?: NonPointQuantitativePositionScaleOptions;
|
|
2235
|
-
}
|
|
2236
|
-
| { lower: string; upper: { datum: number } }
|
|
2237
|
-
| { lower: { datum: number }; upper: string }
|
|
2238
|
-
);
|
|
2329
|
+
};
|
|
2239
2330
|
|
|
2240
|
-
type RangePositionEncodingOptions =
|
|
2331
|
+
type RangePositionEncodingOptions = QuantitativeRangePositionEncodingOptions | {
|
|
2241
2332
|
lower: string;
|
|
2242
2333
|
upper: string;
|
|
2243
2334
|
target?: string;
|
|
2244
2335
|
coordinate?: string;
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2336
|
+
fieldType: "temporal";
|
|
2337
|
+
temporalUnit?: TemporalInputUnit;
|
|
2338
|
+
scale?: NonPointTemporalPositionScaleOptions;
|
|
2339
|
+
};
|
|
2249
2340
|
|
|
2250
2341
|
export type HistogramEncodingOptions = {
|
|
2251
2342
|
field: string;
|
|
@@ -2271,6 +2362,8 @@ export interface CategoricalEncodingOptions {
|
|
|
2271
2362
|
fieldType?: "nominal" | "ordinal";
|
|
2272
2363
|
scale?: CategoricalColorScaleOptions;
|
|
2273
2364
|
palette?: Palette;
|
|
2365
|
+
/** Aggregate bars default to overlay for their category field, otherwise group;
|
|
2366
|
+
* existing groups and stored or explicit layouts take precedence. */
|
|
2274
2367
|
layout?: ColorLayout;
|
|
2275
2368
|
}
|
|
2276
2369
|
|
|
@@ -2405,6 +2498,8 @@ export interface ECDFDataOptions {
|
|
|
2405
2498
|
}
|
|
2406
2499
|
|
|
2407
2500
|
type TimeUnitDataBaseOptions = {
|
|
2501
|
+
/** Preserve null or absent inputs as null buckets; defaults to strict errors. */
|
|
2502
|
+
missing?: "error" | "null";
|
|
2408
2503
|
id: string;
|
|
2409
2504
|
source?: string;
|
|
2410
2505
|
field: string;
|
|
@@ -2463,6 +2558,18 @@ export interface FoldDataOutputFields {
|
|
|
2463
2558
|
key?: string;
|
|
2464
2559
|
value?: string;
|
|
2465
2560
|
}
|
|
2561
|
+
export interface FlattenDataOptions {
|
|
2562
|
+
id: string;
|
|
2563
|
+
source?: string;
|
|
2564
|
+
fields: readonly string[];
|
|
2565
|
+
as?: readonly string[];
|
|
2566
|
+
}
|
|
2567
|
+
export interface LookupDataOptions {
|
|
2568
|
+
id: string;
|
|
2569
|
+
source?: string;
|
|
2570
|
+
field: string;
|
|
2571
|
+
lookup: { data: string; key: string; fields: readonly string[]; as?: readonly string[] };
|
|
2572
|
+
}
|
|
2466
2573
|
export interface FoldDataOptions {
|
|
2467
2574
|
id: string;
|
|
2468
2575
|
source?: string;
|
|
@@ -2615,6 +2722,8 @@ export type EditFilteredDataOptions = FilterModePatch & {
|
|
|
2615
2722
|
nulls?: "include" | "exclude" | false;
|
|
2616
2723
|
dependents?: DerivedDataDependents;
|
|
2617
2724
|
};
|
|
2725
|
+
export type EditFlattenDataOptions = FocusedDerivedDataEdit<FlattenDataOptions>;
|
|
2726
|
+
export type EditLookupDataOptions = FocusedDerivedDataEdit<LookupDataOptions>;
|
|
2618
2727
|
export type EditFoldDataOptions = FocusedDerivedDataEdit<FoldDataOptions>;
|
|
2619
2728
|
export type EditSummaryDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2620
2729
|
SummaryDataOptions,
|
|
@@ -2765,6 +2874,12 @@ export interface BoxPlotOptions {
|
|
|
2765
2874
|
x?: BoxPlotPositionChannel;
|
|
2766
2875
|
y?: BoxPlotPositionChannel;
|
|
2767
2876
|
coordinate?: string;
|
|
2877
|
+
color?: string | {
|
|
2878
|
+
field: string;
|
|
2879
|
+
fieldType?: "nominal" | "ordinal";
|
|
2880
|
+
scale?: NonPointCategoricalColorScaleOptions;
|
|
2881
|
+
palette?: Palette;
|
|
2882
|
+
} | { value: string };
|
|
2768
2883
|
whisker?: BoxPlotWhisker;
|
|
2769
2884
|
width?: BoxPlotWidth;
|
|
2770
2885
|
outliers?: boolean;
|
|
@@ -2842,6 +2957,7 @@ export interface GradientPlotOptions {
|
|
|
2842
2957
|
x?: GradientPlotPositionChannel;
|
|
2843
2958
|
y?: GradientPlotPositionChannel;
|
|
2844
2959
|
coordinate?: string;
|
|
2960
|
+
color?: BasicColorChannel | { value: string };
|
|
2845
2961
|
density?: GradientPlotDensityOptions;
|
|
2846
2962
|
width?: { band?: number };
|
|
2847
2963
|
gradient?: GradientPlotAppearanceOptions;
|
|
@@ -2993,6 +3109,7 @@ type BandPositionChannel = FacadePositionChannel<
|
|
|
2993
3109
|
NonPointTemporalPositionScaleOptions,
|
|
2994
3110
|
NonPointBandPositionScaleOptions
|
|
2995
3111
|
>;
|
|
3112
|
+
/** With binned quantitative X, aggregate Y per exact interval (and optional series). */
|
|
2996
3113
|
type BarYPositionChannel =
|
|
2997
3114
|
| string
|
|
2998
3115
|
| {
|
|
@@ -3060,12 +3177,12 @@ type HistogramCategoricalColorChannel =
|
|
|
3060
3177
|
palette?: Palette;
|
|
3061
3178
|
layout?: Exclude<ColorLayout, "center">;
|
|
3062
3179
|
};
|
|
3063
|
-
type LineCategoricalColorChannel =
|
|
3180
|
+
type LineCategoricalColorChannel<Scale = NonPointCategoricalColorScaleOptions> =
|
|
3064
3181
|
| string
|
|
3065
3182
|
| {
|
|
3066
3183
|
field: string;
|
|
3067
3184
|
fieldType?: "nominal" | "ordinal";
|
|
3068
|
-
scale?:
|
|
3185
|
+
scale?: Scale;
|
|
3069
3186
|
palette?: Palette;
|
|
3070
3187
|
};
|
|
3071
3188
|
type QuantitativeBarColorChannel = {
|
|
@@ -3118,6 +3235,10 @@ export type BasicStrokeDashChannel =
|
|
|
3118
3235
|
? T extends unknown ? Omit<T, "target"> : never
|
|
3119
3236
|
: never;
|
|
3120
3237
|
|
|
3238
|
+
type NonCartesianStrokeDashChannel = BasicStrokeDashChannel extends infer T
|
|
3239
|
+
? T extends { field: string } ? Omit<T, "scale"> & { scale?: Omit<DashScaleOptions, "unknown"> } : T
|
|
3240
|
+
: never;
|
|
3241
|
+
|
|
3121
3242
|
export type ParallelMissingPolicy = "break" | "drop-row" | "error";
|
|
3122
3243
|
export type ParallelDimension = string | ({
|
|
3123
3244
|
field: string;
|
|
@@ -3153,7 +3274,7 @@ export interface CreateParallelCoordinatesOptions {
|
|
|
3153
3274
|
key?: string;
|
|
3154
3275
|
missing?: ParallelMissingPolicy;
|
|
3155
3276
|
color?: LineCategoricalColorChannel;
|
|
3156
|
-
strokeDash?:
|
|
3277
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3157
3278
|
line?: StrokeStyleDetails & {
|
|
3158
3279
|
strokeWidth?: number;
|
|
3159
3280
|
stroke?: string;
|
|
@@ -3165,6 +3286,8 @@ export interface CreateParallelCoordinatesOptions {
|
|
|
3165
3286
|
}
|
|
3166
3287
|
|
|
3167
3288
|
export interface CreateScatterPlotOptions {
|
|
3289
|
+
/** Forward the native mark missing-value policy. */
|
|
3290
|
+
missing?: "error" | "skip";
|
|
3168
3291
|
id?: string;
|
|
3169
3292
|
data?: string;
|
|
3170
3293
|
coordinate?: string;
|
|
@@ -3175,6 +3298,7 @@ export interface CreateScatterPlotOptions {
|
|
|
3175
3298
|
size?: BasicSizeChannel;
|
|
3176
3299
|
shape?: BasicShapeChannel;
|
|
3177
3300
|
point?: StrokeStyleDetails & {
|
|
3301
|
+
clip?: boolean;
|
|
3178
3302
|
radius?: number;
|
|
3179
3303
|
shape?: PointShape;
|
|
3180
3304
|
fill?: string;
|
|
@@ -3278,7 +3402,7 @@ export interface CreateLollipopPlotOptions extends EndpointPlotBaseOptions {
|
|
|
3278
3402
|
value: EndpointValueChannel;
|
|
3279
3403
|
baseline?: number;
|
|
3280
3404
|
point?: CreateScatterPlotOptions["point"];
|
|
3281
|
-
stem?: RuleStyleOptions;
|
|
3405
|
+
stem?: RuleStyleOptions & { clip?: boolean };
|
|
3282
3406
|
labels?: false | EndpointLabelOptions;
|
|
3283
3407
|
}
|
|
3284
3408
|
export interface CreateDumbbellPlotOptions extends EndpointPlotBaseOptions {
|
|
@@ -3286,7 +3410,7 @@ export interface CreateDumbbellPlotOptions extends EndpointPlotBaseOptions {
|
|
|
3286
3410
|
end: EndpointValueChannel;
|
|
3287
3411
|
startPoint?: CreateScatterPlotOptions["point"];
|
|
3288
3412
|
endPoint?: CreateScatterPlotOptions["point"];
|
|
3289
|
-
connector?: RuleStyleOptions;
|
|
3413
|
+
connector?: RuleStyleOptions & { clip?: boolean };
|
|
3290
3414
|
labels?: false | (EndpointLabelOptions & { endpoint?: "start" | "end" | "both" });
|
|
3291
3415
|
}
|
|
3292
3416
|
export type EditEndpointPlotOptions = { target?: string } & Partial<Pick<
|
|
@@ -3307,7 +3431,7 @@ export interface CreateECDFPlotOptions {
|
|
|
3307
3431
|
missing?: "drop" | "error";
|
|
3308
3432
|
as?: ECDFOutputFields;
|
|
3309
3433
|
color?: string | LineCategoricalColorChannel;
|
|
3310
|
-
line?: StrokeStyleDetails & { strokeWidth?: number; stroke?: string; opacity?: number };
|
|
3434
|
+
line?: StrokeStyleDetails & { clip?: boolean; strokeWidth?: number; stroke?: string; opacity?: number };
|
|
3311
3435
|
labels?: false | EndpointLabelOptions;
|
|
3312
3436
|
guides?: false | CartesianPathGuideOptions;
|
|
3313
3437
|
}
|
|
@@ -3358,7 +3482,7 @@ export interface CreatePolarScatterPlotOptions {
|
|
|
3358
3482
|
color?: BasicColorChannel;
|
|
3359
3483
|
size?: BasicSizeChannel;
|
|
3360
3484
|
shape?: BasicShapeChannel;
|
|
3361
|
-
point?: CreateScatterPlotOptions["point"]
|
|
3485
|
+
point?: Omit<NonNullable<CreateScatterPlotOptions["point"]>, "clip">;
|
|
3362
3486
|
guides?: false | PolarPointGuideOptions;
|
|
3363
3487
|
}
|
|
3364
3488
|
export interface CreatePolarLinePlotOptions {
|
|
@@ -3369,8 +3493,8 @@ export interface CreatePolarLinePlotOptions {
|
|
|
3369
3493
|
radius: PolarRadiusChannel;
|
|
3370
3494
|
color?: LineCategoricalColorChannel;
|
|
3371
3495
|
groupBy?: string | readonly [string, ...string[]];
|
|
3372
|
-
strokeDash?:
|
|
3373
|
-
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
|
|
3496
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3497
|
+
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "clip" | "missing" | "closed" | "curve" | "tension"> & {
|
|
3374
3498
|
curve?: "linear";
|
|
3375
3499
|
closed?: boolean;
|
|
3376
3500
|
};
|
|
@@ -3435,8 +3559,8 @@ export type CreateRadarPlotOptions = {
|
|
|
3435
3559
|
...RadarCategoryValue[]
|
|
3436
3560
|
];
|
|
3437
3561
|
color?: LineCategoricalColorChannel;
|
|
3438
|
-
strokeDash?:
|
|
3439
|
-
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
|
|
3562
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3563
|
+
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "clip" | "missing" | "closed" | "curve" | "tension"> & {
|
|
3440
3564
|
curve?: "linear";
|
|
3441
3565
|
closed?: true;
|
|
3442
3566
|
};
|
|
@@ -3445,6 +3569,10 @@ export type CreateRadarPlotOptions = {
|
|
|
3445
3569
|
| { category: RadarCategoryChannel; value: PolarRadiusChannel; wide?: never }
|
|
3446
3570
|
| { wide: RadarWideOptions; category?: never; value?: never }
|
|
3447
3571
|
);
|
|
3572
|
+
export interface EditRadarPlotOptions {
|
|
3573
|
+
target?: string;
|
|
3574
|
+
wide: { fields: readonly [string, string, ...string[]] };
|
|
3575
|
+
}
|
|
3448
3576
|
export type RugMeasureChannel = string | (
|
|
3449
3577
|
| {
|
|
3450
3578
|
field: string;
|
|
@@ -3460,6 +3588,7 @@ export type RugMeasureChannel = string | (
|
|
|
3460
3588
|
}
|
|
3461
3589
|
);
|
|
3462
3590
|
export interface RugTickOptions extends StrokeStyleDetails {
|
|
3591
|
+
clip?: boolean;
|
|
3463
3592
|
length?: number;
|
|
3464
3593
|
stroke?: string;
|
|
3465
3594
|
strokeWidth?: number;
|
|
@@ -3512,6 +3641,7 @@ export type CreateStripPlotOptions = {
|
|
|
3512
3641
|
size?: BasicSizeChannel;
|
|
3513
3642
|
shape?: BasicShapeChannel;
|
|
3514
3643
|
point?: StrokeStyleDetails & {
|
|
3644
|
+
clip?: boolean;
|
|
3515
3645
|
radius?: number;
|
|
3516
3646
|
shape?: PointShape;
|
|
3517
3647
|
fill?: string;
|
|
@@ -3539,6 +3669,7 @@ export type CreateBeeswarmPlotOptions = {
|
|
|
3539
3669
|
size?: BasicSizeChannel;
|
|
3540
3670
|
shape?: BasicShapeChannel;
|
|
3541
3671
|
point?: StrokeStyleDetails & {
|
|
3672
|
+
clip?: boolean;
|
|
3542
3673
|
radius?: number;
|
|
3543
3674
|
shape?: PointShape;
|
|
3544
3675
|
fill?: string;
|
|
@@ -3604,6 +3735,7 @@ export type RaincloudValueChannel = string | {
|
|
|
3604
3735
|
fieldType?: "quantitative";
|
|
3605
3736
|
scale?: NonPointQuantitativePositionScaleOptions;
|
|
3606
3737
|
};
|
|
3738
|
+
export type RaincloudColorChannel = LineCategoricalColorChannel | { value: string };
|
|
3607
3739
|
export interface CreateRaincloudPlotOptions {
|
|
3608
3740
|
id?: string;
|
|
3609
3741
|
data?: string;
|
|
@@ -3615,7 +3747,7 @@ export interface CreateRaincloudPlotOptions {
|
|
|
3615
3747
|
density?: false | RaincloudDensityOptions;
|
|
3616
3748
|
summary?: false | RaincloudSummaryOptions;
|
|
3617
3749
|
points?: false | RaincloudPointsOptions;
|
|
3618
|
-
color?:
|
|
3750
|
+
color?: false | RaincloudColorChannel;
|
|
3619
3751
|
guides?: false | CartesianCategoricalPointGuideOptions;
|
|
3620
3752
|
}
|
|
3621
3753
|
export interface EditRaincloudPlotOptions {
|
|
@@ -3628,7 +3760,7 @@ export interface EditRaincloudPlotOptions {
|
|
|
3628
3760
|
density?: false | RaincloudDensityOptions;
|
|
3629
3761
|
summary?: false | RaincloudSummaryOptions;
|
|
3630
3762
|
points?: false | RaincloudPointsOptions;
|
|
3631
|
-
color?: false |
|
|
3763
|
+
color?: false | RaincloudColorChannel;
|
|
3632
3764
|
}
|
|
3633
3765
|
|
|
3634
3766
|
export type GroupEncodingOptions = { target?: string; fieldType?: "nominal" } & (
|
|
@@ -3653,7 +3785,7 @@ export type CreateAreaPlotOptions = {
|
|
|
3653
3785
|
groupBy?: string | readonly [string, ...string[]];
|
|
3654
3786
|
layout?: Exclude<ColorLayout, "group">; missing?: "error" | "break";
|
|
3655
3787
|
color?: string | { field: string; fieldType?: "nominal" | "ordinal"; scale?: NonPointCategoricalColorScaleOptions; palette?: Palette };
|
|
3656
|
-
area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3788
|
+
area?: StrokeStyleDetails & { clip?: boolean; fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3657
3789
|
guides?: false | (Omit<DensityPlotGuideOptions, "grid"> & { grid?: false | CartesianGridOptions });
|
|
3658
3790
|
} & (
|
|
3659
3791
|
| { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: number }
|
|
@@ -3668,10 +3800,12 @@ export interface CreateLinePlotOptions {
|
|
|
3668
3800
|
coordinate?: string;
|
|
3669
3801
|
x: LineXPositionChannel;
|
|
3670
3802
|
y: LineYPositionChannel;
|
|
3671
|
-
color?: LineCategoricalColorChannel
|
|
3803
|
+
color?: LineCategoricalColorChannel<CategoricalColorScaleOptions>;
|
|
3672
3804
|
groupBy?: string | readonly [string, ...string[]];
|
|
3673
3805
|
strokeDash?: BasicStrokeDashChannel;
|
|
3674
3806
|
line?: StrokeStyleDetails & {
|
|
3807
|
+
clip?: boolean;
|
|
3808
|
+
missing?: "error" | "break";
|
|
3675
3809
|
strokeWidth?: number;
|
|
3676
3810
|
curve?: CurveInterpolation;
|
|
3677
3811
|
tension?: number;
|
|
@@ -3721,6 +3855,8 @@ type BarRangeOppositePositionChannel = string | {
|
|
|
3721
3855
|
stack?: never;
|
|
3722
3856
|
};
|
|
3723
3857
|
export type CreateBarPlotOptions = {
|
|
3858
|
+
/** Forward the native mark missing-value policy. */
|
|
3859
|
+
missing?: "error" | "skip";
|
|
3724
3860
|
id?: string;
|
|
3725
3861
|
data?: string;
|
|
3726
3862
|
coordinate?: string;
|
|
@@ -3728,6 +3864,7 @@ export type CreateBarPlotOptions = {
|
|
|
3728
3864
|
color?: BarColorChannel;
|
|
3729
3865
|
width?: Omit<BarWidthOptions, "target" | "interval">;
|
|
3730
3866
|
bar?: RectStyleDetails & {
|
|
3867
|
+
clip?: boolean;
|
|
3731
3868
|
fill?: FillPaint;
|
|
3732
3869
|
opacity?: number;
|
|
3733
3870
|
stroke?: FilledMarkStroke;
|
|
@@ -3747,6 +3884,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
|
3747
3884
|
field: string;
|
|
3748
3885
|
color?: HistogramCategoricalColorChannel;
|
|
3749
3886
|
bar?: RectStyleDetails & {
|
|
3887
|
+
clip?: boolean;
|
|
3750
3888
|
fill?: FillPaint;
|
|
3751
3889
|
opacity?: number;
|
|
3752
3890
|
stroke?: FilledMarkStroke;
|
|
@@ -3777,7 +3915,7 @@ export interface CreateHorizonPlotOptions {
|
|
|
3777
3915
|
missing?: HorizonMissingPolicy;
|
|
3778
3916
|
overflow?: HorizonOverflowPolicy;
|
|
3779
3917
|
palette?: HorizonPaletteOptions;
|
|
3780
|
-
area?: StrokeStyleDetails & { opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3918
|
+
area?: StrokeStyleDetails & { clip?: boolean; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3781
3919
|
guides?: false | HorizonPlotGuideOptions;
|
|
3782
3920
|
}
|
|
3783
3921
|
|
|
@@ -3809,7 +3947,7 @@ export interface CreateDensityPlotOptions {
|
|
|
3809
3947
|
palette?: Palette;
|
|
3810
3948
|
layout?: "overlay";
|
|
3811
3949
|
};
|
|
3812
|
-
area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3950
|
+
area?: StrokeStyleDetails & { clip?: boolean; fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3813
3951
|
guides?: false | DensityPlotGuideOptions;
|
|
3814
3952
|
}
|
|
3815
3953
|
|
|
@@ -3866,6 +4004,7 @@ export interface HeatmapBaseOptions {
|
|
|
3866
4004
|
data?: string;
|
|
3867
4005
|
coordinate?: string;
|
|
3868
4006
|
rect?: RectStyleDetails & {
|
|
4007
|
+
clip?: boolean;
|
|
3869
4008
|
opacity?: number;
|
|
3870
4009
|
stroke?: string | false;
|
|
3871
4010
|
strokeWidth?: number;
|
|
@@ -4046,6 +4185,7 @@ export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
|
|
|
4046
4185
|
export type TextFormat = ValueFormat;
|
|
4047
4186
|
|
|
4048
4187
|
export interface TextMarkOptions {
|
|
4188
|
+
clip?: boolean;
|
|
4049
4189
|
/** Logical-pixel baseline spacing; defaults to 1.2 times fontSize. */
|
|
4050
4190
|
lineHeight?: number;
|
|
4051
4191
|
/** Anchor the first line or center the complete multiline block. */
|
|
@@ -4119,6 +4259,7 @@ export interface RemoveLabelLayoutOptions {
|
|
|
4119
4259
|
}
|
|
4120
4260
|
|
|
4121
4261
|
export interface RectMarkOptions extends RectStyleDetails {
|
|
4262
|
+
clip?: boolean;
|
|
4122
4263
|
id?: string;
|
|
4123
4264
|
data?: string;
|
|
4124
4265
|
missing?: "error" | "skip";
|
|
@@ -4256,6 +4397,7 @@ export interface DashScaleOptions {
|
|
|
4256
4397
|
type?: "ordinal";
|
|
4257
4398
|
domain?: "auto" | readonly unknown[];
|
|
4258
4399
|
range?: "auto" | readonly (DashStyle | DashPattern)[];
|
|
4400
|
+
unknown?: DashStyle | DashPattern;
|
|
4259
4401
|
}
|
|
4260
4402
|
|
|
4261
4403
|
export type StrokeDashEncodingOptions =
|
|
@@ -4263,7 +4405,7 @@ export type StrokeDashEncodingOptions =
|
|
|
4263
4405
|
field: string;
|
|
4264
4406
|
value?: never;
|
|
4265
4407
|
target?: string;
|
|
4266
|
-
fieldType?: "nominal";
|
|
4408
|
+
fieldType?: "nominal" | "ordinal";
|
|
4267
4409
|
scale?: DashScaleOptions;
|
|
4268
4410
|
}
|
|
4269
4411
|
| {
|
|
@@ -4280,11 +4422,8 @@ export type NonPointContinuousColorScaleOptions = ScaleFields<
|
|
|
4280
4422
|
base?: number;
|
|
4281
4423
|
constant?: number;
|
|
4282
4424
|
domain?: "auto" | readonly [unknown, unknown];
|
|
4283
|
-
range?: "auto" | readonly [string, string, ...string[]];
|
|
4284
|
-
palette?:
|
|
4285
|
-
name: PaletteName;
|
|
4286
|
-
extent?: readonly [number, number];
|
|
4287
|
-
};
|
|
4425
|
+
range?: "auto" | readonly [string, string, ...string[]] | { readonly palette: Palette };
|
|
4426
|
+
palette?: Palette;
|
|
4288
4427
|
} & (
|
|
4289
4428
|
| { type: "pow"; exponent?: number }
|
|
4290
4429
|
| { type?: "sequential" | "log" | "sqrt" | "symlog"; exponent?: never }
|
|
@@ -4331,12 +4470,16 @@ export type DiscretizedColorScaleOptions =
|
|
|
4331
4470
|
/** Area quantitative color requires one finite value per existing series;
|
|
4332
4471
|
* aggregate, temporal color and unknown fallback remain mark-specific restrictions.
|
|
4333
4472
|
* Area authoring uses the Full facade; createAreaPlot.color stays categorical.
|
|
4473
|
+
* Tick quantitative/temporal color paints its stroke and excludes a simultaneous stroke encoding.
|
|
4334
4474
|
*/
|
|
4335
4475
|
export type ColorEncodingOptions =
|
|
4336
|
-
|
|
|
4476
|
+
| { value: string; target?: string; field?: never; fieldType?: never;
|
|
4477
|
+
scale?: never; palette?: never; layout?: never; aggregate?: never; temporalUnit?: never }
|
|
4478
|
+
| (CategoricalEncodingOptions & { value?: never })
|
|
4337
4479
|
| {
|
|
4338
4480
|
field: string;
|
|
4339
4481
|
target?: string;
|
|
4482
|
+
value?: never;
|
|
4340
4483
|
fieldType: "quantitative";
|
|
4341
4484
|
aggregate?: AggregateOperation;
|
|
4342
4485
|
scale?: ContinuousColorScaleOptions | DiscretizedColorScaleOptions;
|
|
@@ -4346,6 +4489,7 @@ export type ColorEncodingOptions =
|
|
|
4346
4489
|
| {
|
|
4347
4490
|
field: string;
|
|
4348
4491
|
target?: string;
|
|
4492
|
+
value?: never;
|
|
4349
4493
|
fieldType: "temporal";
|
|
4350
4494
|
temporalUnit?: TemporalInputUnit;
|
|
4351
4495
|
aggregate?: never;
|
|
@@ -4391,14 +4535,16 @@ export type StrokeEncodingOptions =
|
|
|
4391
4535
|
};
|
|
4392
4536
|
|
|
4393
4537
|
export type OpacityScaleOptions = ScaleFields<
|
|
4394
|
-
"id" | "
|
|
4538
|
+
"id" | "zero" | "clamp" | "reverse"
|
|
4395
4539
|
> & {
|
|
4540
|
+
nice?: boolean;
|
|
4396
4541
|
type?: "linear";
|
|
4397
4542
|
domain?: "auto" | readonly [number, number];
|
|
4398
4543
|
range?: "auto" | readonly [number, number];
|
|
4399
4544
|
unknown?: number;
|
|
4400
4545
|
};
|
|
4401
4546
|
|
|
4547
|
+
/** Constant or quantitative opacity on Point, Rule, Line, Bar, or row-owned Rect marks. */
|
|
4402
4548
|
export type OpacityEncodingOptions =
|
|
4403
4549
|
| { value: number; field?: never; target?: string; fieldType?: never; scale?: never }
|
|
4404
4550
|
| {
|
|
@@ -4409,7 +4555,9 @@ export type OpacityEncodingOptions =
|
|
|
4409
4555
|
scale?: OpacityScaleOptions;
|
|
4410
4556
|
};
|
|
4411
4557
|
|
|
4412
|
-
export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions
|
|
4558
|
+
export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions extends infer T
|
|
4559
|
+
? T extends unknown ? Omit<T, "nice"> & { nice?: boolean } : never
|
|
4560
|
+
: never;
|
|
4413
4561
|
|
|
4414
4562
|
export interface RuleStyleOptions extends StrokeStyleDetails {
|
|
4415
4563
|
stroke?: string;
|
|
@@ -4432,8 +4580,11 @@ type DynamicReferenceBinding = {
|
|
|
4432
4580
|
readonly id?: string;
|
|
4433
4581
|
readonly source: string;
|
|
4434
4582
|
readonly axis: "x" | "y";
|
|
4583
|
+
/** Distribution/endpoint measurement axes and quantitative Horizon X use original bound observations, retaining multiplicity. Horizon folded Y is unsupported. */
|
|
4435
4584
|
readonly population?: "boundData" | "visibleItems";
|
|
4436
4585
|
readonly field?: string;
|
|
4586
|
+
/** Compute a separate reference for each observed value of this field. */
|
|
4587
|
+
readonly groupBy?: string;
|
|
4437
4588
|
readonly x?: never;
|
|
4438
4589
|
readonly y?: never;
|
|
4439
4590
|
readonly space?: never;
|
|
@@ -4441,18 +4592,26 @@ type DynamicReferenceBinding = {
|
|
|
4441
4592
|
readonly coordinate?: never;
|
|
4442
4593
|
readonly temporalUnit?: never;
|
|
4443
4594
|
};
|
|
4595
|
+
/** A statistical line (mean by default) or an exact two-statistic interval. */
|
|
4596
|
+
export type CreateStatisticalReferenceOptions = DynamicReferenceBinding & (
|
|
4597
|
+
| (RuleStyleOptions & { readonly statistic?: ReferenceStatistic; readonly statistics?: never })
|
|
4598
|
+
| (Omit<RectMarkOptions, "id" | "data" | "source" | "missing"> & {
|
|
4599
|
+
readonly statistics: readonly [ReferenceStatistic, ReferenceStatistic]; readonly statistic?: never;
|
|
4600
|
+
})
|
|
4601
|
+
);
|
|
4444
4602
|
export type CreateReferenceLineOptions =
|
|
4445
4603
|
| ({ id?: string } & RuleStyleOptions & ReferenceBinding<unknown, number>)
|
|
4446
4604
|
| (DynamicReferenceBinding & RuleStyleOptions & {
|
|
4447
4605
|
readonly statistic: ReferenceStatistic;
|
|
4448
4606
|
});
|
|
4449
4607
|
export type CreateReferenceBandOptions =
|
|
4450
|
-
| (Omit<RectMarkOptions, "data"> &
|
|
4608
|
+
| (Omit<RectMarkOptions, "clip" | "data"> &
|
|
4451
4609
|
ReferenceBinding<readonly [unknown, unknown], readonly [number, number]>)
|
|
4452
|
-
| (DynamicReferenceBinding & Omit<RectMarkOptions, "id" | "data" | "source"> & {
|
|
4610
|
+
| (DynamicReferenceBinding & Omit<RectMarkOptions, "clip" | "id" | "data" | "source"> & {
|
|
4453
4611
|
readonly statistics: readonly [ReferenceStatistic, ReferenceStatistic];
|
|
4454
4612
|
});
|
|
4455
4613
|
|
|
4614
|
+
/** Constant or quantitative stroke width on Line, Rule, or row-owned Rect marks. */
|
|
4456
4615
|
export type StrokeWidthEncodingOptions =
|
|
4457
4616
|
| {
|
|
4458
4617
|
value: number;
|
|
@@ -4469,13 +4628,17 @@ export type StrokeWidthEncodingOptions =
|
|
|
4469
4628
|
scale?: StrokeWidthScaleOptions;
|
|
4470
4629
|
};
|
|
4471
4630
|
|
|
4472
|
-
|
|
4631
|
+
/** Constant value and scale ranges are graphical areas in square pixels. */
|
|
4632
|
+
export type SizeEncodingOptions =
|
|
4633
|
+
| { value: number; target?: string; field?: never; fieldType?: never; scale?: never }
|
|
4634
|
+
| ({
|
|
4635
|
+
value?: never;
|
|
4473
4636
|
field: string;
|
|
4474
4637
|
target?: string;
|
|
4475
4638
|
} & (
|
|
4476
4639
|
| { fieldType?: "quantitative"; scale?: SizeScaleOptions }
|
|
4477
4640
|
| { fieldType: "nominal" | "ordinal"; scale?: CategoricalSizeScaleOptions }
|
|
4478
|
-
);
|
|
4641
|
+
));
|
|
4479
4642
|
|
|
4480
4643
|
export type ShapeEncodingOptions = {
|
|
4481
4644
|
field: string;
|
|
@@ -4488,6 +4651,11 @@ export type AngleEncodingOptions =
|
|
|
4488
4651
|
| { target?: string; value: number; field?: never; fieldType?: never }
|
|
4489
4652
|
| { target?: string; field: string; fieldType?: "quantitative"; value?: never };
|
|
4490
4653
|
|
|
4654
|
+
/** Unscaled, signed logical-pixel offsets for independent Text marks. */
|
|
4655
|
+
export type TextOffsetEncodingOptions =
|
|
4656
|
+
| { target?: string; value: number; field?: never }
|
|
4657
|
+
| { target?: string; field: string; value?: never };
|
|
4658
|
+
|
|
4491
4659
|
type WithoutEncodingTarget<T> = T extends unknown
|
|
4492
4660
|
? Omit<T, "target" | "coordinate">
|
|
4493
4661
|
: never;
|
|
@@ -4512,6 +4680,8 @@ export interface EncodingChannelAssignments {
|
|
|
4512
4680
|
strokeDash?: WithoutEncodingTarget<StrokeDashEncodingOptions>;
|
|
4513
4681
|
angle?: WithoutEncodingTarget<AngleEncodingOptions>;
|
|
4514
4682
|
text?: WithoutEncodingTarget<TextEncodingOptions>;
|
|
4683
|
+
dx?: WithoutEncodingTarget<TextOffsetEncodingOptions>;
|
|
4684
|
+
dy?: WithoutEncodingTarget<TextOffsetEncodingOptions>;
|
|
4515
4685
|
}
|
|
4516
4686
|
|
|
4517
4687
|
type AtLeastOne<T> = {
|
|
@@ -4634,6 +4804,7 @@ export interface EditRegressionStatisticsDataOptions {
|
|
|
4634
4804
|
}
|
|
4635
4805
|
|
|
4636
4806
|
type RegressionCommonOptions = {
|
|
4807
|
+
placement?: "source" | "plot-last";
|
|
4637
4808
|
target?: string;
|
|
4638
4809
|
x?: string;
|
|
4639
4810
|
y?: string;
|
|
@@ -4659,6 +4830,7 @@ export type RegressionOptions = RegressionCommonOptions & (
|
|
|
4659
4830
|
);
|
|
4660
4831
|
|
|
4661
4832
|
export interface EditRegressionOptions {
|
|
4833
|
+
placement?: "source" | "plot-last";
|
|
4662
4834
|
target?: string;
|
|
4663
4835
|
data?: string;
|
|
4664
4836
|
x?: string;
|
|
@@ -4802,7 +4974,7 @@ export interface LegendOptions {
|
|
|
4802
4974
|
/** false hides the title while retaining its inferred field text. */
|
|
4803
4975
|
/** LF, CRLF and CR preserve explicit title lines, including blank lines. */
|
|
4804
4976
|
title?: string | false;
|
|
4805
|
-
/** Exact ascending samples for continuous size, opacity, stroke-width, or color
|
|
4977
|
+
/** Exact ascending samples for continuous size, opacity, stroke-width, color symbols, or color/stroke gradient ticks. Cannot be combined with count. */
|
|
4806
4978
|
values?: readonly number[];
|
|
4807
4979
|
count?: number;
|
|
4808
4980
|
/** Body-only opacity defaults to 1; edits preserve omitted fields. */
|
|
@@ -4813,6 +4985,10 @@ export interface LegendOptions {
|
|
|
4813
4985
|
titleStyle?: LegendTitleStyleOptions;
|
|
4814
4986
|
/** Vertical items default to 18 logical pixels; the pitch grows to fit samples and labels. */
|
|
4815
4987
|
itemGap?: number;
|
|
4988
|
+
/** Non-negative gap between occupied item rows; overrides vertical itemGap pitch. Item legends in edge layout only. */
|
|
4989
|
+
rowPadding?: number;
|
|
4990
|
+
/** Non-negative gap between visible title and body bounds; legacy-bottom is excluded. */
|
|
4991
|
+
titlePadding?: number;
|
|
4816
4992
|
border?: boolean | LegendBorderOptions;
|
|
4817
4993
|
}
|
|
4818
4994
|
|
|
@@ -4857,8 +5033,12 @@ export interface LegendTitleStyleEditOptions extends Omit<LegendTitleStyleOption
|
|
|
4857
5033
|
}
|
|
4858
5034
|
|
|
4859
5035
|
export interface EditLegendOptions
|
|
4860
|
-
extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight"> {
|
|
5036
|
+
extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight" | "rowPadding" | "titlePadding"> {
|
|
4861
5037
|
clipHeight?: number | "auto";
|
|
5038
|
+
/** auto removes the row policy and restores the retained itemGap behavior. */
|
|
5039
|
+
rowPadding?: number | "auto";
|
|
5040
|
+
/** auto removes the title/body spacing override. */
|
|
5041
|
+
titlePadding?: number | "auto";
|
|
4862
5042
|
/** Select one existing block; cannot accompany channels. */
|
|
4863
5043
|
channel?: LegendChannel;
|
|
4864
5044
|
/** inherit is allowed only with a singular channel selector. */
|
|
@@ -4896,6 +5076,10 @@ export interface EditLegendLayoutOptions {
|
|
|
4896
5076
|
titlePosition?: "top" | "left" | "bottom";
|
|
4897
5077
|
/** Explicit spacing override; vertical creation defaults to 18 logical pixels. */
|
|
4898
5078
|
itemGap?: number;
|
|
5079
|
+
/** Non-negative occupied-row gap; auto restores the retained legacy pitch. */
|
|
5080
|
+
rowPadding?: number | "auto";
|
|
5081
|
+
/** Non-negative visible-title/body gap; auto restores the family default. */
|
|
5082
|
+
titlePadding?: number | "auto";
|
|
4899
5083
|
}
|
|
4900
5084
|
|
|
4901
5085
|
export interface EditLegendLabelsOptions extends LegendTextOptions {
|
|
@@ -4928,7 +5112,18 @@ export interface EditLegendBorderOptions {
|
|
|
4928
5112
|
border: boolean | LegendBorderOptions;
|
|
4929
5113
|
}
|
|
4930
5114
|
|
|
5115
|
+
/** Omitted/false axes are preserved; component false values remove existing components. */
|
|
5116
|
+
export interface EditAxesOptions {
|
|
5117
|
+
x?: false | EditAxisOptions<XAxisPosition> | readonly [EditAxisOptions<XAxisPosition> & { target: string }, ...(EditAxisOptions<XAxisPosition> & { target: string })[]];
|
|
5118
|
+
y?: false | EditAxisOptions<YAxisPosition> | readonly [EditAxisOptions<YAxisPosition> & { target: string }, ...(EditAxisOptions<YAxisPosition> & { target: string })[]];
|
|
5119
|
+
theta?: false | EditThetaAxisOptions;
|
|
5120
|
+
radius?: false | EditRadialAxisOptions;
|
|
5121
|
+
parallel?: false | EditParallelAxisOptions | readonly [EditParallelAxisOptions, ...EditParallelAxisOptions[]];
|
|
5122
|
+
}
|
|
5123
|
+
|
|
4931
5124
|
export interface EditAxisOptions<P extends string> {
|
|
5125
|
+
/** Omission preserves placement; false restores the ordinary overlay. */
|
|
5126
|
+
underlay?: boolean;
|
|
4932
5127
|
target?: string;
|
|
4933
5128
|
/** Omitted edits preserve the frame; zero restores the plot-edge frame. */
|
|
4934
5129
|
offset?: number;
|
|
@@ -5062,6 +5257,8 @@ export class ChartProgram {
|
|
|
5062
5257
|
createDensityData(options: DensityDataOptions): ChartProgram;
|
|
5063
5258
|
createSummaryData(options: SummaryDataOptions): ChartProgram;
|
|
5064
5259
|
createBinData(options: BinDataOptions): ChartProgram;
|
|
5260
|
+
createFlattenData(options: FlattenDataOptions): ChartProgram;
|
|
5261
|
+
createLookupData(options: LookupDataOptions): ChartProgram;
|
|
5065
5262
|
createFoldData(options: FoldDataOptions): ChartProgram;
|
|
5066
5263
|
createComputedData(options: ComputedDataOptions): ChartProgram;
|
|
5067
5264
|
createNormalizedData(options: NormalizedDataOptions): ChartProgram;
|
|
@@ -5080,6 +5277,8 @@ export class ChartProgram {
|
|
|
5080
5277
|
editDerivedData(options: EditDerivedDataOptions): ChartProgram;
|
|
5081
5278
|
editComputedData(options: EditComputedDataOptions): ChartProgram;
|
|
5082
5279
|
editFilteredData(options: EditFilteredDataOptions): ChartProgram;
|
|
5280
|
+
editFlattenData(options: EditFlattenDataOptions): ChartProgram;
|
|
5281
|
+
editLookupData(options: EditLookupDataOptions): ChartProgram;
|
|
5083
5282
|
editFoldData(options: EditFoldDataOptions): ChartProgram;
|
|
5084
5283
|
editSummaryData(options: EditSummaryDataOptions): ChartProgram;
|
|
5085
5284
|
editBinData(options: EditBinDataOptions): ChartProgram;
|
|
@@ -5098,6 +5297,7 @@ export class ChartProgram {
|
|
|
5098
5297
|
|
|
5099
5298
|
/** One point layer accepts at most 50,000 selected rows, before missing-value filtering. */
|
|
5100
5299
|
createPointMark(options?: StrokeStyleDetails & {
|
|
5300
|
+
clip?: boolean;
|
|
5101
5301
|
id?: string;
|
|
5102
5302
|
data?: string;
|
|
5103
5303
|
missing?: "error" | "skip";
|
|
@@ -5108,6 +5308,7 @@ export class ChartProgram {
|
|
|
5108
5308
|
strokeWidth?: number;
|
|
5109
5309
|
}): ChartProgram;
|
|
5110
5310
|
editPointMark(options: StrokeStyleDetails & {
|
|
5311
|
+
clip?: boolean;
|
|
5111
5312
|
target?: string;
|
|
5112
5313
|
missing?: "error" | "skip";
|
|
5113
5314
|
shape?: PointShape;
|
|
@@ -5117,6 +5318,7 @@ export class ChartProgram {
|
|
|
5117
5318
|
strokeWidth?: number;
|
|
5118
5319
|
}): ChartProgram;
|
|
5119
5320
|
createTickMark(options?: StrokeStyleDetails & {
|
|
5321
|
+
clip?: boolean;
|
|
5120
5322
|
id?: string;
|
|
5121
5323
|
data?: string;
|
|
5122
5324
|
missing?: "error" | "skip";
|
|
@@ -5126,6 +5328,7 @@ export class ChartProgram {
|
|
|
5126
5328
|
opacity?: number;
|
|
5127
5329
|
}): ChartProgram;
|
|
5128
5330
|
editTickMark(options: StrokeStyleDetails & {
|
|
5331
|
+
clip?: boolean;
|
|
5129
5332
|
target?: string;
|
|
5130
5333
|
missing?: "error" | "skip";
|
|
5131
5334
|
length?: number;
|
|
@@ -5138,6 +5341,8 @@ export class ChartProgram {
|
|
|
5138
5341
|
packPoints(options: PackPointsOptions): ChartProgram;
|
|
5139
5342
|
removePointPacking(options?: RemovePointPackingOptions): ChartProgram;
|
|
5140
5343
|
createLineMark(options?: StrokeStyleDetails & {
|
|
5344
|
+
clip?: boolean;
|
|
5345
|
+
missing?: "error" | "break";
|
|
5141
5346
|
id?: string;
|
|
5142
5347
|
data?: string;
|
|
5143
5348
|
strokeWidth?: number;
|
|
@@ -5148,6 +5353,8 @@ export class ChartProgram {
|
|
|
5148
5353
|
closed?: boolean;
|
|
5149
5354
|
}): ChartProgram;
|
|
5150
5355
|
editLineMark(options: StrokeStyleDetails & {
|
|
5356
|
+
clip?: boolean;
|
|
5357
|
+
missing?: "error" | "break";
|
|
5151
5358
|
target?: string;
|
|
5152
5359
|
strokeWidth?: number;
|
|
5153
5360
|
curve?: CurveInterpolation;
|
|
@@ -5157,6 +5364,7 @@ export class ChartProgram {
|
|
|
5157
5364
|
closed?: boolean;
|
|
5158
5365
|
}): ChartProgram;
|
|
5159
5366
|
createBarMark(options?: RectStyleDetails & {
|
|
5367
|
+
clip?: boolean;
|
|
5160
5368
|
id?: string;
|
|
5161
5369
|
data?: string;
|
|
5162
5370
|
orientation?: "vertical" | "horizontal";
|
|
@@ -5167,6 +5375,7 @@ export class ChartProgram {
|
|
|
5167
5375
|
strokeWidth?: number;
|
|
5168
5376
|
}): ChartProgram;
|
|
5169
5377
|
editBarMark(options: RectStyleDetails & {
|
|
5378
|
+
clip?: boolean;
|
|
5170
5379
|
target?: string;
|
|
5171
5380
|
blend?: "normal" | "difference";
|
|
5172
5381
|
missing?: "error" | "skip";
|
|
@@ -5176,6 +5385,7 @@ export class ChartProgram {
|
|
|
5176
5385
|
strokeWidth?: number;
|
|
5177
5386
|
}): ChartProgram;
|
|
5178
5387
|
createAreaMark(options?: StrokeStyleDetails & {
|
|
5388
|
+
clip?: boolean;
|
|
5179
5389
|
id?: string;
|
|
5180
5390
|
data?: string;
|
|
5181
5391
|
fill?: FillPaint;
|
|
@@ -5206,8 +5416,8 @@ export class ChartProgram {
|
|
|
5206
5416
|
}): ChartProgram;
|
|
5207
5417
|
createRectMark(options?: RectMarkOptions): ChartProgram;
|
|
5208
5418
|
editRectMark(options: EditRectMarkOptions): ChartProgram;
|
|
5209
|
-
createRuleMark(options?: { id?: string; data?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5210
|
-
editRuleMark(options: { target?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5419
|
+
createRuleMark(options?: { clip?: boolean; id?: string; data?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5420
|
+
editRuleMark(options: { clip?: boolean; target?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5211
5421
|
createTextMark(options?: TextMarkOptions): ChartProgram;
|
|
5212
5422
|
createTextPlot(options: CreateTextPlotOptions): ChartProgram;
|
|
5213
5423
|
createMarkLabels(options?: CreateMarkLabelsOptions): ChartProgram;
|
|
@@ -5215,12 +5425,14 @@ export class ChartProgram {
|
|
|
5215
5425
|
editMarkLabelPlacement(options: EditMarkLabelPlacementOptions): ChartProgram;
|
|
5216
5426
|
removeMarkLabels(options: RemoveMarkLabelsOptions): ChartProgram;
|
|
5217
5427
|
createAnnotation(options: CreateAnnotationOptions): ChartProgram;
|
|
5428
|
+
createStatisticalReference(options: CreateStatisticalReferenceOptions): ChartProgram;
|
|
5218
5429
|
createReferenceLine(options: CreateReferenceLineOptions): ChartProgram;
|
|
5219
5430
|
createReferenceBand(options: CreateReferenceBandOptions): ChartProgram;
|
|
5220
5431
|
editTextMark(options: EditTextMarkOptions): ChartProgram;
|
|
5221
5432
|
layoutLabels(options?: LabelLayoutOptions): ChartProgram;
|
|
5222
5433
|
removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
|
|
5223
5434
|
editAreaMark(options: StrokeStyleDetails & {
|
|
5435
|
+
clip?: boolean;
|
|
5224
5436
|
target?: string;
|
|
5225
5437
|
fill?: FillPaint;
|
|
5226
5438
|
opacity?: number;
|
|
@@ -5261,9 +5473,11 @@ export class ChartProgram {
|
|
|
5261
5473
|
channel:
|
|
5262
5474
|
| "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset"
|
|
5263
5475
|
| "theta" | "radius" | "color" | "stroke" | "strokeDash" | "strokeWidth"
|
|
5264
|
-
| "size" | "shape" | "angle" | "group" | "opacity" | "text";
|
|
5476
|
+
| "size" | "shape" | "angle" | "group" | "opacity" | "text" | "dx" | "dy";
|
|
5265
5477
|
}): ChartProgram;
|
|
5266
5478
|
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
5479
|
+
encodeDx(options: TextOffsetEncodingOptions): ChartProgram;
|
|
5480
|
+
encodeDy(options: TextOffsetEncodingOptions): ChartProgram;
|
|
5267
5481
|
encodeHistogram(options: HistogramEncodingOptions): ChartProgram;
|
|
5268
5482
|
encodeDensity(options: DensityEncodingOptions): ChartProgram;
|
|
5269
5483
|
editDensity(options: EditDensityOptions): ChartProgram;
|
|
@@ -5300,6 +5514,7 @@ export class ChartProgram {
|
|
|
5300
5514
|
createPolarScatterPlot(options: CreatePolarScatterPlotOptions): ChartProgram;
|
|
5301
5515
|
createPolarLinePlot(options: CreatePolarLinePlotOptions): ChartProgram;
|
|
5302
5516
|
createRadarPlot(options: CreateRadarPlotOptions): ChartProgram;
|
|
5517
|
+
editRadarPlot(options: EditRadarPlotOptions): ChartProgram;
|
|
5303
5518
|
createRugPlot(options: CreateRugPlotOptions): ChartProgram;
|
|
5304
5519
|
createStripPlot(options: CreateStripPlotOptions): ChartProgram;
|
|
5305
5520
|
createBeeswarmPlot(options: CreateBeeswarmPlotOptions): ChartProgram;
|
|
@@ -5322,6 +5537,7 @@ export class ChartProgram {
|
|
|
5322
5537
|
removeParallelAxis(options: RemoveParallelAxisOptions): ChartProgram;
|
|
5323
5538
|
removeParallelAxes(options?: ParallelAxesOptions): ChartProgram;
|
|
5324
5539
|
createAxes(options?: CreateAxesOptions): ChartProgram;
|
|
5540
|
+
editAxes(options: EditAxesOptions): ChartProgram;
|
|
5325
5541
|
createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
|
|
5326
5542
|
createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
|
|
5327
5543
|
createThetaAxis(options?: CompleteThetaAxisOptions): ChartProgram;
|