ggaction 0.0.21 → 0.0.22
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 +73 -0
- package/README.md +3 -2
- package/knowledge/action-cards.json +1 -1
- package/knowledge/intent-taxonomy.json +1 -1
- package/knowledge/mcp-resources.json +1 -1
- package/package.json +6 -2
- 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 +1 -1
- 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 +21 -35
- 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/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/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/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 +21 -4
- package/src/core/datasetReferences.js +17 -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/datasetDependencies.js +97 -0
- package/src/grammar/datasetSchema.js +31 -1
- package/src/grammar/facetHeaders.js +1 -0
- package/src/grammar/facets/dependencies.js +6 -2
- 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/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/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/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/facetGuides/layout.js +1 -1
- package/src/materialization/facetGuides/placement.js +23 -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 +5 -0
- 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 +108 -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 +270 -60
- package/types/scene.d.ts +35 -0
package/types/program.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export type JitterMaxOffset =
|
|
|
108
108
|
| { pixels?: never; band: number };
|
|
109
109
|
export interface JitterPointsOptions {
|
|
110
110
|
target?: string;
|
|
111
|
-
channel: "x" | "y";
|
|
111
|
+
channel: "x" | "y" | "both";
|
|
112
112
|
maxOffset: JitterMaxOffset;
|
|
113
113
|
seed?: string | number;
|
|
114
114
|
key?: string;
|
|
@@ -170,7 +170,10 @@ export interface EditCompositionLayoutOptions {
|
|
|
170
170
|
padding?: number | CompositionPadding;
|
|
171
171
|
/** Interpret gap between child canvases (default) or inner plot regions. */
|
|
172
172
|
spacing?: "canvas" | "plot";
|
|
173
|
+
/** Share existing top margin with parent title and headers; requires plot spacing. Stacked restores the default. */
|
|
174
|
+
topLane?: FacetTopLaneMode;
|
|
173
175
|
}
|
|
176
|
+
export type FacetTopLaneMode = "stacked" | "shared";
|
|
174
177
|
export interface ReplaceCompositionChildOptions {
|
|
175
178
|
target: string;
|
|
176
179
|
program: ChartProgram;
|
|
@@ -216,6 +219,7 @@ export interface FacetGuideOptions {
|
|
|
216
219
|
export interface FacetOptions {
|
|
217
220
|
id?: string;
|
|
218
221
|
field: string;
|
|
222
|
+
/** Common row-preserving ancestor, or an explicit materialized fold ancestor of every layer. */
|
|
219
223
|
data?: string;
|
|
220
224
|
values?: readonly DatasetScalar[];
|
|
221
225
|
columns?: number;
|
|
@@ -227,6 +231,8 @@ export interface FacetOptions {
|
|
|
227
231
|
headers?: FacetHeadersOptions;
|
|
228
232
|
/** Interpret gap between child canvases (default) or inner plot regions. */
|
|
229
233
|
spacing?: "canvas" | "plot";
|
|
234
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
235
|
+
topLane?: FacetTopLaneMode;
|
|
230
236
|
}
|
|
231
237
|
export interface FacetGridRole {
|
|
232
238
|
field: string;
|
|
@@ -246,6 +252,8 @@ export interface FacetGridOptions {
|
|
|
246
252
|
headers?: FacetHeadersOptions;
|
|
247
253
|
/** Interpret gap between child canvases (default) or inner plot regions. */
|
|
248
254
|
spacing?: "canvas" | "plot";
|
|
255
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
256
|
+
topLane?: FacetTopLaneMode;
|
|
249
257
|
}
|
|
250
258
|
export interface RepeatChartsOptions {
|
|
251
259
|
id?: string;
|
|
@@ -261,20 +269,42 @@ export interface RepeatChartsOptions {
|
|
|
261
269
|
headers?: FacetHeadersOptions;
|
|
262
270
|
/** Interpret gap between child canvases (default) or inner plot regions. */
|
|
263
271
|
spacing?: "canvas" | "plot";
|
|
272
|
+
/** Share the existing top margin rather than adding title/header reservations. Requires plot spacing. */
|
|
273
|
+
topLane?: FacetTopLaneMode;
|
|
274
|
+
}
|
|
275
|
+
export type EditFacetSourceOptions =
|
|
276
|
+
| { program: ChartProgram; action?: never }
|
|
277
|
+
| { program?: never; action: { method: string; options?: Readonly<Record<string, unknown>> } };
|
|
278
|
+
export interface FacetHeaderTitleOptions {
|
|
279
|
+
/** Required when introducing a title; edits preserve the existing text. One line. */
|
|
280
|
+
text?: string;
|
|
281
|
+
fontSize?: number;
|
|
282
|
+
fontFamily?: string;
|
|
283
|
+
fontWeight?: string | number;
|
|
284
|
+
color?: string;
|
|
285
|
+
offset?: number;
|
|
286
|
+
align?: FacetHeaderAlign;
|
|
287
|
+
rotation?: RotationInput;
|
|
288
|
+
alongOffset?: number;
|
|
264
289
|
}
|
|
265
|
-
export interface EditFacetSourceOptions { program: ChartProgram; }
|
|
266
290
|
export interface EditFacetHeadersOptions {
|
|
267
291
|
fontSize?: number;
|
|
268
292
|
fontFamily?: string;
|
|
269
293
|
fontWeight?: string | number;
|
|
270
294
|
color?: string;
|
|
271
295
|
offset?: number;
|
|
296
|
+
/** Content follows concrete mark bounds with plot spacing; plot preserves existing placement. */
|
|
297
|
+
anchor?: "plot" | "content";
|
|
272
298
|
role?: FacetHeaderRole;
|
|
273
299
|
labelMap?: DisplayLabelMap | "auto";
|
|
274
300
|
side?: FacetHeaderSide;
|
|
275
301
|
align?: FacetHeaderAlign;
|
|
302
|
+
/** Numbers are radians; zero restores the existing unrotated header layout. */
|
|
303
|
+
rotation?: RotationInput;
|
|
304
|
+
/** Requires an explicit row or column role. False removes that role's field title. */
|
|
305
|
+
title?: FacetHeaderTitleOptions | false;
|
|
276
306
|
}
|
|
277
|
-
export type FacetHeadersOptions = Omit<EditFacetHeadersOptions, "role" | "side"> & {
|
|
307
|
+
export type FacetHeadersOptions = Omit<EditFacetHeadersOptions, "role" | "side" | "title"> & {
|
|
278
308
|
row?: Omit<EditFacetHeadersOptions, "role">;
|
|
279
309
|
column?: Omit<EditFacetHeadersOptions, "role">;
|
|
280
310
|
};
|
|
@@ -295,6 +325,8 @@ export interface FacetCompositionSpec {
|
|
|
295
325
|
readonly children: readonly string[];
|
|
296
326
|
readonly columns: number;
|
|
297
327
|
readonly spacing?: "canvas" | "plot";
|
|
328
|
+
/** Canonical opt-in intent; stacked is represented by omission. */
|
|
329
|
+
readonly topLane?: "shared";
|
|
298
330
|
readonly gap: number;
|
|
299
331
|
readonly align: CompositionAlign;
|
|
300
332
|
readonly padding: Readonly<Required<CompositionPadding>>;
|
|
@@ -796,6 +828,21 @@ export interface DatasetBinTransform {
|
|
|
796
828
|
readonly boundaries: readonly [number, number, ...number[]];
|
|
797
829
|
};
|
|
798
830
|
}
|
|
831
|
+
export interface DatasetFlattenTransform {
|
|
832
|
+
readonly type: "flatten";
|
|
833
|
+
readonly fields: readonly string[];
|
|
834
|
+
readonly as: readonly string[];
|
|
835
|
+
}
|
|
836
|
+
export interface DatasetLookupTransform {
|
|
837
|
+
readonly type: "lookup";
|
|
838
|
+
readonly field: string;
|
|
839
|
+
readonly lookup: {
|
|
840
|
+
readonly data: string;
|
|
841
|
+
readonly key: string;
|
|
842
|
+
readonly fields: readonly string[];
|
|
843
|
+
readonly as: readonly string[];
|
|
844
|
+
};
|
|
845
|
+
}
|
|
799
846
|
export interface DatasetFoldTransform {
|
|
800
847
|
readonly type: "fold";
|
|
801
848
|
readonly fields: readonly string[];
|
|
@@ -962,6 +1009,8 @@ export type DatasetTransform =
|
|
|
962
1009
|
| DatasetImputedTransform
|
|
963
1010
|
| DatasetNormalizedTransform
|
|
964
1011
|
| DatasetFilterTransform
|
|
1012
|
+
| DatasetFlattenTransform
|
|
1013
|
+
| DatasetLookupTransform
|
|
965
1014
|
| DatasetFoldTransform
|
|
966
1015
|
| DatasetRegressionTransform
|
|
967
1016
|
| DatasetRegressionStatisticsTransform
|
|
@@ -1128,6 +1177,7 @@ export type ParameterizedAggregateOperation =
|
|
|
1128
1177
|
export type AggregateOperation =
|
|
1129
1178
|
| ScalarAggregateOperation
|
|
1130
1179
|
| ParameterizedAggregateOperation;
|
|
1180
|
+
/** HCL modes borrow a chromatic endpoint's hue across an exact RGB-neutral endpoint. */
|
|
1131
1181
|
export type ContinuousColorInterpolation =
|
|
1132
1182
|
| "rgb"
|
|
1133
1183
|
| "hsl"
|
|
@@ -1137,6 +1187,11 @@ export type ContinuousColorInterpolation =
|
|
|
1137
1187
|
| "hcl-long"
|
|
1138
1188
|
| "cubehelix"
|
|
1139
1189
|
| "cubehelix-long";
|
|
1190
|
+
/** A simple polygon around its unchanged input origin; defaults to equal-area normalization. */
|
|
1191
|
+
export type PointPolygonShape = {
|
|
1192
|
+
polygon: readonly { x: number; y: number }[];
|
|
1193
|
+
normalization?: "area" | "radius";
|
|
1194
|
+
};
|
|
1140
1195
|
export type PointShape =
|
|
1141
1196
|
| "circle"
|
|
1142
1197
|
| "square"
|
|
@@ -1151,7 +1206,8 @@ export type PointShape =
|
|
|
1151
1206
|
| "hexagon"
|
|
1152
1207
|
| "wye"
|
|
1153
1208
|
| "wedge"
|
|
1154
|
-
| "arrow"
|
|
1209
|
+
| "arrow"
|
|
1210
|
+
| PointPolygonShape;
|
|
1155
1211
|
export type StrokeStyleDetails = {
|
|
1156
1212
|
lineCap?: "butt" | "round" | "square";
|
|
1157
1213
|
lineJoin?: "miter" | "round" | "bevel";
|
|
@@ -1306,7 +1362,13 @@ export interface GraphicItem {
|
|
|
1306
1362
|
readonly properties: Readonly<Record<string, unknown>>;
|
|
1307
1363
|
}
|
|
1308
1364
|
|
|
1365
|
+
export interface GraphicClipRect {
|
|
1366
|
+
readonly x: number; readonly y: number; readonly width: number; readonly height: number;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1309
1369
|
export interface GraphicObject {
|
|
1370
|
+
/** Optional named non-Canvas owner clip in its unchanged parent frame. */
|
|
1371
|
+
readonly clip?: GraphicClipRect;
|
|
1310
1372
|
readonly type: GraphicType;
|
|
1311
1373
|
readonly properties?: Readonly<Record<string, unknown>>;
|
|
1312
1374
|
readonly items?: readonly GraphicItem[];
|
|
@@ -1331,6 +1393,8 @@ export interface CanvasOptions {
|
|
|
1331
1393
|
color?: string;
|
|
1332
1394
|
/** Positive finite width smaller than both plot dimensions. Defaults to 1. */
|
|
1333
1395
|
lineWidth?: number;
|
|
1396
|
+
/** Paint this border before ordinary marks. Defaults to false. */
|
|
1397
|
+
underlay?: boolean;
|
|
1334
1398
|
};
|
|
1335
1399
|
}
|
|
1336
1400
|
|
|
@@ -1353,12 +1417,16 @@ export type RotationUnit = "radians" | "degrees";
|
|
|
1353
1417
|
export type RotationInput = number | { value: number; unit: RotationUnit };
|
|
1354
1418
|
type ValueFormatDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
1355
1419
|
type ValueFormatPrecision = ValueFormatDigit | 10 | 11 | 12 | `0${ValueFormatDigit}`;
|
|
1356
|
-
type TimeAxisDirective = "Y" | "m" | "d" | "b" | "H" | "M" | "S" | "L";
|
|
1357
|
-
export type NumericFormatString =
|
|
1420
|
+
type TimeAxisDirective = "Y" | "m" | "d" | "b" | "a" | "H" | "M" | "S" | "L";
|
|
1421
|
+
export type NumericFormatString =
|
|
1422
|
+
| `.${ValueFormatPrecision}${"f" | "%" | "e"}`
|
|
1423
|
+
| ","
|
|
1424
|
+
| `,.${ValueFormatPrecision}f`;
|
|
1358
1425
|
export type UtcFormatString = `${string}%${TimeAxisDirective}${string}`;
|
|
1359
1426
|
export type ValueFormat = "auto" | NumericFormatString | UtcFormatString;
|
|
1360
1427
|
export type AxisFormatString = NumericFormatString | UtcFormatString;
|
|
1361
1428
|
export type AxisFormat =
|
|
1429
|
+
| "ticks"
|
|
1362
1430
|
| ValueFormat
|
|
1363
1431
|
| { decimals: number };
|
|
1364
1432
|
export type AxisValue = string | boolean | number;
|
|
@@ -1412,12 +1480,14 @@ export interface AxisLabelLayoutOptions {
|
|
|
1412
1480
|
/** Defaults to error; allow stores an intentional label-label overlap policy. */
|
|
1413
1481
|
overlap?: "error" | "allow";
|
|
1414
1482
|
}
|
|
1483
|
+
export type AxisTickRounding = "ceiling" | "nearest";
|
|
1415
1484
|
export interface AxisTicksAndLabelsOptions<P extends string> {
|
|
1416
1485
|
/** Axis resource identity; omission prefers canonical, then a unique named owner. */
|
|
1417
1486
|
target?: string;
|
|
1418
1487
|
scale?: string;
|
|
1419
1488
|
position?: P;
|
|
1420
1489
|
count?: number;
|
|
1490
|
+
rounding?: AxisTickRounding;
|
|
1421
1491
|
values?: readonly AxisValue[];
|
|
1422
1492
|
ticks?: CartesianAxisTickStyleOptions;
|
|
1423
1493
|
labels?: CartesianAxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
|
|
@@ -1428,6 +1498,8 @@ export interface AxisTitleOptions<P extends string> {
|
|
|
1428
1498
|
/** Signed logical pixels: positive right for x, down for y, independent of scale reversal. */
|
|
1429
1499
|
alongOffset?: number;
|
|
1430
1500
|
align?: "left" | "center" | "right";
|
|
1501
|
+
/** Defaults to error; allow permits only this title to intersect its own axis labels. */
|
|
1502
|
+
overlap?: "error" | "allow";
|
|
1431
1503
|
baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
|
|
1432
1504
|
/** Hard breaks retain ordered lines with the chosen block baseline, spaced at 1.2 times fontSize. */
|
|
1433
1505
|
text?: string;
|
|
@@ -1443,6 +1515,8 @@ export interface AxisTitleOptions<P extends string> {
|
|
|
1443
1515
|
fontWeight?: string | number;
|
|
1444
1516
|
}
|
|
1445
1517
|
export interface CompleteAxisOptions<P extends string> {
|
|
1518
|
+
/** Paint the complete Cartesian axis before ordinary marks. Defaults to false. */
|
|
1519
|
+
underlay?: boolean;
|
|
1446
1520
|
/** Omission retains the canonical x/y identity. */
|
|
1447
1521
|
id?: string;
|
|
1448
1522
|
/** Non-negative outward displacement of the complete axis frame in logical pixels. */
|
|
@@ -1472,6 +1546,7 @@ export interface AxisTickOptions<P extends string>
|
|
|
1472
1546
|
scale?: string;
|
|
1473
1547
|
position?: P;
|
|
1474
1548
|
count?: number;
|
|
1549
|
+
rounding?: AxisTickRounding;
|
|
1475
1550
|
values?: readonly AxisValue[];
|
|
1476
1551
|
}
|
|
1477
1552
|
/** 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 +1557,7 @@ export interface AxisLabelOptions<P extends string>
|
|
|
1482
1557
|
scale?: string;
|
|
1483
1558
|
position?: P;
|
|
1484
1559
|
count?: number;
|
|
1560
|
+
rounding?: AxisTickRounding;
|
|
1485
1561
|
values?: readonly AxisValue[];
|
|
1486
1562
|
}
|
|
1487
1563
|
|
|
@@ -1804,6 +1880,11 @@ export type EditCoordinateOptions = EditCoordinateTarget & (
|
|
|
1804
1880
|
|
|
1805
1881
|
export type RadialMapping = "area" | "radius-length";
|
|
1806
1882
|
|
|
1883
|
+
/** Automatic linear position-domain rounding density, not a guide tick count. */
|
|
1884
|
+
export interface LinearNiceCountOptions {
|
|
1885
|
+
readonly count: number;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1807
1888
|
export interface ScaleOptions {
|
|
1808
1889
|
radialMapping?: RadialMapping;
|
|
1809
1890
|
id?: string;
|
|
@@ -1811,7 +1892,7 @@ export interface ScaleOptions {
|
|
|
1811
1892
|
domain?: "auto" | readonly unknown[];
|
|
1812
1893
|
emptyDomain?: "preserve" | "require-explicit";
|
|
1813
1894
|
range?: ScaleRange;
|
|
1814
|
-
nice?: boolean;
|
|
1895
|
+
nice?: boolean | LinearNiceCountOptions;
|
|
1815
1896
|
zero?: boolean;
|
|
1816
1897
|
clamp?: boolean;
|
|
1817
1898
|
reverse?: boolean;
|
|
@@ -1825,6 +1906,7 @@ export interface ScaleOptions {
|
|
|
1825
1906
|
palette?: Palette;
|
|
1826
1907
|
interpolate?: ContinuousColorInterpolation;
|
|
1827
1908
|
whitePoint?: "d65" | "d50";
|
|
1909
|
+
/** Finite Cubehelix lightness gamma, including zero and negative values. Defaults to 1. */
|
|
1828
1910
|
gamma?: number;
|
|
1829
1911
|
midpoint?: number | "auto";
|
|
1830
1912
|
unknown?: unknown;
|
|
@@ -1834,25 +1916,31 @@ export type QuantitativePositionScaleType =
|
|
|
1834
1916
|
| "linear" | "log" | "pow" | "sqrt" | "symlog";
|
|
1835
1917
|
type ScaleFields<Keys extends keyof ScaleOptions> = Pick<ScaleOptions, Keys>;
|
|
1836
1918
|
export type NonPointQuantitativePositionScaleOptions = ScaleFields<
|
|
1837
|
-
"id" | "
|
|
1919
|
+
"id" | "zero" | "clamp" | "reverse" |
|
|
1838
1920
|
"base" | "exponent" | "constant"
|
|
1839
1921
|
> & {
|
|
1840
|
-
type?: QuantitativePositionScaleType;
|
|
1841
1922
|
domain?: "auto" | readonly [number, number];
|
|
1842
1923
|
range?: "auto" | readonly [number, number];
|
|
1843
|
-
}
|
|
1924
|
+
} & (
|
|
1925
|
+
| { type?: "linear"; nice?: boolean | LinearNiceCountOptions }
|
|
1926
|
+
| { type: Exclude<QuantitativePositionScaleType, "linear">; nice?: boolean }
|
|
1927
|
+
);
|
|
1844
1928
|
export type QuantitativePositionScaleOptions =
|
|
1845
1929
|
NonPointQuantitativePositionScaleOptions & { unknown?: number };
|
|
1846
1930
|
export type ZeroSupportingPositionScaleType =
|
|
1847
1931
|
| "linear" | "pow" | "sqrt" | "symlog";
|
|
1848
1932
|
export type NonPointZeroSupportingPositionScaleOptions = Omit<
|
|
1849
1933
|
NonPointQuantitativePositionScaleOptions,
|
|
1850
|
-
"base" | "type"
|
|
1851
|
-
> &
|
|
1934
|
+
"base" | "type" | "nice"
|
|
1935
|
+
> & (
|
|
1936
|
+
| { type?: "linear"; nice?: boolean | LinearNiceCountOptions }
|
|
1937
|
+
| { type: Exclude<ZeroSupportingPositionScaleType, "linear">; nice?: boolean }
|
|
1938
|
+
);
|
|
1852
1939
|
export type NonPointTemporalPositionScaleOptions = ScaleFields<
|
|
1853
|
-
"id" | "
|
|
1940
|
+
"id" | "clamp" | "reverse"
|
|
1854
1941
|
> & {
|
|
1855
1942
|
type?: "time";
|
|
1943
|
+
nice?: boolean;
|
|
1856
1944
|
domain?: "auto" | readonly [number, number];
|
|
1857
1945
|
range?: "auto" | readonly [number, number];
|
|
1858
1946
|
};
|
|
@@ -1968,7 +2056,7 @@ export interface EditScaleOptions {
|
|
|
1968
2056
|
domain?: "auto" | readonly unknown[];
|
|
1969
2057
|
emptyDomain?: "preserve" | "require-explicit";
|
|
1970
2058
|
range?: ScaleRange;
|
|
1971
|
-
nice?: boolean;
|
|
2059
|
+
nice?: boolean | LinearNiceCountOptions;
|
|
1972
2060
|
zero?: boolean;
|
|
1973
2061
|
clamp?: boolean;
|
|
1974
2062
|
reverse?: boolean;
|
|
@@ -1982,6 +2070,7 @@ export interface EditScaleOptions {
|
|
|
1982
2070
|
palette?: Palette;
|
|
1983
2071
|
interpolate?: ContinuousColorInterpolation;
|
|
1984
2072
|
whitePoint?: "d65" | "d50" | "auto";
|
|
2073
|
+
/** Finite Cubehelix lightness gamma; auto restores 1. */
|
|
1985
2074
|
gamma?: number | "auto";
|
|
1986
2075
|
midpoint?: number | "auto";
|
|
1987
2076
|
unknown?: unknown;
|
|
@@ -2054,7 +2143,8 @@ export type EditSizeScaleOptions = FocusedScaleSelection &
|
|
|
2054
2143
|
export type EditOpacityScaleOptions = FocusedScaleSelection & WithoutScaleId<OpacityScaleOptions>;
|
|
2055
2144
|
export type EditShapeScaleOptions = FocusedScaleSelection & WithoutScaleId<ShapeScaleOptions>;
|
|
2056
2145
|
export type EditStrokeWidthScaleOptions = FocusedScaleSelection & WithoutScaleId<StrokeWidthScaleOptions>;
|
|
2057
|
-
export type EditStrokeDashScaleOptions = FocusedScaleSelection &
|
|
2146
|
+
export type EditStrokeDashScaleOptions = FocusedScaleSelection &
|
|
2147
|
+
Omit<WithoutScaleId<DashScaleOptions>, "unknown"> & { unknown?: DashStyle | DashPattern | undefined };
|
|
2058
2148
|
|
|
2059
2149
|
interface PositionEncodingBase {
|
|
2060
2150
|
field: string;
|
|
@@ -2226,26 +2316,25 @@ export type SecondaryPositionEncodingOptions =
|
|
|
2226
2316
|
| { datum: unknown; field?: never; fieldType?: "quantitative"; target?: string; scale?: { id?: string }; coordinate?: string }
|
|
2227
2317
|
| ({ field: string; datum?: never; target?: string; scale?: { id?: string }; coordinate?: string } & TemporalBindingBranch);
|
|
2228
2318
|
|
|
2229
|
-
type
|
|
2319
|
+
type QuantitativeRangePositionEncodingOptions = {
|
|
2320
|
+
lower: string | { datum: number };
|
|
2321
|
+
upper: string | { datum: number };
|
|
2230
2322
|
target?: string;
|
|
2231
2323
|
coordinate?: string;
|
|
2232
2324
|
fieldType?: "quantitative";
|
|
2233
2325
|
temporalUnit?: never;
|
|
2234
2326
|
scale?: NonPointQuantitativePositionScaleOptions;
|
|
2235
|
-
}
|
|
2236
|
-
| { lower: string; upper: { datum: number } }
|
|
2237
|
-
| { lower: { datum: number }; upper: string }
|
|
2238
|
-
);
|
|
2327
|
+
};
|
|
2239
2328
|
|
|
2240
|
-
type RangePositionEncodingOptions =
|
|
2329
|
+
type RangePositionEncodingOptions = QuantitativeRangePositionEncodingOptions | {
|
|
2241
2330
|
lower: string;
|
|
2242
2331
|
upper: string;
|
|
2243
2332
|
target?: string;
|
|
2244
2333
|
coordinate?: string;
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2334
|
+
fieldType: "temporal";
|
|
2335
|
+
temporalUnit?: TemporalInputUnit;
|
|
2336
|
+
scale?: NonPointTemporalPositionScaleOptions;
|
|
2337
|
+
};
|
|
2249
2338
|
|
|
2250
2339
|
export type HistogramEncodingOptions = {
|
|
2251
2340
|
field: string;
|
|
@@ -2271,6 +2360,8 @@ export interface CategoricalEncodingOptions {
|
|
|
2271
2360
|
fieldType?: "nominal" | "ordinal";
|
|
2272
2361
|
scale?: CategoricalColorScaleOptions;
|
|
2273
2362
|
palette?: Palette;
|
|
2363
|
+
/** Aggregate bars default to overlay for their category field, otherwise group;
|
|
2364
|
+
* existing groups and stored or explicit layouts take precedence. */
|
|
2274
2365
|
layout?: ColorLayout;
|
|
2275
2366
|
}
|
|
2276
2367
|
|
|
@@ -2463,6 +2554,18 @@ export interface FoldDataOutputFields {
|
|
|
2463
2554
|
key?: string;
|
|
2464
2555
|
value?: string;
|
|
2465
2556
|
}
|
|
2557
|
+
export interface FlattenDataOptions {
|
|
2558
|
+
id: string;
|
|
2559
|
+
source?: string;
|
|
2560
|
+
fields: readonly string[];
|
|
2561
|
+
as?: readonly string[];
|
|
2562
|
+
}
|
|
2563
|
+
export interface LookupDataOptions {
|
|
2564
|
+
id: string;
|
|
2565
|
+
source?: string;
|
|
2566
|
+
field: string;
|
|
2567
|
+
lookup: { data: string; key: string; fields: readonly string[]; as?: readonly string[] };
|
|
2568
|
+
}
|
|
2466
2569
|
export interface FoldDataOptions {
|
|
2467
2570
|
id: string;
|
|
2468
2571
|
source?: string;
|
|
@@ -2615,6 +2718,8 @@ export type EditFilteredDataOptions = FilterModePatch & {
|
|
|
2615
2718
|
nulls?: "include" | "exclude" | false;
|
|
2616
2719
|
dependents?: DerivedDataDependents;
|
|
2617
2720
|
};
|
|
2721
|
+
export type EditFlattenDataOptions = FocusedDerivedDataEdit<FlattenDataOptions>;
|
|
2722
|
+
export type EditLookupDataOptions = FocusedDerivedDataEdit<LookupDataOptions>;
|
|
2618
2723
|
export type EditFoldDataOptions = FocusedDerivedDataEdit<FoldDataOptions>;
|
|
2619
2724
|
export type EditSummaryDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2620
2725
|
SummaryDataOptions,
|
|
@@ -2765,6 +2870,12 @@ export interface BoxPlotOptions {
|
|
|
2765
2870
|
x?: BoxPlotPositionChannel;
|
|
2766
2871
|
y?: BoxPlotPositionChannel;
|
|
2767
2872
|
coordinate?: string;
|
|
2873
|
+
color?: string | {
|
|
2874
|
+
field: string;
|
|
2875
|
+
fieldType?: "nominal" | "ordinal";
|
|
2876
|
+
scale?: NonPointCategoricalColorScaleOptions;
|
|
2877
|
+
palette?: Palette;
|
|
2878
|
+
} | { value: string };
|
|
2768
2879
|
whisker?: BoxPlotWhisker;
|
|
2769
2880
|
width?: BoxPlotWidth;
|
|
2770
2881
|
outliers?: boolean;
|
|
@@ -2842,6 +2953,7 @@ export interface GradientPlotOptions {
|
|
|
2842
2953
|
x?: GradientPlotPositionChannel;
|
|
2843
2954
|
y?: GradientPlotPositionChannel;
|
|
2844
2955
|
coordinate?: string;
|
|
2956
|
+
color?: BasicColorChannel | { value: string };
|
|
2845
2957
|
density?: GradientPlotDensityOptions;
|
|
2846
2958
|
width?: { band?: number };
|
|
2847
2959
|
gradient?: GradientPlotAppearanceOptions;
|
|
@@ -2993,6 +3105,7 @@ type BandPositionChannel = FacadePositionChannel<
|
|
|
2993
3105
|
NonPointTemporalPositionScaleOptions,
|
|
2994
3106
|
NonPointBandPositionScaleOptions
|
|
2995
3107
|
>;
|
|
3108
|
+
/** With binned quantitative X, aggregate Y per exact interval (and optional series). */
|
|
2996
3109
|
type BarYPositionChannel =
|
|
2997
3110
|
| string
|
|
2998
3111
|
| {
|
|
@@ -3060,12 +3173,12 @@ type HistogramCategoricalColorChannel =
|
|
|
3060
3173
|
palette?: Palette;
|
|
3061
3174
|
layout?: Exclude<ColorLayout, "center">;
|
|
3062
3175
|
};
|
|
3063
|
-
type LineCategoricalColorChannel =
|
|
3176
|
+
type LineCategoricalColorChannel<Scale = NonPointCategoricalColorScaleOptions> =
|
|
3064
3177
|
| string
|
|
3065
3178
|
| {
|
|
3066
3179
|
field: string;
|
|
3067
3180
|
fieldType?: "nominal" | "ordinal";
|
|
3068
|
-
scale?:
|
|
3181
|
+
scale?: Scale;
|
|
3069
3182
|
palette?: Palette;
|
|
3070
3183
|
};
|
|
3071
3184
|
type QuantitativeBarColorChannel = {
|
|
@@ -3118,6 +3231,10 @@ export type BasicStrokeDashChannel =
|
|
|
3118
3231
|
? T extends unknown ? Omit<T, "target"> : never
|
|
3119
3232
|
: never;
|
|
3120
3233
|
|
|
3234
|
+
type NonCartesianStrokeDashChannel = BasicStrokeDashChannel extends infer T
|
|
3235
|
+
? T extends { field: string } ? Omit<T, "scale"> & { scale?: Omit<DashScaleOptions, "unknown"> } : T
|
|
3236
|
+
: never;
|
|
3237
|
+
|
|
3121
3238
|
export type ParallelMissingPolicy = "break" | "drop-row" | "error";
|
|
3122
3239
|
export type ParallelDimension = string | ({
|
|
3123
3240
|
field: string;
|
|
@@ -3153,7 +3270,7 @@ export interface CreateParallelCoordinatesOptions {
|
|
|
3153
3270
|
key?: string;
|
|
3154
3271
|
missing?: ParallelMissingPolicy;
|
|
3155
3272
|
color?: LineCategoricalColorChannel;
|
|
3156
|
-
strokeDash?:
|
|
3273
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3157
3274
|
line?: StrokeStyleDetails & {
|
|
3158
3275
|
strokeWidth?: number;
|
|
3159
3276
|
stroke?: string;
|
|
@@ -3165,6 +3282,8 @@ export interface CreateParallelCoordinatesOptions {
|
|
|
3165
3282
|
}
|
|
3166
3283
|
|
|
3167
3284
|
export interface CreateScatterPlotOptions {
|
|
3285
|
+
/** Forward the native mark missing-value policy. */
|
|
3286
|
+
missing?: "error" | "skip";
|
|
3168
3287
|
id?: string;
|
|
3169
3288
|
data?: string;
|
|
3170
3289
|
coordinate?: string;
|
|
@@ -3175,6 +3294,7 @@ export interface CreateScatterPlotOptions {
|
|
|
3175
3294
|
size?: BasicSizeChannel;
|
|
3176
3295
|
shape?: BasicShapeChannel;
|
|
3177
3296
|
point?: StrokeStyleDetails & {
|
|
3297
|
+
clip?: boolean;
|
|
3178
3298
|
radius?: number;
|
|
3179
3299
|
shape?: PointShape;
|
|
3180
3300
|
fill?: string;
|
|
@@ -3278,7 +3398,7 @@ export interface CreateLollipopPlotOptions extends EndpointPlotBaseOptions {
|
|
|
3278
3398
|
value: EndpointValueChannel;
|
|
3279
3399
|
baseline?: number;
|
|
3280
3400
|
point?: CreateScatterPlotOptions["point"];
|
|
3281
|
-
stem?: RuleStyleOptions;
|
|
3401
|
+
stem?: RuleStyleOptions & { clip?: boolean };
|
|
3282
3402
|
labels?: false | EndpointLabelOptions;
|
|
3283
3403
|
}
|
|
3284
3404
|
export interface CreateDumbbellPlotOptions extends EndpointPlotBaseOptions {
|
|
@@ -3286,7 +3406,7 @@ export interface CreateDumbbellPlotOptions extends EndpointPlotBaseOptions {
|
|
|
3286
3406
|
end: EndpointValueChannel;
|
|
3287
3407
|
startPoint?: CreateScatterPlotOptions["point"];
|
|
3288
3408
|
endPoint?: CreateScatterPlotOptions["point"];
|
|
3289
|
-
connector?: RuleStyleOptions;
|
|
3409
|
+
connector?: RuleStyleOptions & { clip?: boolean };
|
|
3290
3410
|
labels?: false | (EndpointLabelOptions & { endpoint?: "start" | "end" | "both" });
|
|
3291
3411
|
}
|
|
3292
3412
|
export type EditEndpointPlotOptions = { target?: string } & Partial<Pick<
|
|
@@ -3307,7 +3427,7 @@ export interface CreateECDFPlotOptions {
|
|
|
3307
3427
|
missing?: "drop" | "error";
|
|
3308
3428
|
as?: ECDFOutputFields;
|
|
3309
3429
|
color?: string | LineCategoricalColorChannel;
|
|
3310
|
-
line?: StrokeStyleDetails & { strokeWidth?: number; stroke?: string; opacity?: number };
|
|
3430
|
+
line?: StrokeStyleDetails & { clip?: boolean; strokeWidth?: number; stroke?: string; opacity?: number };
|
|
3311
3431
|
labels?: false | EndpointLabelOptions;
|
|
3312
3432
|
guides?: false | CartesianPathGuideOptions;
|
|
3313
3433
|
}
|
|
@@ -3358,7 +3478,7 @@ export interface CreatePolarScatterPlotOptions {
|
|
|
3358
3478
|
color?: BasicColorChannel;
|
|
3359
3479
|
size?: BasicSizeChannel;
|
|
3360
3480
|
shape?: BasicShapeChannel;
|
|
3361
|
-
point?: CreateScatterPlotOptions["point"]
|
|
3481
|
+
point?: Omit<NonNullable<CreateScatterPlotOptions["point"]>, "clip">;
|
|
3362
3482
|
guides?: false | PolarPointGuideOptions;
|
|
3363
3483
|
}
|
|
3364
3484
|
export interface CreatePolarLinePlotOptions {
|
|
@@ -3369,8 +3489,8 @@ export interface CreatePolarLinePlotOptions {
|
|
|
3369
3489
|
radius: PolarRadiusChannel;
|
|
3370
3490
|
color?: LineCategoricalColorChannel;
|
|
3371
3491
|
groupBy?: string | readonly [string, ...string[]];
|
|
3372
|
-
strokeDash?:
|
|
3373
|
-
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
|
|
3492
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3493
|
+
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "clip" | "missing" | "closed" | "curve" | "tension"> & {
|
|
3374
3494
|
curve?: "linear";
|
|
3375
3495
|
closed?: boolean;
|
|
3376
3496
|
};
|
|
@@ -3435,8 +3555,8 @@ export type CreateRadarPlotOptions = {
|
|
|
3435
3555
|
...RadarCategoryValue[]
|
|
3436
3556
|
];
|
|
3437
3557
|
color?: LineCategoricalColorChannel;
|
|
3438
|
-
strokeDash?:
|
|
3439
|
-
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "closed" | "curve" | "tension"> & {
|
|
3558
|
+
strokeDash?: NonCartesianStrokeDashChannel;
|
|
3559
|
+
line?: Omit<NonNullable<CreateLinePlotOptions["line"]>, "clip" | "missing" | "closed" | "curve" | "tension"> & {
|
|
3440
3560
|
curve?: "linear";
|
|
3441
3561
|
closed?: true;
|
|
3442
3562
|
};
|
|
@@ -3445,6 +3565,10 @@ export type CreateRadarPlotOptions = {
|
|
|
3445
3565
|
| { category: RadarCategoryChannel; value: PolarRadiusChannel; wide?: never }
|
|
3446
3566
|
| { wide: RadarWideOptions; category?: never; value?: never }
|
|
3447
3567
|
);
|
|
3568
|
+
export interface EditRadarPlotOptions {
|
|
3569
|
+
target?: string;
|
|
3570
|
+
wide: { fields: readonly [string, string, ...string[]] };
|
|
3571
|
+
}
|
|
3448
3572
|
export type RugMeasureChannel = string | (
|
|
3449
3573
|
| {
|
|
3450
3574
|
field: string;
|
|
@@ -3460,6 +3584,7 @@ export type RugMeasureChannel = string | (
|
|
|
3460
3584
|
}
|
|
3461
3585
|
);
|
|
3462
3586
|
export interface RugTickOptions extends StrokeStyleDetails {
|
|
3587
|
+
clip?: boolean;
|
|
3463
3588
|
length?: number;
|
|
3464
3589
|
stroke?: string;
|
|
3465
3590
|
strokeWidth?: number;
|
|
@@ -3512,6 +3637,7 @@ export type CreateStripPlotOptions = {
|
|
|
3512
3637
|
size?: BasicSizeChannel;
|
|
3513
3638
|
shape?: BasicShapeChannel;
|
|
3514
3639
|
point?: StrokeStyleDetails & {
|
|
3640
|
+
clip?: boolean;
|
|
3515
3641
|
radius?: number;
|
|
3516
3642
|
shape?: PointShape;
|
|
3517
3643
|
fill?: string;
|
|
@@ -3539,6 +3665,7 @@ export type CreateBeeswarmPlotOptions = {
|
|
|
3539
3665
|
size?: BasicSizeChannel;
|
|
3540
3666
|
shape?: BasicShapeChannel;
|
|
3541
3667
|
point?: StrokeStyleDetails & {
|
|
3668
|
+
clip?: boolean;
|
|
3542
3669
|
radius?: number;
|
|
3543
3670
|
shape?: PointShape;
|
|
3544
3671
|
fill?: string;
|
|
@@ -3604,6 +3731,7 @@ export type RaincloudValueChannel = string | {
|
|
|
3604
3731
|
fieldType?: "quantitative";
|
|
3605
3732
|
scale?: NonPointQuantitativePositionScaleOptions;
|
|
3606
3733
|
};
|
|
3734
|
+
export type RaincloudColorChannel = LineCategoricalColorChannel | { value: string };
|
|
3607
3735
|
export interface CreateRaincloudPlotOptions {
|
|
3608
3736
|
id?: string;
|
|
3609
3737
|
data?: string;
|
|
@@ -3615,7 +3743,7 @@ export interface CreateRaincloudPlotOptions {
|
|
|
3615
3743
|
density?: false | RaincloudDensityOptions;
|
|
3616
3744
|
summary?: false | RaincloudSummaryOptions;
|
|
3617
3745
|
points?: false | RaincloudPointsOptions;
|
|
3618
|
-
color?:
|
|
3746
|
+
color?: false | RaincloudColorChannel;
|
|
3619
3747
|
guides?: false | CartesianCategoricalPointGuideOptions;
|
|
3620
3748
|
}
|
|
3621
3749
|
export interface EditRaincloudPlotOptions {
|
|
@@ -3628,7 +3756,7 @@ export interface EditRaincloudPlotOptions {
|
|
|
3628
3756
|
density?: false | RaincloudDensityOptions;
|
|
3629
3757
|
summary?: false | RaincloudSummaryOptions;
|
|
3630
3758
|
points?: false | RaincloudPointsOptions;
|
|
3631
|
-
color?: false |
|
|
3759
|
+
color?: false | RaincloudColorChannel;
|
|
3632
3760
|
}
|
|
3633
3761
|
|
|
3634
3762
|
export type GroupEncodingOptions = { target?: string; fieldType?: "nominal" } & (
|
|
@@ -3653,7 +3781,7 @@ export type CreateAreaPlotOptions = {
|
|
|
3653
3781
|
groupBy?: string | readonly [string, ...string[]];
|
|
3654
3782
|
layout?: Exclude<ColorLayout, "group">; missing?: "error" | "break";
|
|
3655
3783
|
color?: string | { field: string; fieldType?: "nominal" | "ordinal"; scale?: NonPointCategoricalColorScaleOptions; palette?: Palette };
|
|
3656
|
-
area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3784
|
+
area?: StrokeStyleDetails & { clip?: boolean; fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3657
3785
|
guides?: false | (Omit<DensityPlotGuideOptions, "grid"> & { grid?: false | CartesianGridOptions });
|
|
3658
3786
|
} & (
|
|
3659
3787
|
| { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: number }
|
|
@@ -3668,10 +3796,12 @@ export interface CreateLinePlotOptions {
|
|
|
3668
3796
|
coordinate?: string;
|
|
3669
3797
|
x: LineXPositionChannel;
|
|
3670
3798
|
y: LineYPositionChannel;
|
|
3671
|
-
color?: LineCategoricalColorChannel
|
|
3799
|
+
color?: LineCategoricalColorChannel<CategoricalColorScaleOptions>;
|
|
3672
3800
|
groupBy?: string | readonly [string, ...string[]];
|
|
3673
3801
|
strokeDash?: BasicStrokeDashChannel;
|
|
3674
3802
|
line?: StrokeStyleDetails & {
|
|
3803
|
+
clip?: boolean;
|
|
3804
|
+
missing?: "error" | "break";
|
|
3675
3805
|
strokeWidth?: number;
|
|
3676
3806
|
curve?: CurveInterpolation;
|
|
3677
3807
|
tension?: number;
|
|
@@ -3721,6 +3851,8 @@ type BarRangeOppositePositionChannel = string | {
|
|
|
3721
3851
|
stack?: never;
|
|
3722
3852
|
};
|
|
3723
3853
|
export type CreateBarPlotOptions = {
|
|
3854
|
+
/** Forward the native mark missing-value policy. */
|
|
3855
|
+
missing?: "error" | "skip";
|
|
3724
3856
|
id?: string;
|
|
3725
3857
|
data?: string;
|
|
3726
3858
|
coordinate?: string;
|
|
@@ -3728,6 +3860,7 @@ export type CreateBarPlotOptions = {
|
|
|
3728
3860
|
color?: BarColorChannel;
|
|
3729
3861
|
width?: Omit<BarWidthOptions, "target" | "interval">;
|
|
3730
3862
|
bar?: RectStyleDetails & {
|
|
3863
|
+
clip?: boolean;
|
|
3731
3864
|
fill?: FillPaint;
|
|
3732
3865
|
opacity?: number;
|
|
3733
3866
|
stroke?: FilledMarkStroke;
|
|
@@ -3747,6 +3880,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
|
3747
3880
|
field: string;
|
|
3748
3881
|
color?: HistogramCategoricalColorChannel;
|
|
3749
3882
|
bar?: RectStyleDetails & {
|
|
3883
|
+
clip?: boolean;
|
|
3750
3884
|
fill?: FillPaint;
|
|
3751
3885
|
opacity?: number;
|
|
3752
3886
|
stroke?: FilledMarkStroke;
|
|
@@ -3777,7 +3911,7 @@ export interface CreateHorizonPlotOptions {
|
|
|
3777
3911
|
missing?: HorizonMissingPolicy;
|
|
3778
3912
|
overflow?: HorizonOverflowPolicy;
|
|
3779
3913
|
palette?: HorizonPaletteOptions;
|
|
3780
|
-
area?: StrokeStyleDetails & { opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3914
|
+
area?: StrokeStyleDetails & { clip?: boolean; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3781
3915
|
guides?: false | HorizonPlotGuideOptions;
|
|
3782
3916
|
}
|
|
3783
3917
|
|
|
@@ -3809,7 +3943,7 @@ export interface CreateDensityPlotOptions {
|
|
|
3809
3943
|
palette?: Palette;
|
|
3810
3944
|
layout?: "overlay";
|
|
3811
3945
|
};
|
|
3812
|
-
area?: StrokeStyleDetails & { fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3946
|
+
area?: StrokeStyleDetails & { clip?: boolean; fill?: FillPaint; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3813
3947
|
guides?: false | DensityPlotGuideOptions;
|
|
3814
3948
|
}
|
|
3815
3949
|
|
|
@@ -3866,6 +4000,7 @@ export interface HeatmapBaseOptions {
|
|
|
3866
4000
|
data?: string;
|
|
3867
4001
|
coordinate?: string;
|
|
3868
4002
|
rect?: RectStyleDetails & {
|
|
4003
|
+
clip?: boolean;
|
|
3869
4004
|
opacity?: number;
|
|
3870
4005
|
stroke?: string | false;
|
|
3871
4006
|
strokeWidth?: number;
|
|
@@ -4046,6 +4181,7 @@ export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
|
|
|
4046
4181
|
export type TextFormat = ValueFormat;
|
|
4047
4182
|
|
|
4048
4183
|
export interface TextMarkOptions {
|
|
4184
|
+
clip?: boolean;
|
|
4049
4185
|
/** Logical-pixel baseline spacing; defaults to 1.2 times fontSize. */
|
|
4050
4186
|
lineHeight?: number;
|
|
4051
4187
|
/** Anchor the first line or center the complete multiline block. */
|
|
@@ -4119,6 +4255,7 @@ export interface RemoveLabelLayoutOptions {
|
|
|
4119
4255
|
}
|
|
4120
4256
|
|
|
4121
4257
|
export interface RectMarkOptions extends RectStyleDetails {
|
|
4258
|
+
clip?: boolean;
|
|
4122
4259
|
id?: string;
|
|
4123
4260
|
data?: string;
|
|
4124
4261
|
missing?: "error" | "skip";
|
|
@@ -4256,6 +4393,7 @@ export interface DashScaleOptions {
|
|
|
4256
4393
|
type?: "ordinal";
|
|
4257
4394
|
domain?: "auto" | readonly unknown[];
|
|
4258
4395
|
range?: "auto" | readonly (DashStyle | DashPattern)[];
|
|
4396
|
+
unknown?: DashStyle | DashPattern;
|
|
4259
4397
|
}
|
|
4260
4398
|
|
|
4261
4399
|
export type StrokeDashEncodingOptions =
|
|
@@ -4263,7 +4401,7 @@ export type StrokeDashEncodingOptions =
|
|
|
4263
4401
|
field: string;
|
|
4264
4402
|
value?: never;
|
|
4265
4403
|
target?: string;
|
|
4266
|
-
fieldType?: "nominal";
|
|
4404
|
+
fieldType?: "nominal" | "ordinal";
|
|
4267
4405
|
scale?: DashScaleOptions;
|
|
4268
4406
|
}
|
|
4269
4407
|
| {
|
|
@@ -4280,11 +4418,8 @@ export type NonPointContinuousColorScaleOptions = ScaleFields<
|
|
|
4280
4418
|
base?: number;
|
|
4281
4419
|
constant?: number;
|
|
4282
4420
|
domain?: "auto" | readonly [unknown, unknown];
|
|
4283
|
-
range?: "auto" | readonly [string, string, ...string[]];
|
|
4284
|
-
palette?:
|
|
4285
|
-
name: PaletteName;
|
|
4286
|
-
extent?: readonly [number, number];
|
|
4287
|
-
};
|
|
4421
|
+
range?: "auto" | readonly [string, string, ...string[]] | { readonly palette: Palette };
|
|
4422
|
+
palette?: Palette;
|
|
4288
4423
|
} & (
|
|
4289
4424
|
| { type: "pow"; exponent?: number }
|
|
4290
4425
|
| { type?: "sequential" | "log" | "sqrt" | "symlog"; exponent?: never }
|
|
@@ -4331,12 +4466,16 @@ export type DiscretizedColorScaleOptions =
|
|
|
4331
4466
|
/** Area quantitative color requires one finite value per existing series;
|
|
4332
4467
|
* aggregate, temporal color and unknown fallback remain mark-specific restrictions.
|
|
4333
4468
|
* Area authoring uses the Full facade; createAreaPlot.color stays categorical.
|
|
4469
|
+
* Tick quantitative/temporal color paints its stroke and excludes a simultaneous stroke encoding.
|
|
4334
4470
|
*/
|
|
4335
4471
|
export type ColorEncodingOptions =
|
|
4336
|
-
|
|
|
4472
|
+
| { value: string; target?: string; field?: never; fieldType?: never;
|
|
4473
|
+
scale?: never; palette?: never; layout?: never; aggregate?: never; temporalUnit?: never }
|
|
4474
|
+
| (CategoricalEncodingOptions & { value?: never })
|
|
4337
4475
|
| {
|
|
4338
4476
|
field: string;
|
|
4339
4477
|
target?: string;
|
|
4478
|
+
value?: never;
|
|
4340
4479
|
fieldType: "quantitative";
|
|
4341
4480
|
aggregate?: AggregateOperation;
|
|
4342
4481
|
scale?: ContinuousColorScaleOptions | DiscretizedColorScaleOptions;
|
|
@@ -4346,6 +4485,7 @@ export type ColorEncodingOptions =
|
|
|
4346
4485
|
| {
|
|
4347
4486
|
field: string;
|
|
4348
4487
|
target?: string;
|
|
4488
|
+
value?: never;
|
|
4349
4489
|
fieldType: "temporal";
|
|
4350
4490
|
temporalUnit?: TemporalInputUnit;
|
|
4351
4491
|
aggregate?: never;
|
|
@@ -4391,14 +4531,16 @@ export type StrokeEncodingOptions =
|
|
|
4391
4531
|
};
|
|
4392
4532
|
|
|
4393
4533
|
export type OpacityScaleOptions = ScaleFields<
|
|
4394
|
-
"id" | "
|
|
4534
|
+
"id" | "zero" | "clamp" | "reverse"
|
|
4395
4535
|
> & {
|
|
4536
|
+
nice?: boolean;
|
|
4396
4537
|
type?: "linear";
|
|
4397
4538
|
domain?: "auto" | readonly [number, number];
|
|
4398
4539
|
range?: "auto" | readonly [number, number];
|
|
4399
4540
|
unknown?: number;
|
|
4400
4541
|
};
|
|
4401
4542
|
|
|
4543
|
+
/** Constant or quantitative opacity on Point, Rule, Line, Bar, or row-owned Rect marks. */
|
|
4402
4544
|
export type OpacityEncodingOptions =
|
|
4403
4545
|
| { value: number; field?: never; target?: string; fieldType?: never; scale?: never }
|
|
4404
4546
|
| {
|
|
@@ -4409,7 +4551,9 @@ export type OpacityEncodingOptions =
|
|
|
4409
4551
|
scale?: OpacityScaleOptions;
|
|
4410
4552
|
};
|
|
4411
4553
|
|
|
4412
|
-
export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions
|
|
4554
|
+
export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions extends infer T
|
|
4555
|
+
? T extends unknown ? Omit<T, "nice"> & { nice?: boolean } : never
|
|
4556
|
+
: never;
|
|
4413
4557
|
|
|
4414
4558
|
export interface RuleStyleOptions extends StrokeStyleDetails {
|
|
4415
4559
|
stroke?: string;
|
|
@@ -4432,8 +4576,11 @@ type DynamicReferenceBinding = {
|
|
|
4432
4576
|
readonly id?: string;
|
|
4433
4577
|
readonly source: string;
|
|
4434
4578
|
readonly axis: "x" | "y";
|
|
4579
|
+
/** Distribution/endpoint measurement axes and quantitative Horizon X use original bound observations, retaining multiplicity. Horizon folded Y is unsupported. */
|
|
4435
4580
|
readonly population?: "boundData" | "visibleItems";
|
|
4436
4581
|
readonly field?: string;
|
|
4582
|
+
/** Compute a separate reference for each observed value of this field. */
|
|
4583
|
+
readonly groupBy?: string;
|
|
4437
4584
|
readonly x?: never;
|
|
4438
4585
|
readonly y?: never;
|
|
4439
4586
|
readonly space?: never;
|
|
@@ -4441,18 +4588,26 @@ type DynamicReferenceBinding = {
|
|
|
4441
4588
|
readonly coordinate?: never;
|
|
4442
4589
|
readonly temporalUnit?: never;
|
|
4443
4590
|
};
|
|
4591
|
+
/** A statistical line (mean by default) or an exact two-statistic interval. */
|
|
4592
|
+
export type CreateStatisticalReferenceOptions = DynamicReferenceBinding & (
|
|
4593
|
+
| (RuleStyleOptions & { readonly statistic?: ReferenceStatistic; readonly statistics?: never })
|
|
4594
|
+
| (Omit<RectMarkOptions, "id" | "data" | "source" | "missing"> & {
|
|
4595
|
+
readonly statistics: readonly [ReferenceStatistic, ReferenceStatistic]; readonly statistic?: never;
|
|
4596
|
+
})
|
|
4597
|
+
);
|
|
4444
4598
|
export type CreateReferenceLineOptions =
|
|
4445
4599
|
| ({ id?: string } & RuleStyleOptions & ReferenceBinding<unknown, number>)
|
|
4446
4600
|
| (DynamicReferenceBinding & RuleStyleOptions & {
|
|
4447
4601
|
readonly statistic: ReferenceStatistic;
|
|
4448
4602
|
});
|
|
4449
4603
|
export type CreateReferenceBandOptions =
|
|
4450
|
-
| (Omit<RectMarkOptions, "data"> &
|
|
4604
|
+
| (Omit<RectMarkOptions, "clip" | "data"> &
|
|
4451
4605
|
ReferenceBinding<readonly [unknown, unknown], readonly [number, number]>)
|
|
4452
|
-
| (DynamicReferenceBinding & Omit<RectMarkOptions, "id" | "data" | "source"> & {
|
|
4606
|
+
| (DynamicReferenceBinding & Omit<RectMarkOptions, "clip" | "id" | "data" | "source"> & {
|
|
4453
4607
|
readonly statistics: readonly [ReferenceStatistic, ReferenceStatistic];
|
|
4454
4608
|
});
|
|
4455
4609
|
|
|
4610
|
+
/** Constant or quantitative stroke width on Line, Rule, or row-owned Rect marks. */
|
|
4456
4611
|
export type StrokeWidthEncodingOptions =
|
|
4457
4612
|
| {
|
|
4458
4613
|
value: number;
|
|
@@ -4469,13 +4624,17 @@ export type StrokeWidthEncodingOptions =
|
|
|
4469
4624
|
scale?: StrokeWidthScaleOptions;
|
|
4470
4625
|
};
|
|
4471
4626
|
|
|
4472
|
-
|
|
4627
|
+
/** Constant value and scale ranges are graphical areas in square pixels. */
|
|
4628
|
+
export type SizeEncodingOptions =
|
|
4629
|
+
| { value: number; target?: string; field?: never; fieldType?: never; scale?: never }
|
|
4630
|
+
| ({
|
|
4631
|
+
value?: never;
|
|
4473
4632
|
field: string;
|
|
4474
4633
|
target?: string;
|
|
4475
4634
|
} & (
|
|
4476
4635
|
| { fieldType?: "quantitative"; scale?: SizeScaleOptions }
|
|
4477
4636
|
| { fieldType: "nominal" | "ordinal"; scale?: CategoricalSizeScaleOptions }
|
|
4478
|
-
);
|
|
4637
|
+
));
|
|
4479
4638
|
|
|
4480
4639
|
export type ShapeEncodingOptions = {
|
|
4481
4640
|
field: string;
|
|
@@ -4488,6 +4647,11 @@ export type AngleEncodingOptions =
|
|
|
4488
4647
|
| { target?: string; value: number; field?: never; fieldType?: never }
|
|
4489
4648
|
| { target?: string; field: string; fieldType?: "quantitative"; value?: never };
|
|
4490
4649
|
|
|
4650
|
+
/** Unscaled, signed logical-pixel offsets for independent Text marks. */
|
|
4651
|
+
export type TextOffsetEncodingOptions =
|
|
4652
|
+
| { target?: string; value: number; field?: never }
|
|
4653
|
+
| { target?: string; field: string; value?: never };
|
|
4654
|
+
|
|
4491
4655
|
type WithoutEncodingTarget<T> = T extends unknown
|
|
4492
4656
|
? Omit<T, "target" | "coordinate">
|
|
4493
4657
|
: never;
|
|
@@ -4512,6 +4676,8 @@ export interface EncodingChannelAssignments {
|
|
|
4512
4676
|
strokeDash?: WithoutEncodingTarget<StrokeDashEncodingOptions>;
|
|
4513
4677
|
angle?: WithoutEncodingTarget<AngleEncodingOptions>;
|
|
4514
4678
|
text?: WithoutEncodingTarget<TextEncodingOptions>;
|
|
4679
|
+
dx?: WithoutEncodingTarget<TextOffsetEncodingOptions>;
|
|
4680
|
+
dy?: WithoutEncodingTarget<TextOffsetEncodingOptions>;
|
|
4515
4681
|
}
|
|
4516
4682
|
|
|
4517
4683
|
type AtLeastOne<T> = {
|
|
@@ -4802,7 +4968,7 @@ export interface LegendOptions {
|
|
|
4802
4968
|
/** false hides the title while retaining its inferred field text. */
|
|
4803
4969
|
/** LF, CRLF and CR preserve explicit title lines, including blank lines. */
|
|
4804
4970
|
title?: string | false;
|
|
4805
|
-
/** Exact ascending samples for continuous size, opacity, stroke-width, or color
|
|
4971
|
+
/** Exact ascending samples for continuous size, opacity, stroke-width, color symbols, or color/stroke gradient ticks. Cannot be combined with count. */
|
|
4806
4972
|
values?: readonly number[];
|
|
4807
4973
|
count?: number;
|
|
4808
4974
|
/** Body-only opacity defaults to 1; edits preserve omitted fields. */
|
|
@@ -4813,6 +4979,10 @@ export interface LegendOptions {
|
|
|
4813
4979
|
titleStyle?: LegendTitleStyleOptions;
|
|
4814
4980
|
/** Vertical items default to 18 logical pixels; the pitch grows to fit samples and labels. */
|
|
4815
4981
|
itemGap?: number;
|
|
4982
|
+
/** Non-negative gap between occupied item rows; overrides vertical itemGap pitch. Item legends in edge layout only. */
|
|
4983
|
+
rowPadding?: number;
|
|
4984
|
+
/** Non-negative gap between visible title and body bounds; legacy-bottom is excluded. */
|
|
4985
|
+
titlePadding?: number;
|
|
4816
4986
|
border?: boolean | LegendBorderOptions;
|
|
4817
4987
|
}
|
|
4818
4988
|
|
|
@@ -4857,8 +5027,12 @@ export interface LegendTitleStyleEditOptions extends Omit<LegendTitleStyleOption
|
|
|
4857
5027
|
}
|
|
4858
5028
|
|
|
4859
5029
|
export interface EditLegendOptions
|
|
4860
|
-
extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight"> {
|
|
5030
|
+
extends Omit<LegendOptions, "title" | "values" | "titleStyle" | "direction" | "position" | "clipHeight" | "rowPadding" | "titlePadding"> {
|
|
4861
5031
|
clipHeight?: number | "auto";
|
|
5032
|
+
/** auto removes the row policy and restores the retained itemGap behavior. */
|
|
5033
|
+
rowPadding?: number | "auto";
|
|
5034
|
+
/** auto removes the title/body spacing override. */
|
|
5035
|
+
titlePadding?: number | "auto";
|
|
4862
5036
|
/** Select one existing block; cannot accompany channels. */
|
|
4863
5037
|
channel?: LegendChannel;
|
|
4864
5038
|
/** inherit is allowed only with a singular channel selector. */
|
|
@@ -4896,6 +5070,10 @@ export interface EditLegendLayoutOptions {
|
|
|
4896
5070
|
titlePosition?: "top" | "left" | "bottom";
|
|
4897
5071
|
/** Explicit spacing override; vertical creation defaults to 18 logical pixels. */
|
|
4898
5072
|
itemGap?: number;
|
|
5073
|
+
/** Non-negative occupied-row gap; auto restores the retained legacy pitch. */
|
|
5074
|
+
rowPadding?: number | "auto";
|
|
5075
|
+
/** Non-negative visible-title/body gap; auto restores the family default. */
|
|
5076
|
+
titlePadding?: number | "auto";
|
|
4899
5077
|
}
|
|
4900
5078
|
|
|
4901
5079
|
export interface EditLegendLabelsOptions extends LegendTextOptions {
|
|
@@ -4928,7 +5106,18 @@ export interface EditLegendBorderOptions {
|
|
|
4928
5106
|
border: boolean | LegendBorderOptions;
|
|
4929
5107
|
}
|
|
4930
5108
|
|
|
5109
|
+
/** Omitted/false axes are preserved; component false values remove existing components. */
|
|
5110
|
+
export interface EditAxesOptions {
|
|
5111
|
+
x?: false | EditAxisOptions<XAxisPosition> | readonly [EditAxisOptions<XAxisPosition> & { target: string }, ...(EditAxisOptions<XAxisPosition> & { target: string })[]];
|
|
5112
|
+
y?: false | EditAxisOptions<YAxisPosition> | readonly [EditAxisOptions<YAxisPosition> & { target: string }, ...(EditAxisOptions<YAxisPosition> & { target: string })[]];
|
|
5113
|
+
theta?: false | EditThetaAxisOptions;
|
|
5114
|
+
radius?: false | EditRadialAxisOptions;
|
|
5115
|
+
parallel?: false | EditParallelAxisOptions | readonly [EditParallelAxisOptions, ...EditParallelAxisOptions[]];
|
|
5116
|
+
}
|
|
5117
|
+
|
|
4931
5118
|
export interface EditAxisOptions<P extends string> {
|
|
5119
|
+
/** Omission preserves placement; false restores the ordinary overlay. */
|
|
5120
|
+
underlay?: boolean;
|
|
4932
5121
|
target?: string;
|
|
4933
5122
|
/** Omitted edits preserve the frame; zero restores the plot-edge frame. */
|
|
4934
5123
|
offset?: number;
|
|
@@ -5062,6 +5251,8 @@ export class ChartProgram {
|
|
|
5062
5251
|
createDensityData(options: DensityDataOptions): ChartProgram;
|
|
5063
5252
|
createSummaryData(options: SummaryDataOptions): ChartProgram;
|
|
5064
5253
|
createBinData(options: BinDataOptions): ChartProgram;
|
|
5254
|
+
createFlattenData(options: FlattenDataOptions): ChartProgram;
|
|
5255
|
+
createLookupData(options: LookupDataOptions): ChartProgram;
|
|
5065
5256
|
createFoldData(options: FoldDataOptions): ChartProgram;
|
|
5066
5257
|
createComputedData(options: ComputedDataOptions): ChartProgram;
|
|
5067
5258
|
createNormalizedData(options: NormalizedDataOptions): ChartProgram;
|
|
@@ -5080,6 +5271,8 @@ export class ChartProgram {
|
|
|
5080
5271
|
editDerivedData(options: EditDerivedDataOptions): ChartProgram;
|
|
5081
5272
|
editComputedData(options: EditComputedDataOptions): ChartProgram;
|
|
5082
5273
|
editFilteredData(options: EditFilteredDataOptions): ChartProgram;
|
|
5274
|
+
editFlattenData(options: EditFlattenDataOptions): ChartProgram;
|
|
5275
|
+
editLookupData(options: EditLookupDataOptions): ChartProgram;
|
|
5083
5276
|
editFoldData(options: EditFoldDataOptions): ChartProgram;
|
|
5084
5277
|
editSummaryData(options: EditSummaryDataOptions): ChartProgram;
|
|
5085
5278
|
editBinData(options: EditBinDataOptions): ChartProgram;
|
|
@@ -5098,6 +5291,7 @@ export class ChartProgram {
|
|
|
5098
5291
|
|
|
5099
5292
|
/** One point layer accepts at most 50,000 selected rows, before missing-value filtering. */
|
|
5100
5293
|
createPointMark(options?: StrokeStyleDetails & {
|
|
5294
|
+
clip?: boolean;
|
|
5101
5295
|
id?: string;
|
|
5102
5296
|
data?: string;
|
|
5103
5297
|
missing?: "error" | "skip";
|
|
@@ -5108,6 +5302,7 @@ export class ChartProgram {
|
|
|
5108
5302
|
strokeWidth?: number;
|
|
5109
5303
|
}): ChartProgram;
|
|
5110
5304
|
editPointMark(options: StrokeStyleDetails & {
|
|
5305
|
+
clip?: boolean;
|
|
5111
5306
|
target?: string;
|
|
5112
5307
|
missing?: "error" | "skip";
|
|
5113
5308
|
shape?: PointShape;
|
|
@@ -5117,6 +5312,7 @@ export class ChartProgram {
|
|
|
5117
5312
|
strokeWidth?: number;
|
|
5118
5313
|
}): ChartProgram;
|
|
5119
5314
|
createTickMark(options?: StrokeStyleDetails & {
|
|
5315
|
+
clip?: boolean;
|
|
5120
5316
|
id?: string;
|
|
5121
5317
|
data?: string;
|
|
5122
5318
|
missing?: "error" | "skip";
|
|
@@ -5126,6 +5322,7 @@ export class ChartProgram {
|
|
|
5126
5322
|
opacity?: number;
|
|
5127
5323
|
}): ChartProgram;
|
|
5128
5324
|
editTickMark(options: StrokeStyleDetails & {
|
|
5325
|
+
clip?: boolean;
|
|
5129
5326
|
target?: string;
|
|
5130
5327
|
missing?: "error" | "skip";
|
|
5131
5328
|
length?: number;
|
|
@@ -5138,6 +5335,8 @@ export class ChartProgram {
|
|
|
5138
5335
|
packPoints(options: PackPointsOptions): ChartProgram;
|
|
5139
5336
|
removePointPacking(options?: RemovePointPackingOptions): ChartProgram;
|
|
5140
5337
|
createLineMark(options?: StrokeStyleDetails & {
|
|
5338
|
+
clip?: boolean;
|
|
5339
|
+
missing?: "error" | "break";
|
|
5141
5340
|
id?: string;
|
|
5142
5341
|
data?: string;
|
|
5143
5342
|
strokeWidth?: number;
|
|
@@ -5148,6 +5347,8 @@ export class ChartProgram {
|
|
|
5148
5347
|
closed?: boolean;
|
|
5149
5348
|
}): ChartProgram;
|
|
5150
5349
|
editLineMark(options: StrokeStyleDetails & {
|
|
5350
|
+
clip?: boolean;
|
|
5351
|
+
missing?: "error" | "break";
|
|
5151
5352
|
target?: string;
|
|
5152
5353
|
strokeWidth?: number;
|
|
5153
5354
|
curve?: CurveInterpolation;
|
|
@@ -5157,6 +5358,7 @@ export class ChartProgram {
|
|
|
5157
5358
|
closed?: boolean;
|
|
5158
5359
|
}): ChartProgram;
|
|
5159
5360
|
createBarMark(options?: RectStyleDetails & {
|
|
5361
|
+
clip?: boolean;
|
|
5160
5362
|
id?: string;
|
|
5161
5363
|
data?: string;
|
|
5162
5364
|
orientation?: "vertical" | "horizontal";
|
|
@@ -5167,6 +5369,7 @@ export class ChartProgram {
|
|
|
5167
5369
|
strokeWidth?: number;
|
|
5168
5370
|
}): ChartProgram;
|
|
5169
5371
|
editBarMark(options: RectStyleDetails & {
|
|
5372
|
+
clip?: boolean;
|
|
5170
5373
|
target?: string;
|
|
5171
5374
|
blend?: "normal" | "difference";
|
|
5172
5375
|
missing?: "error" | "skip";
|
|
@@ -5176,6 +5379,7 @@ export class ChartProgram {
|
|
|
5176
5379
|
strokeWidth?: number;
|
|
5177
5380
|
}): ChartProgram;
|
|
5178
5381
|
createAreaMark(options?: StrokeStyleDetails & {
|
|
5382
|
+
clip?: boolean;
|
|
5179
5383
|
id?: string;
|
|
5180
5384
|
data?: string;
|
|
5181
5385
|
fill?: FillPaint;
|
|
@@ -5206,8 +5410,8 @@ export class ChartProgram {
|
|
|
5206
5410
|
}): ChartProgram;
|
|
5207
5411
|
createRectMark(options?: RectMarkOptions): ChartProgram;
|
|
5208
5412
|
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;
|
|
5413
|
+
createRuleMark(options?: { clip?: boolean; id?: string; data?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5414
|
+
editRuleMark(options: { clip?: boolean; target?: string; missing?: "error" | "skip" } & RuleStyleOptions): ChartProgram;
|
|
5211
5415
|
createTextMark(options?: TextMarkOptions): ChartProgram;
|
|
5212
5416
|
createTextPlot(options: CreateTextPlotOptions): ChartProgram;
|
|
5213
5417
|
createMarkLabels(options?: CreateMarkLabelsOptions): ChartProgram;
|
|
@@ -5215,12 +5419,14 @@ export class ChartProgram {
|
|
|
5215
5419
|
editMarkLabelPlacement(options: EditMarkLabelPlacementOptions): ChartProgram;
|
|
5216
5420
|
removeMarkLabels(options: RemoveMarkLabelsOptions): ChartProgram;
|
|
5217
5421
|
createAnnotation(options: CreateAnnotationOptions): ChartProgram;
|
|
5422
|
+
createStatisticalReference(options: CreateStatisticalReferenceOptions): ChartProgram;
|
|
5218
5423
|
createReferenceLine(options: CreateReferenceLineOptions): ChartProgram;
|
|
5219
5424
|
createReferenceBand(options: CreateReferenceBandOptions): ChartProgram;
|
|
5220
5425
|
editTextMark(options: EditTextMarkOptions): ChartProgram;
|
|
5221
5426
|
layoutLabels(options?: LabelLayoutOptions): ChartProgram;
|
|
5222
5427
|
removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
|
|
5223
5428
|
editAreaMark(options: StrokeStyleDetails & {
|
|
5429
|
+
clip?: boolean;
|
|
5224
5430
|
target?: string;
|
|
5225
5431
|
fill?: FillPaint;
|
|
5226
5432
|
opacity?: number;
|
|
@@ -5261,9 +5467,11 @@ export class ChartProgram {
|
|
|
5261
5467
|
channel:
|
|
5262
5468
|
| "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset"
|
|
5263
5469
|
| "theta" | "radius" | "color" | "stroke" | "strokeDash" | "strokeWidth"
|
|
5264
|
-
| "size" | "shape" | "angle" | "group" | "opacity" | "text";
|
|
5470
|
+
| "size" | "shape" | "angle" | "group" | "opacity" | "text" | "dx" | "dy";
|
|
5265
5471
|
}): ChartProgram;
|
|
5266
5472
|
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
5473
|
+
encodeDx(options: TextOffsetEncodingOptions): ChartProgram;
|
|
5474
|
+
encodeDy(options: TextOffsetEncodingOptions): ChartProgram;
|
|
5267
5475
|
encodeHistogram(options: HistogramEncodingOptions): ChartProgram;
|
|
5268
5476
|
encodeDensity(options: DensityEncodingOptions): ChartProgram;
|
|
5269
5477
|
editDensity(options: EditDensityOptions): ChartProgram;
|
|
@@ -5300,6 +5508,7 @@ export class ChartProgram {
|
|
|
5300
5508
|
createPolarScatterPlot(options: CreatePolarScatterPlotOptions): ChartProgram;
|
|
5301
5509
|
createPolarLinePlot(options: CreatePolarLinePlotOptions): ChartProgram;
|
|
5302
5510
|
createRadarPlot(options: CreateRadarPlotOptions): ChartProgram;
|
|
5511
|
+
editRadarPlot(options: EditRadarPlotOptions): ChartProgram;
|
|
5303
5512
|
createRugPlot(options: CreateRugPlotOptions): ChartProgram;
|
|
5304
5513
|
createStripPlot(options: CreateStripPlotOptions): ChartProgram;
|
|
5305
5514
|
createBeeswarmPlot(options: CreateBeeswarmPlotOptions): ChartProgram;
|
|
@@ -5322,6 +5531,7 @@ export class ChartProgram {
|
|
|
5322
5531
|
removeParallelAxis(options: RemoveParallelAxisOptions): ChartProgram;
|
|
5323
5532
|
removeParallelAxes(options?: ParallelAxesOptions): ChartProgram;
|
|
5324
5533
|
createAxes(options?: CreateAxesOptions): ChartProgram;
|
|
5534
|
+
editAxes(options: EditAxesOptions): ChartProgram;
|
|
5325
5535
|
createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
|
|
5326
5536
|
createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
|
|
5327
5537
|
createThetaAxis(options?: CompleteThetaAxisOptions): ChartProgram;
|