ggaction 0.0.13 → 0.0.15
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 +78 -0
- package/README.md +20 -11
- package/knowledge/action-cards.json +1 -1
- package/knowledge/intent-taxonomy.json +1 -1
- package/knowledge/mcp-resources.json +1 -1
- package/package.json +8 -3
- package/src/actions/basic.js +2 -2
- package/src/actions/boxPlots/components.js +14 -4
- package/src/actions/boxPlots/edit.js +31 -5
- package/src/actions/boxPlots/materialize.js +11 -3
- package/src/actions/boxPlots/options.js +48 -16
- package/src/actions/categoryOrder/index.js +15 -4
- package/src/actions/charts/area.js +5 -1
- package/src/actions/charts/bar.js +2 -1
- package/src/actions/charts/density.js +6 -2
- package/src/actions/charts/ecdf.js +4 -1
- package/src/actions/charts/endpoints.js +25 -3
- package/src/actions/charts/heatmap.js +2 -1
- package/src/actions/charts/histogram.js +4 -3
- package/src/actions/charts/horizon.js +3 -1
- package/src/actions/charts/interval-regression.js +5 -2
- package/src/actions/charts/line.js +3 -1
- package/src/actions/charts/parallel.js +8 -2
- package/src/actions/charts/pie.js +10 -2
- package/src/actions/charts/polar.js +15 -4
- package/src/actions/charts/radar.js +8 -2
- package/src/actions/charts/radial.js +10 -2
- package/src/actions/charts/rug-strip.js +6 -2
- package/src/actions/charts/scatter.js +3 -1
- package/src/actions/composition/actions.js +13 -4
- package/src/actions/coordinates/actions.js +1 -1
- package/src/actions/coordinates/edit.js +76 -0
- package/src/actions/data/bin.js +1 -1
- package/src/actions/data/bin2d.js +57 -185
- package/src/actions/data/complete.js +26 -0
- package/src/actions/data/computed.js +2 -2
- package/src/actions/data/create.js +2 -2
- package/src/actions/data/density.js +12 -20
- package/src/actions/data/derived.js +47 -17
- package/src/actions/data/edit.js +539 -0
- package/src/actions/data/filter.js +14 -2
- package/src/actions/data/impute.js +26 -0
- package/src/actions/data/index.js +14 -0
- package/src/actions/data/normalize.js +27 -0
- package/src/actions/data/regression.js +16 -21
- package/src/actions/data/revisionBindings.js +145 -0
- package/src/actions/data/shared.js +20 -4
- package/src/actions/data/summary.js +1 -1
- package/src/actions/data/timeUnit.js +4 -1
- package/src/actions/data/window.js +1 -1
- package/src/actions/encodings/channels.js +415 -0
- package/src/actions/encodings/color/index.js +2 -1
- package/src/actions/encodings/density.js +5 -2
- package/src/actions/encodings/histogram.js +3 -2
- package/src/actions/encodings/index.js +4 -0
- package/src/actions/encodings/offset.js +20 -13
- package/src/actions/encodings/position/apply.js +53 -7
- package/src/actions/encodings/position/index.js +10 -2
- package/src/actions/encodings/position/policies/bar.js +9 -0
- package/src/actions/encodings/position/resolve.js +24 -7
- package/src/actions/encodings/remove.js +9 -4
- package/src/actions/encodings/ruleAppearance.js +1 -23
- package/src/actions/encodings/seriesLayout.js +1 -0
- package/src/actions/encodings/shared.js +82 -14
- package/src/actions/encodings/stroke.js +226 -0
- package/src/actions/errorBands/create.js +23 -3
- package/src/actions/errorBands/edit.js +21 -6
- package/src/actions/errorBars/create.js +35 -7
- package/src/actions/errorBars/edit.js +19 -4
- package/src/actions/facets/actions.js +237 -57
- package/src/actions/facets/derive.js +91 -26
- package/src/actions/gradientPlots/components.js +10 -2
- package/src/actions/gradientPlots/edit.js +14 -4
- package/src/actions/gradientPlots/materialize.js +3 -1
- package/src/actions/gradientPlots/options.js +10 -2
- package/src/actions/guides/applicability.js +8 -2
- package/src/actions/guides/axes/labels.js +58 -12
- package/src/actions/guides/axes/lines.js +6 -2
- package/src/actions/guides/axes/parallel/resolve.js +6 -2
- package/src/actions/guides/axes/tickGroups.js +2 -1
- package/src/actions/guides/axes/ticks.js +6 -2
- package/src/actions/guides/axes/titles.js +11 -3
- package/src/actions/guides/grids/resolve.js +7 -2
- package/src/actions/guides/guides.js +19 -3
- package/src/actions/guides/legends/blocks.js +426 -0
- package/src/actions/guides/legends/categorical/actions.js +134 -48
- package/src/actions/guides/legends/categorical/components.js +17 -12
- package/src/actions/guides/legends/categorical/index.js +37 -33
- package/src/actions/guides/legends/categorical/layout.js +97 -15
- package/src/actions/guides/legends/categorical/options.js +2 -2
- package/src/actions/guides/legends/categorical/recipes.js +111 -20
- package/src/actions/guides/legends/categorical/resolve.js +12 -8
- package/src/actions/guides/legends/categorical/symbols.js +85 -30
- package/src/actions/guides/legends/continuous/common.js +30 -12
- package/src/actions/guides/legends/continuous/gradient.js +10 -7
- package/src/actions/guides/legends/continuous/index.js +2 -0
- package/src/actions/guides/legends/continuous/interval.js +8 -3
- package/src/actions/guides/legends/continuous/opacity.js +8 -5
- package/src/actions/guides/legends/continuous/stroke.js +525 -0
- package/src/actions/guides/legends/creation.js +14 -1
- package/src/actions/guides/legends/edit.js +158 -59
- package/src/actions/guides/legends/index.js +2 -0
- package/src/actions/guides/legends/lane.js +54 -19
- package/src/actions/guides/legends/lifecycle.js +19 -8
- package/src/actions/guides/legends/remove.js +13 -3
- package/src/actions/guides/legends/sampling.js +140 -0
- package/src/actions/guides/legends/size.js +93 -40
- package/src/actions/guides/legends/strokeWidth.js +34 -28
- package/src/actions/guides/legends/target.js +112 -1
- package/src/actions/guides/legends/transition.js +165 -16
- package/src/actions/guides/polar/axes/facade.js +4 -4
- package/src/actions/guides/polar/axes/labels.js +24 -5
- package/src/actions/guides/polar/axes/lines.js +10 -4
- package/src/actions/guides/polar/axes/shared.js +16 -0
- package/src/actions/guides/polar/axes/ticks.js +1 -1
- package/src/actions/guides/polar/axes/titles.js +1 -1
- package/src/actions/guides/polar/grids.js +1 -1
- package/src/actions/guides/polar/resolve.js +12 -8
- package/src/actions/index.js +14 -3
- package/src/actions/marks/arc/actions.js +77 -19
- package/src/actions/marks/area/actions.js +34 -9
- package/src/actions/marks/area/materialize.js +17 -1
- package/src/actions/marks/bar/create.js +11 -2
- package/src/actions/marks/bar/edit.js +20 -3
- package/src/actions/marks/bar/materialize.js +22 -2
- package/src/actions/marks/index.js +10 -1
- package/src/actions/marks/line/actions.js +37 -14
- package/src/actions/marks/line/materialize.js +29 -10
- package/src/actions/marks/point/create.js +8 -2
- package/src/actions/marks/point/edit.js +18 -6
- package/src/actions/marks/point/materialize.js +49 -15
- package/src/actions/marks/rect/actions.js +33 -12
- package/src/actions/marks/references.js +601 -30
- package/src/actions/marks/remove.js +71 -1
- package/src/actions/marks/rule/actions.js +47 -10
- package/src/actions/marks/shared.js +1 -1
- package/src/actions/marks/text/actions.js +74 -9
- package/src/actions/marks/text/index.js +4 -0
- package/src/actions/marks/text/layout.js +154 -6
- package/src/actions/marks/text/removal.js +173 -0
- package/src/actions/marks/text/selection.js +73 -0
- package/src/actions/marks/tick/actions.js +22 -5
- package/src/actions/primitives/editGraphics.js +26 -0
- package/src/actions/primitives/semantic.js +2 -1
- package/src/actions/primitives/semanticAction.js +83 -10
- package/src/actions/primitives/semanticValidation/guide.js +1 -1
- package/src/actions/primitives/semanticValidation/index.js +9 -1
- package/src/actions/primitives/semanticValidation/layer.js +5 -0
- package/src/actions/primitives/semanticValidation/scale.js +28 -7
- package/src/actions/regression/components.js +26 -11
- package/src/actions/regression/create.js +10 -2
- package/src/actions/regression/edit.js +21 -7
- package/src/actions/resources/index.js +7 -0
- package/src/actions/resources/remove.js +172 -0
- package/src/actions/scales/channels.js +212 -0
- package/src/actions/scales/consumers/common.js +1 -1
- package/src/actions/scales/consumers/families.js +3 -2
- package/src/actions/scales/consumers/index.js +19 -2
- package/src/actions/scales/consumers/seriesLayout.js +28 -14
- package/src/actions/scales/create.js +54 -22
- package/src/actions/scales/definitions.js +94 -40
- package/src/actions/scales/edit.js +66 -11
- package/src/actions/scales/editPolicy.js +81 -11
- package/src/actions/scales/index.js +6 -0
- package/src/actions/scales/materialize.js +4 -3
- package/src/actions/scales/offset.js +48 -0
- package/src/actions/scales/parallel.js +71 -0
- package/src/actions/scales/preview.js +111 -10
- package/src/actions/selection/actions.js +154 -30
- package/src/actions/selection/index.js +3 -0
- package/src/actions/theme/actions.js +68 -13
- package/src/actions/theme/composition.js +238 -0
- package/src/actions/theme/index.js +9 -2
- package/src/actions/theme/reconcile.js +315 -67
- package/src/actions/theme/state.js +160 -0
- package/src/actions/violinPlots/create.js +5 -2
- package/src/actions/violinPlots/edit.js +1 -0
- package/src/core/action.js +10 -0
- package/src/core/compositionState.js +6 -1
- package/src/core/programState.js +20 -0
- package/src/core/resourceReferences.js +332 -0
- package/src/core/vocabulary.js +16 -3
- package/src/grammar/bars/aggregate.js +4 -1
- package/src/grammar/bars/geometry.js +44 -0
- package/src/grammar/bin.js +54 -9
- package/src/grammar/complete.js +279 -0
- package/src/grammar/computed.js +265 -64
- package/src/grammar/coordinates.js +37 -0
- package/src/grammar/density.js +239 -37
- package/src/grammar/displayLabels.js +57 -0
- package/src/grammar/facets/dependencies.js +133 -1
- package/src/grammar/facets/guides.js +3 -0
- package/src/grammar/facets/index.js +7 -47
- package/src/grammar/facets/scales.js +15 -18
- package/src/grammar/impute.js +340 -0
- package/src/grammar/markLabelSelection.js +57 -0
- package/src/grammar/markLabels.js +18 -1
- package/src/grammar/normalize.js +366 -0
- package/src/grammar/pathSeries.js +26 -8
- package/src/grammar/pointShapes.js +13 -4
- package/src/grammar/polar.js +90 -8
- package/src/grammar/regression/index.js +1 -0
- package/src/grammar/regression/parameters.js +23 -0
- package/src/grammar/roundedRect.js +180 -0
- package/src/grammar/rules.js +1 -0
- package/src/grammar/scales/colorConsumers.js +20 -1
- package/src/grammar/scales/continuous.js +2 -2
- package/src/grammar/scales/definition.js +27 -4
- package/src/grammar/scales/index.js +1 -0
- package/src/grammar/scales/ordinal.js +12 -3
- package/src/grammar/scales/policies.js +2 -2
- package/src/grammar/scales/size.js +456 -0
- package/src/grammar/schemas/concreteGraphic.js +14 -2
- package/src/grammar/schemas/graphic.js +15 -0
- package/src/grammar/schemas/graphicBounds.js +179 -30
- package/src/grammar/schemas/semanticPath.js +7 -2
- package/src/grammar/statisticalReference.js +103 -0
- package/src/grammar/strokeStyle.js +77 -0
- package/src/grammar/summary.js +78 -16
- package/src/grammar/timeUnit.js +216 -5
- package/src/grammar/transformTopology.js +4 -0
- package/src/grammar/transforms.js +394 -28
- package/src/grammar/weightedStatistics.js +374 -0
- package/src/grammar/window.js +221 -16
- package/src/layout/aspect.js +80 -0
- package/src/layout/facets.js +59 -5
- package/src/layout/labels.js +343 -0
- package/src/materialization/bars/aggregate.js +25 -2
- package/src/materialization/bars/histogram.js +84 -24
- package/src/materialization/bars/ranged.js +19 -3
- package/src/materialization/bars/resolve.js +7 -4
- package/src/materialization/composition.js +3 -1
- package/src/materialization/coordinateBounds.js +204 -0
- package/src/materialization/dependencies.js +36 -0
- package/src/materialization/facetGuides/legacyCategorical.js +3 -0
- package/src/materialization/facetGuides/placement.js +8 -2
- package/src/materialization/facetGuides/preparation.js +12 -7
- package/src/materialization/facetHeaders.js +346 -0
- package/src/materialization/facets.js +15 -65
- package/src/materialization/guides/resources.js +26 -0
- package/src/materialization/legends.js +1 -1
- package/src/materialization/marks/index.js +11 -5
- package/src/materialization/marks/policies.js +2 -1
- package/src/materialization/rect.js +25 -12
- package/src/materialization/rectConfig.js +5 -1
- package/src/materialization/scales/map.js +5 -3
- package/src/materialization/scales/policies/binnedPosition.js +2 -2
- package/src/materialization/scales/policies/offset.js +50 -8
- package/src/materialization/scales/policies/series.js +4 -1
- package/src/materialization/scales/resolve.js +22 -6
- package/src/materialization/selection/items/arc.js +28 -4
- package/src/materialization/selection/items/bar.js +30 -3
- package/src/materialization/selection/items/common.js +19 -4
- package/src/materialization/selection/items/rect.js +28 -4
- package/src/materialization/selection/path.js +1 -1
- package/src/materialization/selection/point.js +3 -1
- package/src/materialization/text.js +265 -14
- package/src/renderers/canvas/circle.js +2 -3
- package/src/renderers/canvas/line.js +2 -3
- package/src/renderers/canvas/native.js +4 -4
- package/src/renderers/canvas/path.js +2 -3
- package/src/renderers/canvas/rect.js +2 -3
- package/src/renderers/canvas/stroke.js +11 -0
- package/src/renderers/svg.js +19 -0
- package/src/selectors/datasets.js +32 -1
- package/src/selectors/layers.js +4 -0
- package/src/theme/defaults.js +101 -0
- package/types/basic.d.ts +6 -0
- package/types/index.d.ts +85 -0
- package/types/program.d.ts +910 -117
package/types/program.d.ts
CHANGED
|
@@ -2,8 +2,32 @@ import type { RegisteredExtensionActions } from "./extension.js";
|
|
|
2
2
|
|
|
3
3
|
export type TemporalInputUnit = "auto" | "year" | "timestamp";
|
|
4
4
|
export type ThemeName = "light" | "dark";
|
|
5
|
+
export interface ThemeTokens {
|
|
6
|
+
background: string;
|
|
7
|
+
mark: string;
|
|
8
|
+
text: string;
|
|
9
|
+
strongText: string;
|
|
10
|
+
mutedText: string;
|
|
11
|
+
axis: string;
|
|
12
|
+
axisTitle: string;
|
|
13
|
+
grid: string;
|
|
14
|
+
border: string;
|
|
15
|
+
sizeSymbol: string;
|
|
16
|
+
regressionBand: string;
|
|
17
|
+
boxLine: string;
|
|
18
|
+
boxMedian: string;
|
|
19
|
+
referenceLine: string;
|
|
20
|
+
referenceBand: string;
|
|
21
|
+
gradientCenter: string;
|
|
22
|
+
highlight: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
}
|
|
25
|
+
export type ThemeDefinition =
|
|
26
|
+
| ThemeName
|
|
27
|
+
| { base: ThemeName; tokens: Partial<ThemeTokens> };
|
|
5
28
|
export interface ApplyThemeOptions {
|
|
6
|
-
theme:
|
|
29
|
+
theme: ThemeDefinition;
|
|
30
|
+
scope?: "self" | "descendants";
|
|
7
31
|
}
|
|
8
32
|
export type FieldType = "quantitative" | "temporal" | "ordinal" | "nominal";
|
|
9
33
|
export type GraphicType =
|
|
@@ -144,11 +168,15 @@ export interface FacetScaleResolutions {
|
|
|
144
168
|
y?: FacetScaleResolution;
|
|
145
169
|
xOffset?: FacetScaleResolution;
|
|
146
170
|
yOffset?: FacetScaleResolution;
|
|
171
|
+
theta?: FacetScaleResolution;
|
|
172
|
+
r?: FacetScaleResolution;
|
|
147
173
|
color?: FacetScaleResolution;
|
|
174
|
+
stroke?: FacetScaleResolution;
|
|
148
175
|
size?: FacetScaleResolution;
|
|
149
176
|
shape?: FacetScaleResolution;
|
|
150
177
|
opacity?: FacetScaleResolution;
|
|
151
178
|
strokeDash?: FacetScaleResolution;
|
|
179
|
+
parallelDimensions?: FacetScaleResolution;
|
|
152
180
|
}
|
|
153
181
|
export interface FacetGuideOptions {
|
|
154
182
|
axes?: "each" | "outer";
|
|
@@ -185,7 +213,7 @@ export interface FacetGridOptions {
|
|
|
185
213
|
export interface RepeatChartsOptions {
|
|
186
214
|
id?: string;
|
|
187
215
|
target?: string;
|
|
188
|
-
channel: "x" | "y";
|
|
216
|
+
channel: "x" | "y" | "theta" | "r" | { parallelDimension: string };
|
|
189
217
|
fields: readonly [string, ...string[]];
|
|
190
218
|
columns?: number;
|
|
191
219
|
gap?: number;
|
|
@@ -201,7 +229,14 @@ export interface EditFacetHeadersOptions {
|
|
|
201
229
|
fontWeight?: string | number;
|
|
202
230
|
color?: string;
|
|
203
231
|
offset?: number;
|
|
204
|
-
|
|
232
|
+
role?: FacetHeaderRole;
|
|
233
|
+
labelMap?: DisplayLabelMap | "auto";
|
|
234
|
+
side?: FacetHeaderSide;
|
|
235
|
+
align?: FacetHeaderAlign;
|
|
236
|
+
}
|
|
237
|
+
export type FacetHeaderRole = "all" | "row" | "column";
|
|
238
|
+
export type FacetHeaderSide = "top" | "bottom" | "left" | "right";
|
|
239
|
+
export type FacetHeaderAlign = "start" | "center" | "end";
|
|
205
240
|
export interface ConcatCompositionSpec {
|
|
206
241
|
readonly id: string;
|
|
207
242
|
readonly direction: "horizontal" | "vertical";
|
|
@@ -237,7 +272,7 @@ export interface FacetCompositionSpec {
|
|
|
237
272
|
};
|
|
238
273
|
readonly repeat?: {
|
|
239
274
|
readonly target: string;
|
|
240
|
-
readonly channel: "x" | "y";
|
|
275
|
+
readonly channel: "x" | "y" | "theta" | "r" | { readonly parallelDimension: string };
|
|
241
276
|
readonly fields: readonly string[];
|
|
242
277
|
};
|
|
243
278
|
readonly scales: Readonly<Required<FacetScaleResolutions>>;
|
|
@@ -254,6 +289,10 @@ export type DensityKernel =
|
|
|
254
289
|
| "uniform"
|
|
255
290
|
| "triangular";
|
|
256
291
|
export type DensityNormalization = "unit" | "count";
|
|
292
|
+
export interface StatisticalWeight {
|
|
293
|
+
readonly field: string;
|
|
294
|
+
readonly kind: "frequency" | "reliability";
|
|
295
|
+
}
|
|
257
296
|
export type DensityPlacementSide =
|
|
258
297
|
| "both"
|
|
259
298
|
| "left"
|
|
@@ -300,6 +339,13 @@ export type FilterDataOptions = {
|
|
|
300
339
|
field: string;
|
|
301
340
|
} & FilterModeOptions;
|
|
302
341
|
export type DatasetScalar = string | number | boolean | null;
|
|
342
|
+
export type DisplayLabelMap = ReadonlyArray<Readonly<{
|
|
343
|
+
value: DatasetScalar;
|
|
344
|
+
label: string;
|
|
345
|
+
}>>;
|
|
346
|
+
export interface DisplayLabelOptions {
|
|
347
|
+
labelMap?: DisplayLabelMap | "auto";
|
|
348
|
+
}
|
|
303
349
|
export type DatasetFilterTransform = {
|
|
304
350
|
type: "filter";
|
|
305
351
|
field: string;
|
|
@@ -351,6 +397,7 @@ export interface DatasetDensityTransform {
|
|
|
351
397
|
steps: number;
|
|
352
398
|
kernel?: DensityKernel;
|
|
353
399
|
normalization?: DensityNormalization;
|
|
400
|
+
weight?: StatisticalWeight;
|
|
354
401
|
as: readonly [string, string];
|
|
355
402
|
resolve: "shared";
|
|
356
403
|
placement?: {
|
|
@@ -368,10 +415,22 @@ export interface DatasetDensityTransform {
|
|
|
368
415
|
};
|
|
369
416
|
};
|
|
370
417
|
resolved?: {
|
|
371
|
-
readonly bandwidth: number;
|
|
372
418
|
readonly extent: readonly [number, number];
|
|
373
419
|
readonly splitDomain?: readonly [unknown, unknown];
|
|
374
|
-
}
|
|
420
|
+
} & (
|
|
421
|
+
| {
|
|
422
|
+
readonly bandwidth: number;
|
|
423
|
+
readonly bandwidths?: never;
|
|
424
|
+
}
|
|
425
|
+
| {
|
|
426
|
+
readonly bandwidth?: never;
|
|
427
|
+
readonly bandwidths: readonly {
|
|
428
|
+
readonly group?: unknown;
|
|
429
|
+
readonly split?: unknown;
|
|
430
|
+
readonly bandwidth: number;
|
|
431
|
+
}[];
|
|
432
|
+
}
|
|
433
|
+
);
|
|
375
434
|
}
|
|
376
435
|
export type HorizonResolution = "shared" | "independent";
|
|
377
436
|
export type HorizonMissingPolicy = "break" | "error";
|
|
@@ -451,6 +510,22 @@ export interface WindowSort {
|
|
|
451
510
|
field: string;
|
|
452
511
|
order?: WindowSortOrder;
|
|
453
512
|
}
|
|
513
|
+
export type RowWindowFrame = {
|
|
514
|
+
preceding: number;
|
|
515
|
+
following?: number;
|
|
516
|
+
duration?: never;
|
|
517
|
+
};
|
|
518
|
+
export type DurationWindowUnit = "millisecond" | "second" | "minute" | "hour" | "day";
|
|
519
|
+
export type DurationWindowFrame = {
|
|
520
|
+
preceding?: never;
|
|
521
|
+
following?: never;
|
|
522
|
+
duration: {
|
|
523
|
+
preceding: number;
|
|
524
|
+
following?: number;
|
|
525
|
+
unit: DurationWindowUnit;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
export type WindowFrame = RowWindowFrame | DurationWindowFrame;
|
|
454
529
|
export type WindowOperation =
|
|
455
530
|
| { op: "rowNumber" | "rank" | "denseRank"; as: string }
|
|
456
531
|
| { op: "cumulativeSum"; field: string; as: string }
|
|
@@ -465,10 +540,9 @@ export type WindowOperation =
|
|
|
465
540
|
op: "movingMean" | "movingSum";
|
|
466
541
|
field: string;
|
|
467
542
|
as: string;
|
|
468
|
-
frame:
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
};
|
|
543
|
+
frame: WindowFrame;
|
|
544
|
+
minPeriods?: number;
|
|
545
|
+
missing?: "error" | "skip";
|
|
472
546
|
};
|
|
473
547
|
export interface DatasetWindowSort {
|
|
474
548
|
readonly field: string;
|
|
@@ -492,16 +566,27 @@ export type DatasetWindowOperation =
|
|
|
492
566
|
readonly op: "movingMean" | "movingSum";
|
|
493
567
|
readonly field: string;
|
|
494
568
|
readonly as: string;
|
|
495
|
-
readonly frame:
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
569
|
+
readonly frame:
|
|
570
|
+
| {
|
|
571
|
+
readonly preceding: number;
|
|
572
|
+
readonly following: number;
|
|
573
|
+
}
|
|
574
|
+
| {
|
|
575
|
+
readonly duration: {
|
|
576
|
+
readonly preceding: number;
|
|
577
|
+
readonly following: number;
|
|
578
|
+
readonly unit: DurationWindowUnit;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
readonly minPeriods: number;
|
|
582
|
+
readonly missing: "error" | "skip";
|
|
499
583
|
};
|
|
500
584
|
export interface DatasetWindowTransform {
|
|
501
585
|
readonly type: "window";
|
|
502
586
|
readonly partitionBy: readonly string[];
|
|
503
587
|
readonly sortBy: readonly DatasetWindowSort[];
|
|
504
588
|
readonly operations: readonly DatasetWindowOperation[];
|
|
589
|
+
readonly temporalUnit?: TemporalInputUnit;
|
|
505
590
|
}
|
|
506
591
|
export interface ECDFOutputFields {
|
|
507
592
|
value: string;
|
|
@@ -531,14 +616,28 @@ export type TimeUnit =
|
|
|
531
616
|
| "day"
|
|
532
617
|
| "hour"
|
|
533
618
|
| "minute"
|
|
534
|
-
| "second"
|
|
535
|
-
|
|
619
|
+
| "second"
|
|
620
|
+
| "week"
|
|
621
|
+
| "weekday";
|
|
622
|
+
type DatasetTimeUnitTransformBase = {
|
|
536
623
|
readonly type: "timeUnit";
|
|
537
624
|
readonly field: string;
|
|
538
|
-
readonly unit: TimeUnit;
|
|
539
625
|
readonly temporalUnit?: TemporalInputUnit;
|
|
540
626
|
readonly as: string;
|
|
541
|
-
|
|
627
|
+
readonly timeZone?: string;
|
|
628
|
+
};
|
|
629
|
+
export type DatasetTimeUnitTransform = DatasetTimeUnitTransformBase & (
|
|
630
|
+
| {
|
|
631
|
+
readonly unit: Exclude<TimeUnit, "week">;
|
|
632
|
+
readonly weekStartsOn?: never;
|
|
633
|
+
readonly weekRule?: never;
|
|
634
|
+
}
|
|
635
|
+
| {
|
|
636
|
+
readonly unit: "week";
|
|
637
|
+
readonly weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
638
|
+
readonly weekRule: "calendar" | "iso";
|
|
639
|
+
}
|
|
640
|
+
);
|
|
542
641
|
export interface Bin2DCounts {
|
|
543
642
|
x: number;
|
|
544
643
|
y: number;
|
|
@@ -600,6 +699,7 @@ export interface DatasetBinTransform {
|
|
|
600
699
|
readonly zero: boolean;
|
|
601
700
|
readonly includeEmpty: boolean;
|
|
602
701
|
readonly members: boolean;
|
|
702
|
+
readonly weight?: StatisticalWeight;
|
|
603
703
|
readonly as: {
|
|
604
704
|
readonly lower: string;
|
|
605
705
|
readonly upper: string;
|
|
@@ -622,21 +722,111 @@ export interface DatasetFoldTransform {
|
|
|
622
722
|
}
|
|
623
723
|
export type ComputedExpression =
|
|
624
724
|
| { readonly field: string }
|
|
625
|
-
| { readonly constant: number }
|
|
725
|
+
| { readonly constant: number | string | boolean | null }
|
|
626
726
|
| {
|
|
627
|
-
readonly op: "negate" | "absolute";
|
|
727
|
+
readonly op: "negate" | "absolute" | "log" | "sqrt" | "not" | "isNull";
|
|
628
728
|
readonly operand: ComputedExpression;
|
|
629
729
|
}
|
|
630
730
|
| {
|
|
631
|
-
readonly op: "add" | "subtract" | "multiply" | "divide"
|
|
731
|
+
readonly op: "add" | "subtract" | "multiply" | "divide" |
|
|
732
|
+
"eq" | "neq" | "lt" | "lte" | "gt" | "gte";
|
|
632
733
|
readonly left: ComputedExpression;
|
|
633
734
|
readonly right: ComputedExpression;
|
|
735
|
+
}
|
|
736
|
+
| {
|
|
737
|
+
readonly op: "and" | "or" | "coalesce";
|
|
738
|
+
readonly operands: readonly [ComputedExpression, ComputedExpression, ...ComputedExpression[]];
|
|
739
|
+
}
|
|
740
|
+
| {
|
|
741
|
+
readonly op: "concat";
|
|
742
|
+
readonly operands: readonly [ComputedExpression, ...ComputedExpression[]];
|
|
743
|
+
}
|
|
744
|
+
| {
|
|
745
|
+
readonly op: "if";
|
|
746
|
+
readonly condition: ComputedExpression;
|
|
747
|
+
readonly then: ComputedExpression;
|
|
748
|
+
readonly else: ComputedExpression;
|
|
634
749
|
};
|
|
635
750
|
export interface DatasetComputedTransform {
|
|
636
751
|
readonly type: "computed";
|
|
637
752
|
readonly as: string;
|
|
638
753
|
readonly expression: ComputedExpression;
|
|
639
754
|
}
|
|
755
|
+
export type NormalizeMethod =
|
|
756
|
+
| "share"
|
|
757
|
+
| "zscore"
|
|
758
|
+
| "minmax"
|
|
759
|
+
| "index"
|
|
760
|
+
| "change"
|
|
761
|
+
| "percentChange";
|
|
762
|
+
export type NormalizeZeroDenominator = "error" | "null" | "zero";
|
|
763
|
+
export type NormalizeBaseline =
|
|
764
|
+
| { readonly position: "first" | "last" }
|
|
765
|
+
| { readonly value: number };
|
|
766
|
+
type DatasetNormalizedBaseTransform = {
|
|
767
|
+
readonly type: "normalize";
|
|
768
|
+
readonly field: string;
|
|
769
|
+
readonly as: string;
|
|
770
|
+
readonly groupBy: readonly string[];
|
|
771
|
+
};
|
|
772
|
+
type DatasetNormalizeBaselineTransform = {
|
|
773
|
+
readonly baseline: NormalizeBaseline;
|
|
774
|
+
readonly sortBy: readonly WindowSort[];
|
|
775
|
+
};
|
|
776
|
+
export type DatasetNormalizedTransform = DatasetNormalizedBaseTransform & (
|
|
777
|
+
| {
|
|
778
|
+
readonly method: "share" | "minmax";
|
|
779
|
+
readonly zeroDenominator: NormalizeZeroDenominator;
|
|
780
|
+
}
|
|
781
|
+
| {
|
|
782
|
+
readonly method: "zscore";
|
|
783
|
+
readonly variance: "population" | "sample";
|
|
784
|
+
readonly zeroDenominator: NormalizeZeroDenominator;
|
|
785
|
+
}
|
|
786
|
+
| ({
|
|
787
|
+
readonly method: "index" | "percentChange";
|
|
788
|
+
readonly zeroDenominator: NormalizeZeroDenominator;
|
|
789
|
+
} & DatasetNormalizeBaselineTransform)
|
|
790
|
+
| ({ readonly method: "change" } & DatasetNormalizeBaselineTransform)
|
|
791
|
+
);
|
|
792
|
+
export type DatasetCompleteTransform = {
|
|
793
|
+
readonly type: "complete";
|
|
794
|
+
readonly key: string;
|
|
795
|
+
readonly groupBy: readonly string[];
|
|
796
|
+
readonly fill: Readonly<Record<string, DatasetScalar>>;
|
|
797
|
+
readonly members?: string;
|
|
798
|
+
} & (
|
|
799
|
+
| { readonly values: readonly DatasetScalar[]; readonly sequence?: never }
|
|
800
|
+
| {
|
|
801
|
+
readonly sequence: { readonly start: number; readonly end: number; readonly step: number };
|
|
802
|
+
readonly values?: never;
|
|
803
|
+
}
|
|
804
|
+
| { readonly values?: never; readonly sequence?: never }
|
|
805
|
+
);
|
|
806
|
+
type DatasetImputedBaseTransform = {
|
|
807
|
+
readonly type: "impute";
|
|
808
|
+
readonly fields: readonly string[];
|
|
809
|
+
readonly groupBy: readonly string[];
|
|
810
|
+
readonly edges: "keep" | "error";
|
|
811
|
+
readonly maxGap?: number;
|
|
812
|
+
};
|
|
813
|
+
export type DatasetImputedTransform = DatasetImputedBaseTransform & (
|
|
814
|
+
| {
|
|
815
|
+
readonly method: "constant";
|
|
816
|
+
readonly value: DatasetScalar;
|
|
817
|
+
readonly sortBy: readonly DatasetWindowSort[];
|
|
818
|
+
}
|
|
819
|
+
| {
|
|
820
|
+
readonly method: "forward" | "backward";
|
|
821
|
+
readonly value?: never;
|
|
822
|
+
readonly sortBy: readonly [DatasetWindowSort, ...DatasetWindowSort[]];
|
|
823
|
+
}
|
|
824
|
+
| {
|
|
825
|
+
readonly method: "linear";
|
|
826
|
+
readonly value?: never;
|
|
827
|
+
readonly sortBy: readonly [{ readonly field: string; readonly order: "ascending" }];
|
|
828
|
+
}
|
|
829
|
+
);
|
|
640
830
|
export type StackDataMode = "stack" | "fill" | "center" | "diverging";
|
|
641
831
|
export interface StackDataOutputFields {
|
|
642
832
|
start?: string;
|
|
@@ -652,10 +842,17 @@ export interface DatasetStackTransform {
|
|
|
652
842
|
readonly mode: StackDataMode;
|
|
653
843
|
readonly as: Required<StackDataOutputFields>;
|
|
654
844
|
}
|
|
845
|
+
interface DatasetStatisticalReferenceTransform {
|
|
846
|
+
readonly type: "statisticalReference";
|
|
847
|
+
readonly target: string;
|
|
848
|
+
}
|
|
655
849
|
export type DatasetTransform =
|
|
656
850
|
| DatasetBinTransform
|
|
657
851
|
| DatasetBin2DTransform
|
|
852
|
+
| DatasetCompleteTransform
|
|
658
853
|
| DatasetComputedTransform
|
|
854
|
+
| DatasetImputedTransform
|
|
855
|
+
| DatasetNormalizedTransform
|
|
659
856
|
| DatasetFilterTransform
|
|
660
857
|
| DatasetFoldTransform
|
|
661
858
|
| DatasetRegressionTransform
|
|
@@ -665,8 +862,20 @@ export type DatasetTransform =
|
|
|
665
862
|
| DatasetIntervalTransform
|
|
666
863
|
| DatasetSummaryTransform
|
|
667
864
|
| DatasetStackTransform
|
|
865
|
+
| DatasetStatisticalReferenceTransform
|
|
668
866
|
| DatasetTimeUnitTransform
|
|
669
867
|
| DatasetWindowTransform;
|
|
868
|
+
type RequestedTransform<T> = T extends unknown ? Omit<T, "resolved"> : never;
|
|
869
|
+
export type RequestedDatasetTransform = RequestedTransform<Exclude<
|
|
870
|
+
DatasetTransform,
|
|
871
|
+
DatasetHorizonTransform | DatasetStatisticalReferenceTransform
|
|
872
|
+
>>;
|
|
873
|
+
export type DerivedDataDependents = "reject" | "recompute";
|
|
874
|
+
export interface EditDerivedDataOptions {
|
|
875
|
+
target: string;
|
|
876
|
+
definition: RequestedDatasetTransform;
|
|
877
|
+
dependents?: DerivedDataDependents;
|
|
878
|
+
}
|
|
670
879
|
export interface CreateDerivedDataOptions {
|
|
671
880
|
id: string;
|
|
672
881
|
source: string;
|
|
@@ -677,6 +886,7 @@ export interface DatasetSummaryTransform {
|
|
|
677
886
|
groupBy: readonly string[];
|
|
678
887
|
aggregates: readonly SummaryAggregateOptions[];
|
|
679
888
|
members?: string;
|
|
889
|
+
weight?: StatisticalWeight;
|
|
680
890
|
}
|
|
681
891
|
export interface SummaryAggregateOptions {
|
|
682
892
|
op: AggregateOperation;
|
|
@@ -689,11 +899,16 @@ export interface SummaryDataOptions {
|
|
|
689
899
|
groupBy?: string | readonly string[];
|
|
690
900
|
aggregates: readonly SummaryAggregateOptions[];
|
|
691
901
|
members?: string;
|
|
902
|
+
weight?: StatisticalWeight;
|
|
692
903
|
}
|
|
693
904
|
export interface BindMarkDataOptions {
|
|
694
905
|
target: string;
|
|
695
906
|
data: string;
|
|
696
907
|
}
|
|
908
|
+
|
|
909
|
+
export interface RemoveResourceOptions {
|
|
910
|
+
readonly id: string;
|
|
911
|
+
}
|
|
697
912
|
export type MarkGraphicProperty =
|
|
698
913
|
| "x" | "y" | "width" | "height" | "radius"
|
|
699
914
|
| "x1" | "y1" | "x2" | "y2"
|
|
@@ -702,7 +917,7 @@ export type MarkSelector = {
|
|
|
702
917
|
grain?: "item" | "stack";
|
|
703
918
|
} & (
|
|
704
919
|
| { field: string; channel?: never; property?: never }
|
|
705
|
-
| { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset" | "theta" | "radius" | "color" | "strokeDash" | "strokeWidth" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
|
|
920
|
+
| { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset" | "theta" | "radius" | "color" | "stroke" | "strokeDash" | "strokeWidth" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
|
|
706
921
|
| { property: MarkGraphicProperty; field?: never; channel?: never }
|
|
707
922
|
) & (
|
|
708
923
|
| { op: "eq" | "neq" | "gt" | "gte" | "lt" | "lte"; value: unknown }
|
|
@@ -804,6 +1019,14 @@ export type PointShape =
|
|
|
804
1019
|
| "star"
|
|
805
1020
|
| "hexagon"
|
|
806
1021
|
| "wye";
|
|
1022
|
+
export type StrokeStyleDetails = {
|
|
1023
|
+
lineCap?: "butt" | "round" | "square";
|
|
1024
|
+
lineJoin?: "miter" | "round" | "bevel";
|
|
1025
|
+
miterLimit?: number;
|
|
1026
|
+
};
|
|
1027
|
+
export type RectStyleDetails = StrokeStyleDetails & {
|
|
1028
|
+
cornerRadius?: number;
|
|
1029
|
+
};
|
|
807
1030
|
export type PaletteName =
|
|
808
1031
|
| "accent"
|
|
809
1032
|
| "category10" | "category20" | "category20b" | "category20c"
|
|
@@ -834,6 +1057,11 @@ export type ScaleRange = "auto" | readonly unknown[] | {
|
|
|
834
1057
|
readonly palette: Palette;
|
|
835
1058
|
};
|
|
836
1059
|
export type ActionOptions = Record<string, unknown>;
|
|
1060
|
+
/**
|
|
1061
|
+
* One semantic assignment or removal. Complete unreferenced source datasets and
|
|
1062
|
+
* coordinates can be removed; source values remain immutable. Domain removal
|
|
1063
|
+
* actions own full resource/configuration lifecycle checks and cleanup.
|
|
1064
|
+
*/
|
|
837
1065
|
export type EditSemanticOptions =
|
|
838
1066
|
| { property: string; value: unknown; remove?: false }
|
|
839
1067
|
| { property: string; remove: true; value?: never };
|
|
@@ -878,7 +1106,9 @@ export interface SemanticScale {
|
|
|
878
1106
|
|
|
879
1107
|
export interface SemanticCoordinate {
|
|
880
1108
|
readonly id: string;
|
|
881
|
-
readonly type?: "cartesian" | "polar";
|
|
1109
|
+
readonly type?: "cartesian" | "polar" | "parallel";
|
|
1110
|
+
readonly aspect?: CoordinateAspect;
|
|
1111
|
+
readonly polarFrame?: Exclude<PolarFrameOptions, "auto">;
|
|
882
1112
|
readonly layers?: readonly string[];
|
|
883
1113
|
readonly [key: string]: unknown;
|
|
884
1114
|
}
|
|
@@ -976,7 +1206,7 @@ export interface AxisTicksAndLabelsOptions<P extends string> {
|
|
|
976
1206
|
count?: number;
|
|
977
1207
|
values?: readonly AxisValue[];
|
|
978
1208
|
ticks?: AxisTickStyleOptions;
|
|
979
|
-
labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions;
|
|
1209
|
+
labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions & DisplayLabelOptions;
|
|
980
1210
|
}
|
|
981
1211
|
export interface AxisTitleOptions<P extends string> {
|
|
982
1212
|
text?: string;
|
|
@@ -1016,7 +1246,7 @@ export interface AxisTickOptions<P extends string>
|
|
|
1016
1246
|
values?: readonly AxisValue[];
|
|
1017
1247
|
}
|
|
1018
1248
|
export interface AxisLabelOptions<P extends string>
|
|
1019
|
-
extends AxisLabelStyleOptions, AxisLabelLayoutOptions {
|
|
1249
|
+
extends AxisLabelStyleOptions, AxisLabelLayoutOptions, DisplayLabelOptions {
|
|
1020
1250
|
scale?: string;
|
|
1021
1251
|
position?: P;
|
|
1022
1252
|
count?: number;
|
|
@@ -1072,6 +1302,11 @@ export interface PolarTicksAndLabelsOptions {
|
|
|
1072
1302
|
ticks?: AxisTickStyleOptions;
|
|
1073
1303
|
labels?: AxisLabelStyleOptions;
|
|
1074
1304
|
}
|
|
1305
|
+
export type ThetaAxisLabelOptions = PolarLabelOptions & DisplayLabelOptions;
|
|
1306
|
+
export interface ThetaTicksAndLabelsOptions
|
|
1307
|
+
extends Omit<PolarTicksAndLabelsOptions, "labels"> {
|
|
1308
|
+
labels?: AxisLabelStyleOptions & DisplayLabelOptions;
|
|
1309
|
+
}
|
|
1075
1310
|
export interface PolarTitleOptions {
|
|
1076
1311
|
text?: string;
|
|
1077
1312
|
offset?: number;
|
|
@@ -1094,7 +1329,8 @@ export type CreateThetaAxisTicksOptions = Omit<PolarTickOptions, "count" | "valu
|
|
|
1094
1329
|
export type CreateRadialAxisTicksOptions = Omit<PolarTickOptions, "count" | "values"> &
|
|
1095
1330
|
PolarAxisTickSelection & PolarGuideResourceOptions;
|
|
1096
1331
|
export type CreateThetaAxisLabelsOptions = Omit<PolarLabelOptions, "count" | "values"> &
|
|
1097
|
-
PolarAxisTickSelection & Omit<PolarGuideResourceOptions, "angle"
|
|
1332
|
+
PolarAxisTickSelection & Omit<PolarGuideResourceOptions, "angle"> &
|
|
1333
|
+
DisplayLabelOptions;
|
|
1098
1334
|
export type CreateRadialAxisLabelsOptions = Omit<PolarLabelOptions, "count" | "values"> &
|
|
1099
1335
|
PolarAxisTickSelection & PolarGuideResourceOptions;
|
|
1100
1336
|
export type CreateThetaAxisTitleOptions = PolarTitleOptions &
|
|
@@ -1105,6 +1341,10 @@ export interface CompletePolarAxisOptions extends Omit<PolarGuideResourceOptions
|
|
|
1105
1341
|
ticksAndLabels?: false | PolarTicksAndLabelsOptions;
|
|
1106
1342
|
title?: false | PolarTitleOptions;
|
|
1107
1343
|
}
|
|
1344
|
+
export interface CompleteThetaAxisOptions
|
|
1345
|
+
extends Omit<CompletePolarAxisOptions, "ticksAndLabels"> {
|
|
1346
|
+
ticksAndLabels?: false | ThetaTicksAndLabelsOptions;
|
|
1347
|
+
}
|
|
1108
1348
|
export interface CompleteRadialAxisOptions
|
|
1109
1349
|
extends Omit<CompletePolarAxisOptions, "title"> {
|
|
1110
1350
|
angle?: number;
|
|
@@ -1118,6 +1358,11 @@ export interface EditPolarAxisOptions {
|
|
|
1118
1358
|
ticksAndLabels?: false | PolarTicksAndLabelsOptions;
|
|
1119
1359
|
title?: false | PolarTitleOptions;
|
|
1120
1360
|
}
|
|
1361
|
+
export interface EditThetaAxisOptions
|
|
1362
|
+
extends Omit<EditPolarAxisOptions, "angle" | "labels" | "ticksAndLabels"> {
|
|
1363
|
+
labels?: false | ThetaAxisLabelOptions;
|
|
1364
|
+
ticksAndLabels?: false | ThetaTicksAndLabelsOptions;
|
|
1365
|
+
}
|
|
1121
1366
|
export interface EditRadialAxisOptions
|
|
1122
1367
|
extends Omit<EditPolarAxisOptions, "title"> {
|
|
1123
1368
|
title?: false | RadialTitleOptions;
|
|
@@ -1180,6 +1425,16 @@ type CartesianAxesOptions = Omit<
|
|
|
1180
1425
|
> & {
|
|
1181
1426
|
coordinate?: { id?: string; type?: "auto" | "cartesian" };
|
|
1182
1427
|
};
|
|
1428
|
+
type CAxisTicks<P extends string> = Omit<AxisTicksAndLabelsOptions<P>, "labels"> & {
|
|
1429
|
+
labels?: AxisLabelStyleOptions & AxisLabelLayoutOptions;
|
|
1430
|
+
};
|
|
1431
|
+
type CAxis<P extends string> = Omit<CompleteAxisOptions<P>, "ticksAndLabels"> & {
|
|
1432
|
+
ticksAndLabels?: false | Omit<CAxisTicks<P>, "scale" | "position">;
|
|
1433
|
+
};
|
|
1434
|
+
type CAxes = Omit<CartesianAxesOptions, "x" | "y"> & {
|
|
1435
|
+
x?: false | CAxis<XAxisPosition>;
|
|
1436
|
+
y?: false | CAxis<YAxisPosition>;
|
|
1437
|
+
};
|
|
1183
1438
|
type CartesianGridOptions = Pick<CreateGridOptions, "horizontal" | "vertical">;
|
|
1184
1439
|
type FilledMarkLegendOptions = Omit<LegendOptions, "symbol"> & {
|
|
1185
1440
|
symbol?: "auto"
|
|
@@ -1194,7 +1449,10 @@ type CategoricalLegendTextOptions = {
|
|
|
1194
1449
|
fontWeight?: string | number;
|
|
1195
1450
|
format?: "auto";
|
|
1196
1451
|
};
|
|
1197
|
-
type PathLegendOptions = Omit<
|
|
1452
|
+
type PathLegendOptions = Omit<
|
|
1453
|
+
LegendOptions,
|
|
1454
|
+
"symbol" | "gradient" | "count" | "values" | "labels"
|
|
1455
|
+
> & {
|
|
1198
1456
|
symbol?: "auto" | { length?: number; lineWidth?: number }
|
|
1199
1457
|
| { layers: readonly LegendSymbolLayer[] };
|
|
1200
1458
|
labels?: CategoricalLegendTextOptions;
|
|
@@ -1210,12 +1468,23 @@ type CartesianPathGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
|
|
|
1210
1468
|
type CartesianCategoricalGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
|
|
1211
1469
|
legend?: false | (Omit<
|
|
1212
1470
|
FilledMarkLegendOptions,
|
|
1213
|
-
"count" | "gradient" | "labels" | "order"
|
|
1471
|
+
"count" | "values" | "gradient" | "labels" | "order"
|
|
1214
1472
|
> & {
|
|
1215
1473
|
labels?: CategoricalLegendTextOptions;
|
|
1216
1474
|
order?: CartesianLegendOrder;
|
|
1217
1475
|
});
|
|
1218
1476
|
};
|
|
1477
|
+
type CPathGuides = Omit<CartesianPathGuideOptions, "axes"> & {
|
|
1478
|
+
axes?: false | CAxes;
|
|
1479
|
+
};
|
|
1480
|
+
type CCategoricalGuides = Omit<CartesianCategoricalGuideOptions, "axes"> & {
|
|
1481
|
+
axes?: false | CAxes;
|
|
1482
|
+
};
|
|
1483
|
+
type ColorGuides = Omit<CartesianGuideOptions, "legend"> & {
|
|
1484
|
+
legend?: false | (Omit<FilledMarkLegendOptions, "values" | "order"> & {
|
|
1485
|
+
order?: CartesianLegendOrder;
|
|
1486
|
+
});
|
|
1487
|
+
};
|
|
1219
1488
|
type BoxPlotGuideOptions = Omit<CartesianGuideOptions, "legend"> & { legend?: false };
|
|
1220
1489
|
type GradientPlotDensityLegendOptions = {
|
|
1221
1490
|
title?: string;
|
|
@@ -1238,6 +1507,34 @@ export interface CreateCoordinateOptions {
|
|
|
1238
1507
|
layers?: readonly string[];
|
|
1239
1508
|
}
|
|
1240
1509
|
|
|
1510
|
+
export type CoordinateAspectAlign = "start" | "center" | "end";
|
|
1511
|
+
export type CoordinateAspect = "auto" | {
|
|
1512
|
+
mode: "frame" | "data";
|
|
1513
|
+
ratio: number;
|
|
1514
|
+
alignX?: CoordinateAspectAlign;
|
|
1515
|
+
alignY?: CoordinateAspectAlign;
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
export type PolarFrameCenter = {
|
|
1519
|
+
x: number;
|
|
1520
|
+
y: number;
|
|
1521
|
+
};
|
|
1522
|
+
export type PolarFrameRadius =
|
|
1523
|
+
| { unit: "fraction"; value: number }
|
|
1524
|
+
| { unit: "px"; value: number };
|
|
1525
|
+
export type PolarFrameOptions = "auto" | {
|
|
1526
|
+
center?: PolarFrameCenter;
|
|
1527
|
+
radius?: PolarFrameRadius;
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
type EditCoordinateTarget = {
|
|
1531
|
+
target: string;
|
|
1532
|
+
};
|
|
1533
|
+
export type EditCoordinateOptions = EditCoordinateTarget & (
|
|
1534
|
+
| { aspect: CoordinateAspect; polarFrame?: PolarFrameOptions }
|
|
1535
|
+
| { aspect?: CoordinateAspect; polarFrame: PolarFrameOptions }
|
|
1536
|
+
);
|
|
1537
|
+
|
|
1241
1538
|
export type RadialMapping = "area" | "radius-length";
|
|
1242
1539
|
|
|
1243
1540
|
export interface ScaleOptions {
|
|
@@ -1323,12 +1620,59 @@ export type NonPointCategoricalColorScaleOptions = ScaleFields<"id" | "palette">
|
|
|
1323
1620
|
};
|
|
1324
1621
|
export type CategoricalColorScaleOptions =
|
|
1325
1622
|
NonPointCategoricalColorScaleOptions & { unknown?: string };
|
|
1326
|
-
|
|
1327
|
-
type?: "linear";
|
|
1328
|
-
domain?: "auto" | readonly [number, number];
|
|
1329
|
-
range?: "auto" | readonly [number, number];
|
|
1623
|
+
type SizeScaleCommonOptions = ScaleFields<"id" | "reverse"> & {
|
|
1330
1624
|
unknown?: number;
|
|
1331
1625
|
};
|
|
1626
|
+
type ContinuousSizeScaleOptions = SizeScaleCommonOptions &
|
|
1627
|
+
ScaleFields<"clamp"> & {
|
|
1628
|
+
domain?: "auto" | readonly [number, number];
|
|
1629
|
+
range?: "auto" | readonly [number, number];
|
|
1630
|
+
};
|
|
1631
|
+
export type SizeScaleOptions =
|
|
1632
|
+
| (ContinuousSizeScaleOptions & {
|
|
1633
|
+
type?: "linear";
|
|
1634
|
+
base?: never;
|
|
1635
|
+
exponent?: never;
|
|
1636
|
+
})
|
|
1637
|
+
| (ContinuousSizeScaleOptions & {
|
|
1638
|
+
type: "log";
|
|
1639
|
+
base?: number;
|
|
1640
|
+
exponent?: never;
|
|
1641
|
+
})
|
|
1642
|
+
| (ContinuousSizeScaleOptions & {
|
|
1643
|
+
type: "sqrt";
|
|
1644
|
+
base?: never;
|
|
1645
|
+
exponent?: never;
|
|
1646
|
+
})
|
|
1647
|
+
| (ContinuousSizeScaleOptions & {
|
|
1648
|
+
type: "pow";
|
|
1649
|
+
exponent: number;
|
|
1650
|
+
base?: never;
|
|
1651
|
+
})
|
|
1652
|
+
| (SizeScaleCommonOptions & {
|
|
1653
|
+
type: "quantize";
|
|
1654
|
+
domain?: "auto" | readonly [number, number];
|
|
1655
|
+
range: readonly [number, number, ...number[]];
|
|
1656
|
+
clamp?: never;
|
|
1657
|
+
base?: never;
|
|
1658
|
+
exponent?: never;
|
|
1659
|
+
})
|
|
1660
|
+
| (SizeScaleCommonOptions & {
|
|
1661
|
+
type: "quantile";
|
|
1662
|
+
domain?: "auto" | readonly [number, ...number[]];
|
|
1663
|
+
range: readonly [number, number, ...number[]];
|
|
1664
|
+
clamp?: never;
|
|
1665
|
+
base?: never;
|
|
1666
|
+
exponent?: never;
|
|
1667
|
+
})
|
|
1668
|
+
| (SizeScaleCommonOptions & {
|
|
1669
|
+
type: "threshold";
|
|
1670
|
+
domain: readonly [number, ...number[]];
|
|
1671
|
+
range: readonly [number, number, ...number[]];
|
|
1672
|
+
clamp?: never;
|
|
1673
|
+
base?: never;
|
|
1674
|
+
exponent?: never;
|
|
1675
|
+
});
|
|
1332
1676
|
export type ShapeScaleOptions = ScaleFields<"id"> & {
|
|
1333
1677
|
type?: "ordinal";
|
|
1334
1678
|
domain?: "auto" | readonly unknown[];
|
|
@@ -1361,6 +1705,76 @@ export interface EditScaleOptions {
|
|
|
1361
1705
|
unknown?: unknown;
|
|
1362
1706
|
}
|
|
1363
1707
|
|
|
1708
|
+
type FocusedScaleSelection = { id?: string; target?: string };
|
|
1709
|
+
export type EditXScaleOptions = FocusedScaleSelection & WithoutScaleId<
|
|
1710
|
+
QuantitativePositionScaleOptions | TemporalPositionScaleOptions | CategoricalPositionScaleOptions
|
|
1711
|
+
>;
|
|
1712
|
+
export type EditYScaleOptions = EditXScaleOptions;
|
|
1713
|
+
export type OffsetScaleEditPatch = Pick<
|
|
1714
|
+
ScaleOptions,
|
|
1715
|
+
"domain" | "reverse" | "padding" | "paddingInner" | "paddingOuter" | "align"
|
|
1716
|
+
>;
|
|
1717
|
+
export type EditXOffsetScaleOptions = { target: string } & OffsetScaleEditPatch;
|
|
1718
|
+
export type EditYOffsetScaleOptions = EditXOffsetScaleOptions;
|
|
1719
|
+
export type EditParallelScaleOptions = {
|
|
1720
|
+
target: string;
|
|
1721
|
+
dimension: string;
|
|
1722
|
+
} & WithoutScaleId<
|
|
1723
|
+
QuantitativePositionScaleOptions | CategoricalPositionScaleOptions
|
|
1724
|
+
>;
|
|
1725
|
+
export type EditThetaScaleOptions = FocusedScaleSelection & WithoutScaleId<ThetaScaleOptions>;
|
|
1726
|
+
export type EditRScaleOptions = FocusedScaleSelection & WithoutScaleId<RadiusScaleOptions> & {
|
|
1727
|
+
radialMapping?: RadialMapping;
|
|
1728
|
+
};
|
|
1729
|
+
export type EditColorScaleOptions = FocusedScaleSelection & WithoutScaleId<
|
|
1730
|
+
CategoricalColorScaleOptions | ContinuousColorScaleOptions | DiscretizedColorScaleOptions
|
|
1731
|
+
>;
|
|
1732
|
+
export type EditStrokeScaleOptions = { target: string } & Omit<
|
|
1733
|
+
EditColorScaleOptions,
|
|
1734
|
+
"id" | "target"
|
|
1735
|
+
>;
|
|
1736
|
+
type ExistingSizeScaleEditPatch = {
|
|
1737
|
+
type?: never;
|
|
1738
|
+
domain?: "auto" | readonly [number, ...number[]];
|
|
1739
|
+
range?: "auto" | readonly [number, number, ...number[]];
|
|
1740
|
+
unknown?: number;
|
|
1741
|
+
clamp?: boolean;
|
|
1742
|
+
reverse?: boolean;
|
|
1743
|
+
base?: number;
|
|
1744
|
+
exponent?: number;
|
|
1745
|
+
};
|
|
1746
|
+
type SizeScaleTypeEditPatch =
|
|
1747
|
+
| (Omit<WithoutScaleId<SizeScaleOptions>, "type"> & { type?: "linear" })
|
|
1748
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "log" }>, "type"> & {
|
|
1749
|
+
type: "log";
|
|
1750
|
+
})
|
|
1751
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "sqrt" }>, "type"> & {
|
|
1752
|
+
type: "sqrt";
|
|
1753
|
+
})
|
|
1754
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "pow" }>, "type" | "exponent"> & {
|
|
1755
|
+
type: "pow";
|
|
1756
|
+
exponent?: number;
|
|
1757
|
+
})
|
|
1758
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "quantize" }>, "type" | "range"> & {
|
|
1759
|
+
type: "quantize";
|
|
1760
|
+
range?: readonly [number, number, ...number[]];
|
|
1761
|
+
})
|
|
1762
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "quantile" }>, "type" | "range"> & {
|
|
1763
|
+
type: "quantile";
|
|
1764
|
+
range?: readonly [number, number, ...number[]];
|
|
1765
|
+
})
|
|
1766
|
+
| (Omit<Extract<WithoutScaleId<SizeScaleOptions>, { type: "threshold" }>, "type" | "domain" | "range"> & {
|
|
1767
|
+
type: "threshold";
|
|
1768
|
+
domain?: readonly [number, ...number[]];
|
|
1769
|
+
range?: readonly [number, number, ...number[]];
|
|
1770
|
+
});
|
|
1771
|
+
export type EditSizeScaleOptions = FocusedScaleSelection &
|
|
1772
|
+
(ExistingSizeScaleEditPatch | SizeScaleTypeEditPatch);
|
|
1773
|
+
export type EditOpacityScaleOptions = FocusedScaleSelection & WithoutScaleId<OpacityScaleOptions>;
|
|
1774
|
+
export type EditShapeScaleOptions = FocusedScaleSelection & WithoutScaleId<ShapeScaleOptions>;
|
|
1775
|
+
export type EditStrokeWidthScaleOptions = FocusedScaleSelection & WithoutScaleId<StrokeWidthScaleOptions>;
|
|
1776
|
+
export type EditStrokeDashScaleOptions = FocusedScaleSelection & WithoutScaleId<DashScaleOptions>;
|
|
1777
|
+
|
|
1364
1778
|
interface PositionEncodingBase {
|
|
1365
1779
|
field: string;
|
|
1366
1780
|
target?: string;
|
|
@@ -1467,7 +1881,7 @@ export type RadialEncodingOptions = {
|
|
|
1467
1881
|
fieldType?: "quantitative";
|
|
1468
1882
|
coordinate?: string;
|
|
1469
1883
|
} & (
|
|
1470
|
-
| { field: string; mapping?:
|
|
1884
|
+
| { field: string; mapping?: false; aggregate?: never; scale?: RadiusScaleOptions }
|
|
1471
1885
|
| { field: string; mapping?: RadialMapping; aggregate: "sum"; scale?: MeasuredRadiusScaleOptions }
|
|
1472
1886
|
| { field?: never; mapping?: RadialMapping; aggregate: "count"; scale?: MeasuredRadiusScaleOptions }
|
|
1473
1887
|
);
|
|
@@ -1557,6 +1971,7 @@ export type HistogramEncodingOptions = {
|
|
|
1557
1971
|
stack?: StackMode;
|
|
1558
1972
|
xScale?: NonPointQuantitativePositionScaleOptions;
|
|
1559
1973
|
yScale?: NonPointZeroSupportingPositionScaleOptions;
|
|
1974
|
+
weight?: StatisticalWeight;
|
|
1560
1975
|
} & (
|
|
1561
1976
|
| { maxBins?: number; binStep?: never; binBoundaries?: never }
|
|
1562
1977
|
| { maxBins?: never; binStep: number; binBoundaries?: never }
|
|
@@ -1586,6 +2001,7 @@ export interface DensityDataOptions {
|
|
|
1586
2001
|
steps?: number;
|
|
1587
2002
|
kernel?: DensityKernel;
|
|
1588
2003
|
normalization?: DensityNormalization;
|
|
2004
|
+
weight?: StatisticalWeight;
|
|
1589
2005
|
as?: readonly [string, string];
|
|
1590
2006
|
}
|
|
1591
2007
|
|
|
@@ -1690,6 +2106,7 @@ export interface WindowDataOptions {
|
|
|
1690
2106
|
partitionBy?: string | readonly string[];
|
|
1691
2107
|
sortBy?: readonly WindowSort[];
|
|
1692
2108
|
operations: readonly WindowOperation[];
|
|
2109
|
+
temporalUnit?: TemporalInputUnit;
|
|
1693
2110
|
}
|
|
1694
2111
|
|
|
1695
2112
|
export interface ECDFDataOptions {
|
|
@@ -1702,14 +2119,31 @@ export interface ECDFDataOptions {
|
|
|
1702
2119
|
as?: ECDFOutputFields;
|
|
1703
2120
|
}
|
|
1704
2121
|
|
|
1705
|
-
|
|
2122
|
+
type TimeUnitDataBaseOptions = {
|
|
1706
2123
|
id: string;
|
|
1707
2124
|
source?: string;
|
|
1708
2125
|
field: string;
|
|
1709
|
-
unit: TimeUnit;
|
|
1710
2126
|
temporalUnit?: TemporalInputUnit;
|
|
1711
2127
|
as: string;
|
|
1712
|
-
|
|
2128
|
+
timeZone?: string;
|
|
2129
|
+
};
|
|
2130
|
+
export type TimeUnitDataOptions = TimeUnitDataBaseOptions & (
|
|
2131
|
+
| {
|
|
2132
|
+
unit: Exclude<TimeUnit, "week">;
|
|
2133
|
+
weekStartsOn?: never;
|
|
2134
|
+
weekRule?: never;
|
|
2135
|
+
}
|
|
2136
|
+
| {
|
|
2137
|
+
unit: "week";
|
|
2138
|
+
weekRule?: "calendar";
|
|
2139
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
2140
|
+
}
|
|
2141
|
+
| {
|
|
2142
|
+
unit: "week";
|
|
2143
|
+
weekRule: "iso";
|
|
2144
|
+
weekStartsOn?: 1;
|
|
2145
|
+
}
|
|
2146
|
+
);
|
|
1713
2147
|
|
|
1714
2148
|
export interface BinDataOutputFields {
|
|
1715
2149
|
lower?: string;
|
|
@@ -1734,6 +2168,7 @@ export type BinDataOptions = {
|
|
|
1734
2168
|
zero?: boolean;
|
|
1735
2169
|
includeEmpty?: boolean;
|
|
1736
2170
|
members?: boolean;
|
|
2171
|
+
weight?: StatisticalWeight;
|
|
1737
2172
|
as?: BinDataOutputFields;
|
|
1738
2173
|
} & BinDataMode;
|
|
1739
2174
|
|
|
@@ -1753,6 +2188,79 @@ export interface ComputedDataOptions {
|
|
|
1753
2188
|
as: string;
|
|
1754
2189
|
expression: ComputedExpression;
|
|
1755
2190
|
}
|
|
2191
|
+
type NormalizedDataBaseOptions = {
|
|
2192
|
+
id: string;
|
|
2193
|
+
source?: string;
|
|
2194
|
+
field: string;
|
|
2195
|
+
as: string;
|
|
2196
|
+
groupBy?: string | readonly string[];
|
|
2197
|
+
};
|
|
2198
|
+
type NormalizeBaselineOptions =
|
|
2199
|
+
| {
|
|
2200
|
+
baseline?: { position: "first" | "last" };
|
|
2201
|
+
sortBy: readonly [WindowSort, ...WindowSort[]];
|
|
2202
|
+
}
|
|
2203
|
+
| {
|
|
2204
|
+
baseline: { value: number };
|
|
2205
|
+
sortBy?: readonly WindowSort[];
|
|
2206
|
+
};
|
|
2207
|
+
export type NormalizedDataOptions = NormalizedDataBaseOptions & (
|
|
2208
|
+
| {
|
|
2209
|
+
method: "share" | "minmax";
|
|
2210
|
+
zeroDenominator?: NormalizeZeroDenominator;
|
|
2211
|
+
}
|
|
2212
|
+
| {
|
|
2213
|
+
method: "zscore";
|
|
2214
|
+
variance?: "population" | "sample";
|
|
2215
|
+
zeroDenominator?: NormalizeZeroDenominator;
|
|
2216
|
+
}
|
|
2217
|
+
| ({
|
|
2218
|
+
method: "index" | "percentChange";
|
|
2219
|
+
zeroDenominator?: NormalizeZeroDenominator;
|
|
2220
|
+
} & NormalizeBaselineOptions)
|
|
2221
|
+
| ({ method: "change" } & NormalizeBaselineOptions)
|
|
2222
|
+
);
|
|
2223
|
+
type CompleteDataBaseOptions = {
|
|
2224
|
+
id: string;
|
|
2225
|
+
source?: string;
|
|
2226
|
+
key: string;
|
|
2227
|
+
groupBy?: string | readonly string[];
|
|
2228
|
+
fill?: Readonly<Record<string, DatasetScalar>>;
|
|
2229
|
+
members?: string;
|
|
2230
|
+
};
|
|
2231
|
+
export type CompleteDataOptions = CompleteDataBaseOptions & (
|
|
2232
|
+
| { values: readonly [DatasetScalar, ...DatasetScalar[]]; sequence?: never }
|
|
2233
|
+
| {
|
|
2234
|
+
values?: never;
|
|
2235
|
+
sequence: { start: number; end: number; step: number };
|
|
2236
|
+
}
|
|
2237
|
+
| { values?: never; sequence?: never }
|
|
2238
|
+
);
|
|
2239
|
+
type ImputedDataBaseOptions = {
|
|
2240
|
+
id: string;
|
|
2241
|
+
source?: string;
|
|
2242
|
+
fields: string | readonly [string, ...string[]];
|
|
2243
|
+
groupBy?: string | readonly string[];
|
|
2244
|
+
edges?: "keep" | "error";
|
|
2245
|
+
maxGap?: number;
|
|
2246
|
+
};
|
|
2247
|
+
export type ImputedDataOptions = ImputedDataBaseOptions & (
|
|
2248
|
+
| {
|
|
2249
|
+
method: "constant";
|
|
2250
|
+
value: DatasetScalar;
|
|
2251
|
+
sortBy?: readonly WindowSort[];
|
|
2252
|
+
}
|
|
2253
|
+
| {
|
|
2254
|
+
method: "forward" | "backward";
|
|
2255
|
+
value?: never;
|
|
2256
|
+
sortBy: readonly [WindowSort, ...WindowSort[]];
|
|
2257
|
+
}
|
|
2258
|
+
| {
|
|
2259
|
+
method: "linear";
|
|
2260
|
+
value?: never;
|
|
2261
|
+
sortBy: readonly [{ field: string; order?: "ascending" }];
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
1756
2264
|
export interface StackDataOptions {
|
|
1757
2265
|
id: string;
|
|
1758
2266
|
source?: string;
|
|
@@ -1785,8 +2293,51 @@ export interface EditBin2DDataOptions {
|
|
|
1785
2293
|
includeEmpty?: boolean;
|
|
1786
2294
|
members?: boolean;
|
|
1787
2295
|
as?: DatasetBin2DOutputFields;
|
|
2296
|
+
dependents?: DerivedDataDependents;
|
|
1788
2297
|
}
|
|
1789
2298
|
|
|
2299
|
+
type FocusedDerivedDataPatch<T> = T extends unknown
|
|
2300
|
+
? Partial<Omit<T, "id" | "source">>
|
|
2301
|
+
: never;
|
|
2302
|
+
type FocusedDerivedDataEdit<T> = {
|
|
2303
|
+
target: string;
|
|
2304
|
+
dependents?: DerivedDataDependents;
|
|
2305
|
+
} & FocusedDerivedDataPatch<T>;
|
|
2306
|
+
type FocusedWeightedDerivedDataEdit<T, Weight> = {
|
|
2307
|
+
target: string;
|
|
2308
|
+
dependents?: DerivedDataDependents;
|
|
2309
|
+
} & (T extends unknown
|
|
2310
|
+
? Omit<FocusedDerivedDataPatch<T>, "weight"> & { weight?: Weight | false }
|
|
2311
|
+
: never);
|
|
2312
|
+
|
|
2313
|
+
export type EditComputedDataOptions = FocusedDerivedDataEdit<ComputedDataOptions>;
|
|
2314
|
+
export type EditFilteredDataOptions = FocusedDerivedDataEdit<FilterDataOptions>;
|
|
2315
|
+
export type EditFoldDataOptions = FocusedDerivedDataEdit<FoldDataOptions>;
|
|
2316
|
+
export type EditSummaryDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2317
|
+
SummaryDataOptions,
|
|
2318
|
+
StatisticalWeight
|
|
2319
|
+
>;
|
|
2320
|
+
export type EditBinDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2321
|
+
BinDataOptions,
|
|
2322
|
+
StatisticalWeight
|
|
2323
|
+
>;
|
|
2324
|
+
export type EditTimeUnitDataOptions = FocusedDerivedDataEdit<TimeUnitDataOptions>;
|
|
2325
|
+
export type EditWindowDataOptions = FocusedDerivedDataEdit<WindowDataOptions>;
|
|
2326
|
+
export type EditDensityDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2327
|
+
DensityDataOptions,
|
|
2328
|
+
StatisticalWeight
|
|
2329
|
+
>;
|
|
2330
|
+
export type EditStackDataOptions = FocusedDerivedDataEdit<StackDataOptions>;
|
|
2331
|
+
export type EditRegressionDataOptions = FocusedDerivedDataEdit<RegressionDataOptions>;
|
|
2332
|
+
export type EditIntervalDataOptions = FocusedDerivedDataEdit<IntervalDataOptions>;
|
|
2333
|
+
export type EditECDFDataOptions = FocusedWeightedDerivedDataEdit<
|
|
2334
|
+
ECDFDataOptions,
|
|
2335
|
+
string
|
|
2336
|
+
>;
|
|
2337
|
+
export type EditNormalizedDataOptions = FocusedDerivedDataEdit<NormalizedDataOptions>;
|
|
2338
|
+
export type EditCompleteDataOptions = FocusedDerivedDataEdit<CompleteDataOptions>;
|
|
2339
|
+
export type EditImputedDataOptions = FocusedDerivedDataEdit<ImputedDataOptions>;
|
|
2340
|
+
|
|
1790
2341
|
export type ErrorBarPositionChannel = { field?: string } & (
|
|
1791
2342
|
| {
|
|
1792
2343
|
fieldType?: "nominal" | "ordinal";
|
|
@@ -1831,7 +2382,7 @@ export interface ErrorBarOffsetChannel {
|
|
|
1831
2382
|
paddingOuter?: number;
|
|
1832
2383
|
}
|
|
1833
2384
|
|
|
1834
|
-
export interface ErrorBarOptions {
|
|
2385
|
+
export interface ErrorBarOptions extends StrokeStyleDetails {
|
|
1835
2386
|
id?: string;
|
|
1836
2387
|
target?: string;
|
|
1837
2388
|
data?: string;
|
|
@@ -1849,7 +2400,7 @@ export interface ErrorBarOptions {
|
|
|
1849
2400
|
opacity?: number;
|
|
1850
2401
|
}
|
|
1851
2402
|
|
|
1852
|
-
export interface EditErrorBarOptions {
|
|
2403
|
+
export interface EditErrorBarOptions extends StrokeStyleDetails {
|
|
1853
2404
|
target?: string;
|
|
1854
2405
|
data?: string;
|
|
1855
2406
|
x?: ErrorBarPositionChannel | ErrorBarIntervalChannel;
|
|
@@ -1901,17 +2452,17 @@ export interface BoxPlotOptions {
|
|
|
1901
2452
|
whisker?: BoxPlotWhisker;
|
|
1902
2453
|
width?: { band?: number };
|
|
1903
2454
|
outliers?: boolean;
|
|
1904
|
-
box?: {
|
|
2455
|
+
box?: RectStyleDetails & {
|
|
1905
2456
|
fill?: string;
|
|
1906
2457
|
opacity?: number;
|
|
1907
2458
|
stroke?: string;
|
|
1908
2459
|
strokeWidth?: number;
|
|
1909
2460
|
};
|
|
1910
|
-
median?: {
|
|
2461
|
+
median?: StrokeStyleDetails & {
|
|
1911
2462
|
stroke?: string;
|
|
1912
2463
|
strokeWidth?: number;
|
|
1913
2464
|
};
|
|
1914
|
-
outlier?: {
|
|
2465
|
+
outlier?: StrokeStyleDetails & {
|
|
1915
2466
|
shape?: PointShape;
|
|
1916
2467
|
radius?: number;
|
|
1917
2468
|
opacity?: number;
|
|
@@ -1927,17 +2478,17 @@ export interface EditBoxPlotOptions {
|
|
|
1927
2478
|
whisker?: BoxPlotWhisker;
|
|
1928
2479
|
width?: { band?: number };
|
|
1929
2480
|
outliers?: boolean;
|
|
1930
|
-
box?: {
|
|
2481
|
+
box?: RectStyleDetails & {
|
|
1931
2482
|
fill?: string;
|
|
1932
2483
|
opacity?: number;
|
|
1933
2484
|
stroke?: string;
|
|
1934
2485
|
strokeWidth?: number;
|
|
1935
2486
|
};
|
|
1936
|
-
median?: {
|
|
2487
|
+
median?: StrokeStyleDetails & {
|
|
1937
2488
|
stroke?: string;
|
|
1938
2489
|
strokeWidth?: number;
|
|
1939
2490
|
};
|
|
1940
|
-
outlier?: {
|
|
2491
|
+
outlier?: StrokeStyleDetails & {
|
|
1941
2492
|
shape?: PointShape;
|
|
1942
2493
|
radius?: number;
|
|
1943
2494
|
opacity?: number;
|
|
@@ -1959,7 +2510,7 @@ export interface GradientPlotAppearanceOptions {
|
|
|
1959
2510
|
opacity?: readonly [number, number];
|
|
1960
2511
|
}
|
|
1961
2512
|
|
|
1962
|
-
export interface GradientPlotCenterOptions {
|
|
2513
|
+
export interface GradientPlotCenterOptions extends StrokeStyleDetails {
|
|
1963
2514
|
type?: "mean" | "median";
|
|
1964
2515
|
stroke?: string;
|
|
1965
2516
|
strokeWidth?: number;
|
|
@@ -2001,6 +2552,7 @@ export type ViolinPlotPositionChannel =
|
|
|
2001
2552
|
|
|
2002
2553
|
export interface ViolinPlotDensityOptions
|
|
2003
2554
|
extends GradientPlotDensityOptions {
|
|
2555
|
+
weight?: StatisticalWeight;
|
|
2004
2556
|
width?: DensityPlacementWidth;
|
|
2005
2557
|
side?: "both" | "left" | "right" | "top" | "bottom";
|
|
2006
2558
|
}
|
|
@@ -2020,7 +2572,7 @@ export type ViolinPlotColorOptions =
|
|
|
2020
2572
|
layout?: "overlay";
|
|
2021
2573
|
};
|
|
2022
2574
|
|
|
2023
|
-
export interface ViolinPlotAreaOptions {
|
|
2575
|
+
export interface ViolinPlotAreaOptions extends StrokeStyleDetails {
|
|
2024
2576
|
fill?: string;
|
|
2025
2577
|
opacity?: number;
|
|
2026
2578
|
stroke?: string;
|
|
@@ -2047,7 +2599,9 @@ export interface EditViolinPlotOptions {
|
|
|
2047
2599
|
x?: ViolinPlotPositionChannel;
|
|
2048
2600
|
y?: ViolinPlotPositionChannel;
|
|
2049
2601
|
split?: false | ViolinPlotSplitOptions;
|
|
2050
|
-
density?: ViolinPlotDensityOptions
|
|
2602
|
+
density?: Omit<ViolinPlotDensityOptions, "weight"> & {
|
|
2603
|
+
weight?: StatisticalWeight | false;
|
|
2604
|
+
};
|
|
2051
2605
|
}
|
|
2052
2606
|
|
|
2053
2607
|
export interface EditGradientPlotOptions {
|
|
@@ -2279,7 +2833,7 @@ export interface CreateParallelCoordinatesOptions {
|
|
|
2279
2833
|
missing?: ParallelMissingPolicy;
|
|
2280
2834
|
color?: LineCategoricalColorChannel;
|
|
2281
2835
|
strokeDash?: BasicStrokeDashChannel;
|
|
2282
|
-
line?: {
|
|
2836
|
+
line?: StrokeStyleDetails & {
|
|
2283
2837
|
strokeWidth?: number;
|
|
2284
2838
|
stroke?: string;
|
|
2285
2839
|
opacity?: number;
|
|
@@ -2298,7 +2852,7 @@ export interface CreateScatterPlotOptions {
|
|
|
2298
2852
|
color?: BasicColorChannel;
|
|
2299
2853
|
size?: BasicSizeChannel;
|
|
2300
2854
|
shape?: BasicShapeChannel;
|
|
2301
|
-
point?: {
|
|
2855
|
+
point?: StrokeStyleDetails & {
|
|
2302
2856
|
radius?: number;
|
|
2303
2857
|
shape?: PointShape;
|
|
2304
2858
|
fill?: string;
|
|
@@ -2309,7 +2863,7 @@ export interface CreateScatterPlotOptions {
|
|
|
2309
2863
|
guides?: false | CartesianGuideOptions;
|
|
2310
2864
|
}
|
|
2311
2865
|
|
|
2312
|
-
export interface IntervalPlotErrorBarOptions {
|
|
2866
|
+
export interface IntervalPlotErrorBarOptions extends StrokeStyleDetails {
|
|
2313
2867
|
caps?: boolean;
|
|
2314
2868
|
capSize?: number;
|
|
2315
2869
|
stroke?: string;
|
|
@@ -2431,7 +2985,7 @@ export interface CreateECDFPlotOptions {
|
|
|
2431
2985
|
missing?: "drop" | "error";
|
|
2432
2986
|
as?: ECDFOutputFields;
|
|
2433
2987
|
color?: string | LineCategoricalColorChannel;
|
|
2434
|
-
line?: { strokeWidth?: number; stroke?: string; opacity?: number };
|
|
2988
|
+
line?: StrokeStyleDetails & { strokeWidth?: number; stroke?: string; opacity?: number };
|
|
2435
2989
|
labels?: false | EndpointLabelOptions;
|
|
2436
2990
|
guides?: false | CartesianPathGuideOptions;
|
|
2437
2991
|
}
|
|
@@ -2516,7 +3070,8 @@ type CategoricalThetaTicksAndLabelsOptions = Omit<
|
|
|
2516
3070
|
"count" | "labels"
|
|
2517
3071
|
> & {
|
|
2518
3072
|
count?: never;
|
|
2519
|
-
labels?: Omit<AxisLabelStyleOptions, "format"> &
|
|
3073
|
+
labels?: Omit<AxisLabelStyleOptions, "format"> & DisplayLabelOptions &
|
|
3074
|
+
{ format?: "auto" };
|
|
2520
3075
|
};
|
|
2521
3076
|
type CategoricalThetaAxisOptions = Omit<CompletePolarAxisOptions, "ticksAndLabels"> & {
|
|
2522
3077
|
ticksAndLabels?: false | CategoricalThetaTicksAndLabelsOptions;
|
|
@@ -2582,13 +3137,14 @@ export type RugMeasureChannel = string | (
|
|
|
2582
3137
|
scale?: NonPointTemporalPositionScaleOptions;
|
|
2583
3138
|
}
|
|
2584
3139
|
);
|
|
2585
|
-
export interface RugTickOptions {
|
|
3140
|
+
export interface RugTickOptions extends StrokeStyleDetails {
|
|
2586
3141
|
length?: number;
|
|
2587
3142
|
stroke?: string;
|
|
2588
3143
|
strokeWidth?: number;
|
|
2589
3144
|
opacity?: number;
|
|
2590
3145
|
}
|
|
2591
|
-
export type RugGuideOptions = Omit<CartesianGuideOptions, "legend"> & {
|
|
3146
|
+
export type RugGuideOptions = Omit<CartesianGuideOptions, "axes" | "legend"> & {
|
|
3147
|
+
axes?: false | CAxes;
|
|
2592
3148
|
legend?: false;
|
|
2593
3149
|
};
|
|
2594
3150
|
export type CreateRugPlotOptions = {
|
|
@@ -2624,7 +3180,7 @@ export type CreateStripPlotOptions = {
|
|
|
2624
3180
|
color?: BasicColorChannel;
|
|
2625
3181
|
size?: BasicSizeChannel;
|
|
2626
3182
|
shape?: BasicShapeChannel;
|
|
2627
|
-
point?: {
|
|
3183
|
+
point?: StrokeStyleDetails & {
|
|
2628
3184
|
radius?: number;
|
|
2629
3185
|
shape?: PointShape;
|
|
2630
3186
|
fill?: string;
|
|
@@ -2651,7 +3207,7 @@ export type CreateBeeswarmPlotOptions = {
|
|
|
2651
3207
|
color?: BasicColorChannel;
|
|
2652
3208
|
size?: BasicSizeChannel;
|
|
2653
3209
|
shape?: BasicShapeChannel;
|
|
2654
|
-
point?: {
|
|
3210
|
+
point?: StrokeStyleDetails & {
|
|
2655
3211
|
radius?: number;
|
|
2656
3212
|
shape?: PointShape;
|
|
2657
3213
|
fill?: string;
|
|
@@ -2765,7 +3321,7 @@ export type CreateAreaPlotOptions = {
|
|
|
2765
3321
|
groupBy?: string | readonly [string, ...string[]];
|
|
2766
3322
|
layout?: Exclude<ColorLayout, "group">; missing?: "error" | "break";
|
|
2767
3323
|
color?: string | { field: string; fieldType?: "nominal" | "ordinal"; scale?: NonPointCategoricalColorScaleOptions; palette?: Palette };
|
|
2768
|
-
area?: { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3324
|
+
area?: StrokeStyleDetails & { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
2769
3325
|
guides?: false | DensityPlotGuideOptions;
|
|
2770
3326
|
} & (
|
|
2771
3327
|
| { valueChannel?: "y"; x: AreaPlotIndependentChannel; y: Exclude<AreaPlotMeasureChannel, { lower: unknown }>; baseline?: number }
|
|
@@ -2783,14 +3339,14 @@ export interface CreateLinePlotOptions {
|
|
|
2783
3339
|
color?: LineCategoricalColorChannel;
|
|
2784
3340
|
groupBy?: string | readonly [string, ...string[]];
|
|
2785
3341
|
strokeDash?: BasicStrokeDashChannel;
|
|
2786
|
-
line?: {
|
|
3342
|
+
line?: StrokeStyleDetails & {
|
|
2787
3343
|
strokeWidth?: number;
|
|
2788
3344
|
curve?: CurveInterpolation;
|
|
2789
3345
|
stroke?: string;
|
|
2790
3346
|
opacity?: number;
|
|
2791
3347
|
closed?: false;
|
|
2792
3348
|
};
|
|
2793
|
-
guides?: false |
|
|
3349
|
+
guides?: false | CPathGuides;
|
|
2794
3350
|
}
|
|
2795
3351
|
|
|
2796
3352
|
type BasicHistogramEncoding =
|
|
@@ -2810,13 +3366,13 @@ export interface CreateBarPlotOptions {
|
|
|
2810
3366
|
y: BarYPositionChannel;
|
|
2811
3367
|
color?: BarColorChannel;
|
|
2812
3368
|
width?: Omit<BarWidthOptions, "target">;
|
|
2813
|
-
bar?: {
|
|
3369
|
+
bar?: RectStyleDetails & {
|
|
2814
3370
|
fill?: string;
|
|
2815
3371
|
opacity?: number;
|
|
2816
3372
|
stroke?: FilledMarkStroke;
|
|
2817
3373
|
strokeWidth?: number;
|
|
2818
3374
|
};
|
|
2819
|
-
guides?: false |
|
|
3375
|
+
guides?: false | ColorGuides;
|
|
2820
3376
|
}
|
|
2821
3377
|
|
|
2822
3378
|
export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
@@ -2825,7 +3381,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
|
2825
3381
|
coordinate?: string;
|
|
2826
3382
|
field: string;
|
|
2827
3383
|
color?: HistogramCategoricalColorChannel;
|
|
2828
|
-
bar?: {
|
|
3384
|
+
bar?: RectStyleDetails & {
|
|
2829
3385
|
fill?: string;
|
|
2830
3386
|
opacity?: number;
|
|
2831
3387
|
stroke?: FilledMarkStroke;
|
|
@@ -2835,7 +3391,7 @@ export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
|
2835
3391
|
};
|
|
2836
3392
|
|
|
2837
3393
|
export type HorizonPlotGuideOptions = {
|
|
2838
|
-
axes?: false | (Omit<
|
|
3394
|
+
axes?: false | (Omit<CAxes, "y"> & { y?: false });
|
|
2839
3395
|
grid?: false | (Pick<CartesianGridOptions, "vertical"> & { horizontal?: false });
|
|
2840
3396
|
legend?: false;
|
|
2841
3397
|
};
|
|
@@ -2853,12 +3409,12 @@ export interface CreateHorizonPlotOptions {
|
|
|
2853
3409
|
missing?: HorizonMissingPolicy;
|
|
2854
3410
|
overflow?: HorizonOverflowPolicy;
|
|
2855
3411
|
palette?: HorizonPaletteOptions;
|
|
2856
|
-
area?: { opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3412
|
+
area?: StrokeStyleDetails & { opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
2857
3413
|
guides?: false | HorizonPlotGuideOptions;
|
|
2858
3414
|
}
|
|
2859
3415
|
|
|
2860
3416
|
export type DensityPlotLegendOptions = Omit<PieLegendOptions, "order"> & { order?: LegendValueOrder };
|
|
2861
|
-
export type DensityPlotGuideOptions = Omit<
|
|
3417
|
+
export type DensityPlotGuideOptions = Omit<CCategoricalGuides, "legend"> & {
|
|
2862
3418
|
legend?: false | DensityPlotLegendOptions;
|
|
2863
3419
|
};
|
|
2864
3420
|
export interface CreateDensityPlotOptions {
|
|
@@ -2872,6 +3428,7 @@ export interface CreateDensityPlotOptions {
|
|
|
2872
3428
|
steps?: number;
|
|
2873
3429
|
kernel?: DensityKernel;
|
|
2874
3430
|
normalization?: DensityNormalization;
|
|
3431
|
+
weight?: StatisticalWeight;
|
|
2875
3432
|
as?: readonly [string, string];
|
|
2876
3433
|
densityChannel?: "x" | "y";
|
|
2877
3434
|
valueScale?: NonPointQuantitativePositionScaleOptions;
|
|
@@ -2883,7 +3440,7 @@ export interface CreateDensityPlotOptions {
|
|
|
2883
3440
|
palette?: Palette;
|
|
2884
3441
|
layout?: "overlay";
|
|
2885
3442
|
};
|
|
2886
|
-
area?: { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
3443
|
+
area?: StrokeStyleDetails & { fill?: string; opacity?: number; stroke?: string; strokeWidth?: number; curve?: CurveInterpolation };
|
|
2887
3444
|
guides?: false | DensityPlotGuideOptions;
|
|
2888
3445
|
}
|
|
2889
3446
|
|
|
@@ -2900,7 +3457,7 @@ export type PieColor = string | {
|
|
|
2900
3457
|
};
|
|
2901
3458
|
export type PieLegendOptions = Omit<
|
|
2902
3459
|
FilledMarkLegendOptions,
|
|
2903
|
-
"count" | "gradient" | "channels" | "order" | "labels"
|
|
3460
|
+
"count" | "values" | "gradient" | "channels" | "order" | "labels"
|
|
2904
3461
|
> & {
|
|
2905
3462
|
channels?: readonly ["color"];
|
|
2906
3463
|
order?: LegendValueOrder | { channel: "theta"; values?: never };
|
|
@@ -2912,7 +3469,7 @@ export type CreatePiePlotOptions = {
|
|
|
2912
3469
|
coordinate?: string;
|
|
2913
3470
|
category: PieCategory;
|
|
2914
3471
|
color?: false | PieColor;
|
|
2915
|
-
arc?: { innerRadius?: number; padAngle?: number; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
|
|
3472
|
+
arc?: StrokeStyleDetails & { innerRadius?: number; padAngle?: number; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
|
|
2916
3473
|
guides?: false | { axes?: false; grid?: false; legend?: false | PieLegendOptions };
|
|
2917
3474
|
} & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
|
|
2918
3475
|
|
|
@@ -2923,7 +3480,7 @@ export type MeasuredRadialGuideOptions = {
|
|
|
2923
3480
|
};
|
|
2924
3481
|
export type CreateRosePlotOptions = Omit<CreatePiePlotOptions, "guides" | "arc" | "aggregate" | "value"> & {
|
|
2925
3482
|
radiusScale?: MeasuredRadiusScaleOptions;
|
|
2926
|
-
arc?: { innerRadius?: number; padAngle?: 0; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
|
|
3483
|
+
arc?: StrokeStyleDetails & { innerRadius?: number; padAngle?: 0; fill?: string; opacity?: number; stroke?: string; strokeWidth?: number };
|
|
2927
3484
|
guides?: false | MeasuredRadialGuideOptions;
|
|
2928
3485
|
} & ({ value?: never; aggregate?: "count" } | { value: string; aggregate: "sum" });
|
|
2929
3486
|
export type CreateRadialBarPlotOptions = CreateRosePlotOptions;
|
|
@@ -2932,7 +3489,7 @@ export interface HeatmapBaseOptions {
|
|
|
2932
3489
|
id?: string;
|
|
2933
3490
|
data?: string;
|
|
2934
3491
|
coordinate?: string;
|
|
2935
|
-
rect?: {
|
|
3492
|
+
rect?: RectStyleDetails & {
|
|
2936
3493
|
opacity?: number;
|
|
2937
3494
|
stroke?: string | false;
|
|
2938
3495
|
strokeWidth?: number;
|
|
@@ -3017,7 +3574,7 @@ export type ErrorBandIntervalChannel =
|
|
|
3017
3574
|
| ErrorBandStatisticalIntervalChannel
|
|
3018
3575
|
| ErrorBandExplicitIntervalChannel;
|
|
3019
3576
|
|
|
3020
|
-
export interface ErrorBandOptions {
|
|
3577
|
+
export interface ErrorBandOptions extends StrokeStyleDetails {
|
|
3021
3578
|
id?: string;
|
|
3022
3579
|
target?: string;
|
|
3023
3580
|
data?: string;
|
|
@@ -3028,16 +3585,16 @@ export interface ErrorBandOptions {
|
|
|
3028
3585
|
fill?: string;
|
|
3029
3586
|
opacity?: number;
|
|
3030
3587
|
curve?: CurveInterpolation;
|
|
3031
|
-
boundaries?: false | {
|
|
3588
|
+
boundaries?: false | (StrokeStyleDetails & {
|
|
3032
3589
|
stroke?: string;
|
|
3033
3590
|
strokeWidth?: number;
|
|
3034
3591
|
strokeDash?: DashStyle | DashPattern;
|
|
3035
3592
|
opacity?: number;
|
|
3036
3593
|
curve?: CurveInterpolation;
|
|
3037
|
-
};
|
|
3594
|
+
});
|
|
3038
3595
|
}
|
|
3039
3596
|
|
|
3040
|
-
export interface EditErrorBandOptions {
|
|
3597
|
+
export interface EditErrorBandOptions extends StrokeStyleDetails {
|
|
3041
3598
|
target?: string;
|
|
3042
3599
|
data?: string;
|
|
3043
3600
|
x?: ErrorBandPositionChannel | ErrorBandIntervalChannel;
|
|
@@ -3052,16 +3609,16 @@ export interface EditErrorBandOptions {
|
|
|
3052
3609
|
method?: ConfidenceIntervalMethod;
|
|
3053
3610
|
level?: number;
|
|
3054
3611
|
};
|
|
3055
|
-
boundaries?: false | {
|
|
3612
|
+
boundaries?: false | (StrokeStyleDetails & {
|
|
3056
3613
|
stroke?: string;
|
|
3057
3614
|
strokeWidth?: number;
|
|
3058
3615
|
strokeDash?: DashStyle | DashPattern;
|
|
3059
3616
|
opacity?: number;
|
|
3060
3617
|
curve?: CurveInterpolation;
|
|
3061
|
-
};
|
|
3618
|
+
});
|
|
3062
3619
|
}
|
|
3063
3620
|
|
|
3064
|
-
export interface EditErrorBandBoundaryOptions {
|
|
3621
|
+
export interface EditErrorBandBoundaryOptions extends StrokeStyleDetails {
|
|
3065
3622
|
target?: string;
|
|
3066
3623
|
boundary?: "both" | "lower" | "upper";
|
|
3067
3624
|
stroke?: string;
|
|
@@ -3081,6 +3638,7 @@ export interface EditDensityOptions {
|
|
|
3081
3638
|
steps?: number;
|
|
3082
3639
|
kernel?: DensityKernel;
|
|
3083
3640
|
normalization?: DensityNormalization;
|
|
3641
|
+
weight?: StatisticalWeight | false;
|
|
3084
3642
|
densityChannel?: "x" | "y";
|
|
3085
3643
|
valueScale?: NonPointQuantitativePositionScaleOptions;
|
|
3086
3644
|
placement?: DensityPlacement;
|
|
@@ -3090,7 +3648,11 @@ export interface OffsetScaleOptions {
|
|
|
3090
3648
|
id?: string;
|
|
3091
3649
|
type?: "ordinal";
|
|
3092
3650
|
domain?: "auto" | readonly unknown[];
|
|
3093
|
-
|
|
3651
|
+
reverse?: boolean;
|
|
3652
|
+
padding?: number;
|
|
3653
|
+
paddingInner?: number;
|
|
3654
|
+
paddingOuter?: number;
|
|
3655
|
+
align?: number;
|
|
3094
3656
|
}
|
|
3095
3657
|
|
|
3096
3658
|
export interface OffsetEncodingOptions {
|
|
@@ -3139,6 +3701,27 @@ export interface LabelLeaderOptions {
|
|
|
3139
3701
|
opacity?: number;
|
|
3140
3702
|
}
|
|
3141
3703
|
|
|
3704
|
+
export type MarkLabelAnchor =
|
|
3705
|
+
| "center"
|
|
3706
|
+
| "insideStart"
|
|
3707
|
+
| "insideEnd"
|
|
3708
|
+
| "outsideStart"
|
|
3709
|
+
| "outsideEnd";
|
|
3710
|
+
|
|
3711
|
+
export interface MarkLabelPlacementLeaderOptions {
|
|
3712
|
+
stroke?: string;
|
|
3713
|
+
strokeWidth?: number;
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
export interface MarkLabelPlacement {
|
|
3717
|
+
anchor: MarkLabelAnchor;
|
|
3718
|
+
/** Pixel gap between the source boundary and the nearest text edge. Defaults to 4. */
|
|
3719
|
+
gap?: number;
|
|
3720
|
+
/** Inside-fit behavior. Defaults to hide. */
|
|
3721
|
+
overflow?: "hide" | "outside" | "allow";
|
|
3722
|
+
leader?: false | MarkLabelPlacementLeaderOptions;
|
|
3723
|
+
}
|
|
3724
|
+
|
|
3142
3725
|
export interface LabelLayoutOptions {
|
|
3143
3726
|
target?: string;
|
|
3144
3727
|
axis?: LabelLayoutAxis;
|
|
@@ -3152,7 +3735,7 @@ export interface RemoveLabelLayoutOptions {
|
|
|
3152
3735
|
target?: string;
|
|
3153
3736
|
}
|
|
3154
3737
|
|
|
3155
|
-
export interface RectMarkOptions {
|
|
3738
|
+
export interface RectMarkOptions extends RectStyleDetails {
|
|
3156
3739
|
id?: string;
|
|
3157
3740
|
data?: string;
|
|
3158
3741
|
fill?: string;
|
|
@@ -3176,15 +3759,39 @@ export type TextEncodingOptions = {
|
|
|
3176
3759
|
);
|
|
3177
3760
|
|
|
3178
3761
|
/** Attached final-item labels; lower text actions own subsequent edits. */
|
|
3762
|
+
export type MarkLabelSelectionOptions =
|
|
3763
|
+
| { select?: never; selection?: never }
|
|
3764
|
+
| { select: MarkSelector; selection?: never }
|
|
3765
|
+
| { selection: string; select?: never };
|
|
3766
|
+
|
|
3179
3767
|
export type CreateMarkLabelsOptions = Omit<TextMarkOptions, "data" | "text"> & {
|
|
3180
3768
|
layout?: false | Omit<LabelLayoutOptions, "target">;
|
|
3769
|
+
placement?: MarkLabelPlacement;
|
|
3181
3770
|
} & (
|
|
3182
3771
|
| (TextEncodingOptions extends infer Options
|
|
3183
3772
|
? Options extends TextEncodingOptions ? Omit<Options, "target"> : never
|
|
3184
3773
|
: never)
|
|
3185
3774
|
| { field?: never; value?: never; content?: never; normalizeBy?: never; format?: TextFormat }
|
|
3775
|
+
) & MarkLabelSelectionOptions;
|
|
3776
|
+
|
|
3777
|
+
/** Replace the requested final-item membership of one attached label layer. */
|
|
3778
|
+
export type EditMarkLabelSelectionOptions = { target: string } & (
|
|
3779
|
+
| { select: MarkSelector; selection?: never; all?: never }
|
|
3780
|
+
| { selection: string; select?: never; all?: never }
|
|
3781
|
+
| { all: true; select?: never; selection?: never }
|
|
3186
3782
|
);
|
|
3187
3783
|
|
|
3784
|
+
/** Replace semantic placement or reset one attached label layer to its legacy anchor. */
|
|
3785
|
+
export interface EditMarkLabelPlacementOptions {
|
|
3786
|
+
target: string;
|
|
3787
|
+
placement: MarkLabelPlacement | "auto";
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
/** Remove one attached label layer or every attached label owned by a source mark. */
|
|
3791
|
+
export type RemoveMarkLabelsOptions =
|
|
3792
|
+
| { target: string; source?: never }
|
|
3793
|
+
| { source: string; target?: never };
|
|
3794
|
+
|
|
3188
3795
|
type AnnotationBaseOptions = Omit<TextMarkOptions, "id" | "data" | "source" | "text"> & {
|
|
3189
3796
|
id?: string;
|
|
3190
3797
|
text: unknown;
|
|
@@ -3320,6 +3927,42 @@ export type ColorEncodingOptions =
|
|
|
3320
3927
|
layout?: never;
|
|
3321
3928
|
};
|
|
3322
3929
|
|
|
3930
|
+
export type StrokeEncodingOptions =
|
|
3931
|
+
| {
|
|
3932
|
+
target?: string;
|
|
3933
|
+
value: string;
|
|
3934
|
+
field?: never;
|
|
3935
|
+
fieldType?: never;
|
|
3936
|
+
temporalUnit?: never;
|
|
3937
|
+
scale?: never;
|
|
3938
|
+
}
|
|
3939
|
+
| {
|
|
3940
|
+
target?: string;
|
|
3941
|
+
field: string;
|
|
3942
|
+
value?: never;
|
|
3943
|
+
fieldType?: "nominal" | "ordinal";
|
|
3944
|
+
temporalUnit?: never;
|
|
3945
|
+
scale?: CategoricalColorScaleOptions;
|
|
3946
|
+
}
|
|
3947
|
+
| {
|
|
3948
|
+
target?: string;
|
|
3949
|
+
field: string;
|
|
3950
|
+
value?: never;
|
|
3951
|
+
fieldType: "quantitative";
|
|
3952
|
+
temporalUnit?: never;
|
|
3953
|
+
scale?: ContinuousColorScaleOptions | DiscretizedColorScaleOptions;
|
|
3954
|
+
}
|
|
3955
|
+
| {
|
|
3956
|
+
target?: string;
|
|
3957
|
+
field: string;
|
|
3958
|
+
value?: never;
|
|
3959
|
+
fieldType: "temporal";
|
|
3960
|
+
temporalUnit?: TemporalInputUnit;
|
|
3961
|
+
scale?: Omit<ContinuousColorScaleOptions, "midpoint"> & {
|
|
3962
|
+
midpoint?: "auto";
|
|
3963
|
+
};
|
|
3964
|
+
};
|
|
3965
|
+
|
|
3323
3966
|
export type OpacityScaleOptions = ScaleFields<
|
|
3324
3967
|
"id" | "nice" | "zero" | "clamp" | "reverse"
|
|
3325
3968
|
> & {
|
|
@@ -3341,7 +3984,7 @@ export type OpacityEncodingOptions =
|
|
|
3341
3984
|
|
|
3342
3985
|
export type StrokeWidthScaleOptions = NonPointQuantitativePositionScaleOptions;
|
|
3343
3986
|
|
|
3344
|
-
export interface RuleStyleOptions {
|
|
3987
|
+
export interface RuleStyleOptions extends StrokeStyleDetails {
|
|
3345
3988
|
stroke?: string;
|
|
3346
3989
|
strokeWidth?: number;
|
|
3347
3990
|
strokeDash?: DashStyle | DashPattern;
|
|
@@ -3355,10 +3998,33 @@ type ReferenceBinding<DataValue, PlotValue> =
|
|
|
3355
3998
|
| ({ space: "plot"; data?: string; coordinate?: string;
|
|
3356
3999
|
source?: never; temporalUnit?: never } & ReferenceAxis<PlotValue>);
|
|
3357
4000
|
|
|
3358
|
-
export type
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
4001
|
+
export type ReferenceStatistic =
|
|
4002
|
+
| { readonly op: "mean" | "median" | "min" | "max"; readonly p?: never }
|
|
4003
|
+
| { readonly op: "quantile"; readonly p: number };
|
|
4004
|
+
type DynamicReferenceBinding = {
|
|
4005
|
+
readonly id?: string;
|
|
4006
|
+
readonly source: string;
|
|
4007
|
+
readonly axis: "x" | "y";
|
|
4008
|
+
readonly population?: "boundData" | "visibleItems";
|
|
4009
|
+
readonly field?: string;
|
|
4010
|
+
readonly x?: never;
|
|
4011
|
+
readonly y?: never;
|
|
4012
|
+
readonly space?: never;
|
|
4013
|
+
readonly data?: never;
|
|
4014
|
+
readonly coordinate?: never;
|
|
4015
|
+
readonly temporalUnit?: never;
|
|
4016
|
+
};
|
|
4017
|
+
export type CreateReferenceLineOptions =
|
|
4018
|
+
| ({ id?: string } & RuleStyleOptions & ReferenceBinding<unknown, number>)
|
|
4019
|
+
| (DynamicReferenceBinding & RuleStyleOptions & {
|
|
4020
|
+
readonly statistic: ReferenceStatistic;
|
|
4021
|
+
});
|
|
4022
|
+
export type CreateReferenceBandOptions =
|
|
4023
|
+
| (Omit<RectMarkOptions, "data"> &
|
|
4024
|
+
ReferenceBinding<readonly [unknown, unknown], readonly [number, number]>)
|
|
4025
|
+
| (DynamicReferenceBinding & Omit<RectMarkOptions, "id" | "data" | "source"> & {
|
|
4026
|
+
readonly statistics: readonly [ReferenceStatistic, ReferenceStatistic];
|
|
4027
|
+
});
|
|
3362
4028
|
|
|
3363
4029
|
export type StrokeWidthEncodingOptions =
|
|
3364
4030
|
| {
|
|
@@ -3376,10 +4042,63 @@ export type StrokeWidthEncodingOptions =
|
|
|
3376
4042
|
scale?: StrokeWidthScaleOptions;
|
|
3377
4043
|
};
|
|
3378
4044
|
|
|
4045
|
+
export type SizeEncodingOptions = {
|
|
4046
|
+
field: string;
|
|
4047
|
+
target?: string;
|
|
4048
|
+
fieldType?: "quantitative";
|
|
4049
|
+
scale?: SizeScaleOptions;
|
|
4050
|
+
};
|
|
4051
|
+
|
|
4052
|
+
export type ShapeEncodingOptions = {
|
|
4053
|
+
field: string;
|
|
4054
|
+
target?: string;
|
|
4055
|
+
fieldType?: "nominal";
|
|
4056
|
+
scale?: ShapeScaleOptions;
|
|
4057
|
+
};
|
|
4058
|
+
|
|
4059
|
+
export type AngleEncodingOptions =
|
|
4060
|
+
| { target?: string; value: number; field?: never; fieldType?: never }
|
|
4061
|
+
| { target?: string; field: string; fieldType?: "quantitative"; value?: never };
|
|
4062
|
+
|
|
4063
|
+
type WithoutEncodingTarget<T> = T extends unknown
|
|
4064
|
+
? Omit<T, "target" | "coordinate">
|
|
4065
|
+
: never;
|
|
4066
|
+
|
|
4067
|
+
export interface EncodingChannelAssignments {
|
|
4068
|
+
x?: WithoutEncodingTarget<PositionEncodingOptions | DatumPositionEncodingOptions>;
|
|
4069
|
+
y?: WithoutEncodingTarget<YPositionEncodingOptions | DatumPositionEncodingOptions>;
|
|
4070
|
+
x2?: WithoutEncodingTarget<SecondaryPositionEncodingOptions>;
|
|
4071
|
+
y2?: WithoutEncodingTarget<SecondaryPositionEncodingOptions>;
|
|
4072
|
+
theta?: WithoutEncodingTarget<ThetaEncodingOptions>;
|
|
4073
|
+
r?: WithoutEncodingTarget<RadialEncodingOptions>;
|
|
4074
|
+
xOffset?: WithoutEncodingTarget<XOffsetEncodingOptions>;
|
|
4075
|
+
yOffset?: WithoutEncodingTarget<YOffsetEncodingOptions>;
|
|
4076
|
+
group?: WithoutEncodingTarget<GroupEncodingOptions>;
|
|
4077
|
+
pathOrder?: WithoutEncodingTarget<PathOrderEncodingOptions>;
|
|
4078
|
+
color?: WithoutEncodingTarget<ColorEncodingOptions>;
|
|
4079
|
+
stroke?: WithoutEncodingTarget<StrokeEncodingOptions>;
|
|
4080
|
+
size?: WithoutEncodingTarget<SizeEncodingOptions>;
|
|
4081
|
+
shape?: WithoutEncodingTarget<ShapeEncodingOptions>;
|
|
4082
|
+
opacity?: WithoutEncodingTarget<OpacityEncodingOptions>;
|
|
4083
|
+
strokeWidth?: WithoutEncodingTarget<StrokeWidthEncodingOptions>;
|
|
4084
|
+
strokeDash?: WithoutEncodingTarget<StrokeDashEncodingOptions>;
|
|
4085
|
+
angle?: WithoutEncodingTarget<AngleEncodingOptions>;
|
|
4086
|
+
text?: WithoutEncodingTarget<TextEncodingOptions>;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
type AtLeastOne<T> = {
|
|
4090
|
+
[K in keyof T]-?: Required<Pick<T, K>> & Partial<Omit<T, K>>
|
|
4091
|
+
}[keyof T];
|
|
4092
|
+
|
|
4093
|
+
export interface EncodeChannelsOptions {
|
|
4094
|
+
target: string;
|
|
4095
|
+
channels: AtLeastOne<EncodingChannelAssignments>;
|
|
4096
|
+
}
|
|
4097
|
+
|
|
3379
4098
|
export type RegressionMethod = "linear" | "polynomial" | "loess";
|
|
3380
4099
|
export type RegressionInterval = "mean" | "prediction";
|
|
3381
4100
|
|
|
3382
|
-
export interface RegressionBandOptions {
|
|
4101
|
+
export interface RegressionBandOptions extends StrokeStyleDetails {
|
|
3383
4102
|
color?: string;
|
|
3384
4103
|
opacity?: number;
|
|
3385
4104
|
stroke?: string;
|
|
@@ -3387,7 +4106,7 @@ export interface RegressionBandOptions {
|
|
|
3387
4106
|
curve?: CurveInterpolation;
|
|
3388
4107
|
}
|
|
3389
4108
|
|
|
3390
|
-
export interface CreateRegressionBandOptions {
|
|
4109
|
+
export interface CreateRegressionBandOptions extends StrokeStyleDetails {
|
|
3391
4110
|
id: string;
|
|
3392
4111
|
data: string;
|
|
3393
4112
|
x: string;
|
|
@@ -3404,7 +4123,7 @@ export interface CreateRegressionBandOptions {
|
|
|
3404
4123
|
curve?: CurveInterpolation;
|
|
3405
4124
|
}
|
|
3406
4125
|
|
|
3407
|
-
export interface CreateRegressionLineOptions {
|
|
4126
|
+
export interface CreateRegressionLineOptions extends StrokeStyleDetails {
|
|
3408
4127
|
id: string;
|
|
3409
4128
|
data: string;
|
|
3410
4129
|
x: string;
|
|
@@ -3460,7 +4179,7 @@ type RegressionCommonOptions = {
|
|
|
3460
4179
|
x?: string;
|
|
3461
4180
|
y?: string;
|
|
3462
4181
|
groupBy?: string | false;
|
|
3463
|
-
line?: { strokeWidth?: number; curve?: CurveInterpolation };
|
|
4182
|
+
line?: StrokeStyleDetails & { strokeWidth?: number; curve?: CurveInterpolation };
|
|
3464
4183
|
};
|
|
3465
4184
|
|
|
3466
4185
|
export type RegressionOptions = RegressionCommonOptions & (
|
|
@@ -3489,7 +4208,7 @@ export interface EditRegressionOptions {
|
|
|
3489
4208
|
confidence?: number;
|
|
3490
4209
|
interval?: RegressionInterval;
|
|
3491
4210
|
band?: false | RegressionBandOptions;
|
|
3492
|
-
line?: { strokeWidth?: number; curve?: CurveInterpolation };
|
|
4211
|
+
line?: StrokeStyleDetails & { strokeWidth?: number; curve?: CurveInterpolation };
|
|
3493
4212
|
}
|
|
3494
4213
|
|
|
3495
4214
|
export interface RemoveAxisOptions {
|
|
@@ -3507,7 +4226,7 @@ export interface RemoveGridOptions {
|
|
|
3507
4226
|
export interface RemoveLegendOptions {
|
|
3508
4227
|
target?: string;
|
|
3509
4228
|
/** Remove selected content, including part of a combined categorical legend; omission removes every owned block. */
|
|
3510
|
-
channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
4229
|
+
channels?: readonly ("color" | "stroke" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
3511
4230
|
}
|
|
3512
4231
|
|
|
3513
4232
|
export interface RemoveMarkOptions {
|
|
@@ -3580,7 +4299,7 @@ export interface LegendOptions {
|
|
|
3580
4299
|
order?: LegendOrder;
|
|
3581
4300
|
target?: string;
|
|
3582
4301
|
/** Exact requested content; omission infers encoded point color/shape/size. Explicit subsets include size only when listed. */
|
|
3583
|
-
channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
4302
|
+
channels?: readonly ("color" | "stroke" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
3584
4303
|
position?: "right" | "left" | "bottom" | "top";
|
|
3585
4304
|
/** Single top/bottom edge: align complete occupied bounds, including border strokes, to the plot. Side positions require center. */
|
|
3586
4305
|
align?: "left" | "center" | "right";
|
|
@@ -3592,6 +4311,8 @@ export interface LegendOptions {
|
|
|
3592
4311
|
offset?: number;
|
|
3593
4312
|
titlePosition?: "top" | "left";
|
|
3594
4313
|
title?: string;
|
|
4314
|
+
/** Exact ascending samples for continuous size, opacity, or stroke-width legends. Cannot be combined with count. */
|
|
4315
|
+
values?: readonly number[];
|
|
3595
4316
|
count?: number;
|
|
3596
4317
|
gradient?: { length?: number; thickness?: number };
|
|
3597
4318
|
symbol?: LegendSymbolRecipe;
|
|
@@ -3602,11 +4323,44 @@ export interface LegendOptions {
|
|
|
3602
4323
|
border?: boolean | LegendBorderOptions;
|
|
3603
4324
|
}
|
|
3604
4325
|
|
|
4326
|
+
export type LegendChannel = NonNullable<LegendOptions["channels"]>[number];
|
|
4327
|
+
|
|
4328
|
+
export interface LegendBlockTextPatch {
|
|
4329
|
+
fontSize?: number;
|
|
4330
|
+
fontFamily?: string;
|
|
4331
|
+
fontWeight?: string | number;
|
|
4332
|
+
color?: string;
|
|
4333
|
+
}
|
|
4334
|
+
|
|
4335
|
+
export interface LegendBlockSymbolPatch {
|
|
4336
|
+
/** Point glyph area in square pixels. */
|
|
4337
|
+
size?: number;
|
|
4338
|
+
fill?: string;
|
|
4339
|
+
stroke?: string;
|
|
4340
|
+
strokeWidth?: number;
|
|
4341
|
+
opacity?: number;
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
export interface EditLegendBlockOptions {
|
|
4345
|
+
target: string;
|
|
4346
|
+
channel: LegendChannel;
|
|
4347
|
+
title?: string;
|
|
4348
|
+
values?: readonly [number, ...number[]] | "auto";
|
|
4349
|
+
count?: number;
|
|
4350
|
+
order?: readonly CategoryValue[];
|
|
4351
|
+
gap?: number;
|
|
4352
|
+
text?: LegendBlockTextPatch;
|
|
4353
|
+
symbol?: LegendBlockSymbolPatch;
|
|
4354
|
+
labelMap?: DisplayLabelMap | "auto";
|
|
4355
|
+
}
|
|
4356
|
+
|
|
3605
4357
|
export interface EditLegendOptions
|
|
3606
|
-
extends Omit<LegendOptions, "title"> {
|
|
4358
|
+
extends Omit<LegendOptions, "title" | "values"> {
|
|
3607
4359
|
/** Exact final content set for the whole target; omission preserves content. */
|
|
3608
4360
|
channels?: LegendOptions["channels"];
|
|
3609
4361
|
title?: string | "auto" | false;
|
|
4362
|
+
/** Replace exact samples, or reset them to the remembered automatic count. */
|
|
4363
|
+
values?: readonly number[] | "auto";
|
|
3610
4364
|
}
|
|
3611
4365
|
|
|
3612
4366
|
export interface EditLegendLayoutOptions {
|
|
@@ -3738,6 +4492,9 @@ export class ChartProgram {
|
|
|
3738
4492
|
applyTheme(options: ApplyThemeOptions): ChartProgram;
|
|
3739
4493
|
removeTheme(): ChartProgram;
|
|
3740
4494
|
createData(options: { id?: string; values: readonly unknown[] }): ChartProgram;
|
|
4495
|
+
removeData(options: RemoveResourceOptions): ChartProgram;
|
|
4496
|
+
removeScale(options: RemoveResourceOptions): ChartProgram;
|
|
4497
|
+
removeCoordinate(options: RemoveResourceOptions): ChartProgram;
|
|
3741
4498
|
bindMarkData(options: BindMarkDataOptions): ChartProgram;
|
|
3742
4499
|
filterData(options: FilterDataOptions): ChartProgram;
|
|
3743
4500
|
filterMarks(options: FilterMarksOptions): ChartProgram;
|
|
@@ -3752,6 +4509,9 @@ export class ChartProgram {
|
|
|
3752
4509
|
createBinData(options: BinDataOptions): ChartProgram;
|
|
3753
4510
|
createFoldData(options: FoldDataOptions): ChartProgram;
|
|
3754
4511
|
createComputedData(options: ComputedDataOptions): ChartProgram;
|
|
4512
|
+
createNormalizedData(options: NormalizedDataOptions): ChartProgram;
|
|
4513
|
+
createCompleteData(options: CompleteDataOptions): ChartProgram;
|
|
4514
|
+
createImputedData(options: ImputedDataOptions): ChartProgram;
|
|
3755
4515
|
createStackData(options: StackDataOptions): ChartProgram;
|
|
3756
4516
|
createRegressionData(options: RegressionDataOptions): ChartProgram;
|
|
3757
4517
|
createIntervalData(options: IntervalDataOptions): ChartProgram;
|
|
@@ -3759,9 +4519,25 @@ export class ChartProgram {
|
|
|
3759
4519
|
createTimeUnitData(options: TimeUnitDataOptions): ChartProgram;
|
|
3760
4520
|
createWindowData(options: WindowDataOptions): ChartProgram;
|
|
3761
4521
|
createBin2DData(options: Bin2DDataOptions): ChartProgram;
|
|
4522
|
+
editDerivedData(options: EditDerivedDataOptions): ChartProgram;
|
|
4523
|
+
editComputedData(options: EditComputedDataOptions): ChartProgram;
|
|
4524
|
+
editFilteredData(options: EditFilteredDataOptions): ChartProgram;
|
|
4525
|
+
editFoldData(options: EditFoldDataOptions): ChartProgram;
|
|
4526
|
+
editSummaryData(options: EditSummaryDataOptions): ChartProgram;
|
|
4527
|
+
editBinData(options: EditBinDataOptions): ChartProgram;
|
|
4528
|
+
editTimeUnitData(options: EditTimeUnitDataOptions): ChartProgram;
|
|
4529
|
+
editWindowData(options: EditWindowDataOptions): ChartProgram;
|
|
4530
|
+
editDensityData(options: EditDensityDataOptions): ChartProgram;
|
|
4531
|
+
editStackData(options: EditStackDataOptions): ChartProgram;
|
|
4532
|
+
editRegressionData(options: EditRegressionDataOptions): ChartProgram;
|
|
4533
|
+
editIntervalData(options: EditIntervalDataOptions): ChartProgram;
|
|
4534
|
+
editECDFData(options: EditECDFDataOptions): ChartProgram;
|
|
4535
|
+
editNormalizedData(options: EditNormalizedDataOptions): ChartProgram;
|
|
4536
|
+
editCompleteData(options: EditCompleteDataOptions): ChartProgram;
|
|
4537
|
+
editImputedData(options: EditImputedDataOptions): ChartProgram;
|
|
3762
4538
|
editBin2DData(options: EditBin2DDataOptions): ChartProgram;
|
|
3763
4539
|
|
|
3764
|
-
createPointMark(options?: {
|
|
4540
|
+
createPointMark(options?: StrokeStyleDetails & {
|
|
3765
4541
|
id?: string;
|
|
3766
4542
|
data?: string;
|
|
3767
4543
|
shape?: PointShape;
|
|
@@ -3770,7 +4546,7 @@ export class ChartProgram {
|
|
|
3770
4546
|
stroke?: FilledMarkStroke;
|
|
3771
4547
|
strokeWidth?: number;
|
|
3772
4548
|
}): ChartProgram;
|
|
3773
|
-
editPointMark(options: {
|
|
4549
|
+
editPointMark(options: StrokeStyleDetails & {
|
|
3774
4550
|
target?: string;
|
|
3775
4551
|
shape?: PointShape;
|
|
3776
4552
|
fill?: string;
|
|
@@ -3778,7 +4554,7 @@ export class ChartProgram {
|
|
|
3778
4554
|
stroke?: FilledMarkStroke;
|
|
3779
4555
|
strokeWidth?: number;
|
|
3780
4556
|
}): ChartProgram;
|
|
3781
|
-
createTickMark(options?: {
|
|
4557
|
+
createTickMark(options?: StrokeStyleDetails & {
|
|
3782
4558
|
id?: string;
|
|
3783
4559
|
data?: string;
|
|
3784
4560
|
length?: number;
|
|
@@ -3786,7 +4562,7 @@ export class ChartProgram {
|
|
|
3786
4562
|
strokeWidth?: number;
|
|
3787
4563
|
opacity?: number;
|
|
3788
4564
|
}): ChartProgram;
|
|
3789
|
-
editTickMark(options: {
|
|
4565
|
+
editTickMark(options: StrokeStyleDetails & {
|
|
3790
4566
|
target?: string;
|
|
3791
4567
|
length?: number;
|
|
3792
4568
|
stroke?: string;
|
|
@@ -3797,7 +4573,7 @@ export class ChartProgram {
|
|
|
3797
4573
|
removeJitter(options?: RemoveJitterOptions): ChartProgram;
|
|
3798
4574
|
packPoints(options: PackPointsOptions): ChartProgram;
|
|
3799
4575
|
removePointPacking(options?: RemovePointPackingOptions): ChartProgram;
|
|
3800
|
-
createLineMark(options?: {
|
|
4576
|
+
createLineMark(options?: StrokeStyleDetails & {
|
|
3801
4577
|
id?: string;
|
|
3802
4578
|
data?: string;
|
|
3803
4579
|
strokeWidth?: number;
|
|
@@ -3806,7 +4582,7 @@ export class ChartProgram {
|
|
|
3806
4582
|
opacity?: number;
|
|
3807
4583
|
closed?: boolean;
|
|
3808
4584
|
}): ChartProgram;
|
|
3809
|
-
editLineMark(options: {
|
|
4585
|
+
editLineMark(options: StrokeStyleDetails & {
|
|
3810
4586
|
target?: string;
|
|
3811
4587
|
strokeWidth?: number;
|
|
3812
4588
|
curve?: CurveInterpolation;
|
|
@@ -3814,7 +4590,7 @@ export class ChartProgram {
|
|
|
3814
4590
|
opacity?: number;
|
|
3815
4591
|
closed?: boolean;
|
|
3816
4592
|
}): ChartProgram;
|
|
3817
|
-
createBarMark(options?: {
|
|
4593
|
+
createBarMark(options?: RectStyleDetails & {
|
|
3818
4594
|
id?: string;
|
|
3819
4595
|
data?: string;
|
|
3820
4596
|
fill?: string;
|
|
@@ -3822,14 +4598,14 @@ export class ChartProgram {
|
|
|
3822
4598
|
stroke?: FilledMarkStroke;
|
|
3823
4599
|
strokeWidth?: number;
|
|
3824
4600
|
}): ChartProgram;
|
|
3825
|
-
editBarMark(options: {
|
|
4601
|
+
editBarMark(options: RectStyleDetails & {
|
|
3826
4602
|
target?: string;
|
|
3827
4603
|
fill?: string;
|
|
3828
4604
|
opacity?: number;
|
|
3829
4605
|
stroke?: FilledMarkStroke;
|
|
3830
4606
|
strokeWidth?: number;
|
|
3831
4607
|
}): ChartProgram;
|
|
3832
|
-
createAreaMark(options?: {
|
|
4608
|
+
createAreaMark(options?: StrokeStyleDetails & {
|
|
3833
4609
|
id?: string;
|
|
3834
4610
|
data?: string;
|
|
3835
4611
|
fill?: string;
|
|
@@ -3839,7 +4615,7 @@ export class ChartProgram {
|
|
|
3839
4615
|
curve?: CurveInterpolation;
|
|
3840
4616
|
missing?: "error" | "break";
|
|
3841
4617
|
}): ChartProgram;
|
|
3842
|
-
createArcMark(options?: {
|
|
4618
|
+
createArcMark(options?: StrokeStyleDetails & {
|
|
3843
4619
|
id?: string;
|
|
3844
4620
|
data?: string;
|
|
3845
4621
|
innerRadius?: number;
|
|
@@ -3849,7 +4625,7 @@ export class ChartProgram {
|
|
|
3849
4625
|
stroke?: string;
|
|
3850
4626
|
strokeWidth?: number;
|
|
3851
4627
|
}): ChartProgram;
|
|
3852
|
-
editArcMark(options: {
|
|
4628
|
+
editArcMark(options: StrokeStyleDetails & {
|
|
3853
4629
|
target?: string;
|
|
3854
4630
|
innerRadius?: number;
|
|
3855
4631
|
padAngle?: number;
|
|
@@ -3864,13 +4640,16 @@ export class ChartProgram {
|
|
|
3864
4640
|
editRuleMark(options: { target?: string } & RuleStyleOptions): ChartProgram;
|
|
3865
4641
|
createTextMark(options?: TextMarkOptions): ChartProgram;
|
|
3866
4642
|
createMarkLabels(options?: CreateMarkLabelsOptions): ChartProgram;
|
|
4643
|
+
editMarkLabelSelection(options: EditMarkLabelSelectionOptions): ChartProgram;
|
|
4644
|
+
editMarkLabelPlacement(options: EditMarkLabelPlacementOptions): ChartProgram;
|
|
4645
|
+
removeMarkLabels(options: RemoveMarkLabelsOptions): ChartProgram;
|
|
3867
4646
|
createAnnotation(options: CreateAnnotationOptions): ChartProgram;
|
|
3868
4647
|
createReferenceLine(options: CreateReferenceLineOptions): ChartProgram;
|
|
3869
4648
|
createReferenceBand(options: CreateReferenceBandOptions): ChartProgram;
|
|
3870
4649
|
editTextMark(options: EditTextMarkOptions): ChartProgram;
|
|
3871
4650
|
layoutLabels(options?: LabelLayoutOptions): ChartProgram;
|
|
3872
4651
|
removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
|
|
3873
|
-
editAreaMark(options: {
|
|
4652
|
+
editAreaMark(options: StrokeStyleDetails & {
|
|
3874
4653
|
target?: string;
|
|
3875
4654
|
fill?: string;
|
|
3876
4655
|
opacity?: number;
|
|
@@ -3887,12 +4666,9 @@ export class ChartProgram {
|
|
|
3887
4666
|
encodeX2(options: SecondaryPositionEncodingOptions): ChartProgram;
|
|
3888
4667
|
encodeColor(options: ColorEncodingOptions): ChartProgram;
|
|
3889
4668
|
encodeStrokeDash(options: StrokeDashEncodingOptions): ChartProgram;
|
|
3890
|
-
encodeSize(options:
|
|
3891
|
-
encodeShape(options:
|
|
3892
|
-
encodeAngle(options:
|
|
3893
|
-
| { target?: string; value: number; field?: never; fieldType?: never }
|
|
3894
|
-
| { target?: string; field: string; fieldType?: "quantitative"; value?: never }
|
|
3895
|
-
): ChartProgram;
|
|
4669
|
+
encodeSize(options: SizeEncodingOptions): ChartProgram;
|
|
4670
|
+
encodeShape(options: ShapeEncodingOptions): ChartProgram;
|
|
4671
|
+
encodeAngle(options: AngleEncodingOptions): ChartProgram;
|
|
3896
4672
|
encodeOpacity(options: OpacityEncodingOptions): ChartProgram;
|
|
3897
4673
|
encodeRadius(options: { value: number; target?: string }): ChartProgram;
|
|
3898
4674
|
encodePointRadius(options: { value: number; target?: string }): ChartProgram;
|
|
@@ -3913,7 +4689,7 @@ export class ChartProgram {
|
|
|
3913
4689
|
target?: string;
|
|
3914
4690
|
channel:
|
|
3915
4691
|
| "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset"
|
|
3916
|
-
| "theta" | "radius" | "color" | "strokeDash" | "strokeWidth"
|
|
4692
|
+
| "theta" | "radius" | "color" | "stroke" | "strokeDash" | "strokeWidth"
|
|
3917
4693
|
| "size" | "shape" | "angle" | "group" | "opacity" | "text";
|
|
3918
4694
|
}): ChartProgram;
|
|
3919
4695
|
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
@@ -3923,8 +4699,9 @@ export class ChartProgram {
|
|
|
3923
4699
|
encodeHorizon(options?: HorizonEncodingOptions): ChartProgram;
|
|
3924
4700
|
editHorizon(options: EditHorizonOptions): ChartProgram;
|
|
3925
4701
|
encodeBarWidth(options?: BarWidthOptions): ChartProgram;
|
|
3926
|
-
encodeStroke(options:
|
|
4702
|
+
encodeStroke(options: StrokeEncodingOptions): ChartProgram;
|
|
3927
4703
|
encodeStrokeWidth(options: StrokeWidthEncodingOptions): ChartProgram;
|
|
4704
|
+
encodeChannels(options: EncodeChannelsOptions): ChartProgram;
|
|
3928
4705
|
|
|
3929
4706
|
createRegression(options?: RegressionOptions): ChartProgram;
|
|
3930
4707
|
editRegression(options: EditRegressionOptions): ChartProgram;
|
|
@@ -3976,7 +4753,7 @@ export class ChartProgram {
|
|
|
3976
4753
|
createAxes(options?: CreateAxesOptions): ChartProgram;
|
|
3977
4754
|
createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
|
|
3978
4755
|
createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
|
|
3979
|
-
createThetaAxis(options?:
|
|
4756
|
+
createThetaAxis(options?: CompleteThetaAxisOptions): ChartProgram;
|
|
3980
4757
|
createRadialAxis(options?: CompleteRadialAxisOptions): ChartProgram;
|
|
3981
4758
|
createThetaAxisLine(options?: CreateThetaAxisLineOptions): ChartProgram;
|
|
3982
4759
|
createRadialAxisLine(options?: CreateRadialAxisLineOptions): ChartProgram;
|
|
@@ -3990,7 +4767,7 @@ export class ChartProgram {
|
|
|
3990
4767
|
editRadialAxisLine(options?: AxisLineStyleOptions): ChartProgram;
|
|
3991
4768
|
editThetaAxisTicks(options?: PolarTickOptions): ChartProgram;
|
|
3992
4769
|
editRadialAxisTicks(options?: PolarTickOptions): ChartProgram;
|
|
3993
|
-
editThetaAxisLabels(options?:
|
|
4770
|
+
editThetaAxisLabels(options?: ThetaAxisLabelOptions): ChartProgram;
|
|
3994
4771
|
editRadialAxisLabels(options?: PolarLabelOptions): ChartProgram;
|
|
3995
4772
|
editThetaAxisTitle(options?: PolarTitleOptions): ChartProgram;
|
|
3996
4773
|
editRadialAxisTitle(options?: RadialTitleOptions): ChartProgram;
|
|
@@ -4016,7 +4793,7 @@ export class ChartProgram {
|
|
|
4016
4793
|
editYAxisTitle(options?: Omit<AxisTitleOptions<YAxisPosition>, "scale">): ChartProgram;
|
|
4017
4794
|
editXAxis(options: EditAxisOptions<XAxisPosition>): ChartProgram;
|
|
4018
4795
|
editYAxis(options: EditAxisOptions<YAxisPosition>): ChartProgram;
|
|
4019
|
-
editThetaAxis(options:
|
|
4796
|
+
editThetaAxis(options: EditThetaAxisOptions): ChartProgram;
|
|
4020
4797
|
editRadialAxis(options: EditRadialAxisOptions): ChartProgram;
|
|
4021
4798
|
removeXAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
4022
4799
|
removeYAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
@@ -4036,6 +4813,7 @@ export class ChartProgram {
|
|
|
4036
4813
|
/** Combined categorical and size legends support all four edges with layout "edge". */
|
|
4037
4814
|
createLegend(options?: LegendOptions): ChartProgram;
|
|
4038
4815
|
editLegend(options: EditLegendOptions): ChartProgram;
|
|
4816
|
+
editLegendBlock(options: EditLegendBlockOptions): ChartProgram;
|
|
4039
4817
|
editLegendLayout(options: EditLegendLayoutOptions): ChartProgram;
|
|
4040
4818
|
editLegendLabels(options: EditLegendLabelsOptions): ChartProgram;
|
|
4041
4819
|
editLegendTitle(options: EditLegendTitleOptions): ChartProgram;
|
|
@@ -4048,11 +4826,26 @@ export class ChartProgram {
|
|
|
4048
4826
|
removeTitle(): ChartProgram;
|
|
4049
4827
|
|
|
4050
4828
|
createCoordinate(options?: CreateCoordinateOptions): ChartProgram;
|
|
4829
|
+
editCoordinate(options: EditCoordinateOptions): ChartProgram;
|
|
4051
4830
|
createScale(options: CreateScaleOptions): ChartProgram;
|
|
4052
4831
|
editScale(options: EditScaleOptions): ChartProgram;
|
|
4832
|
+
editXScale(options: EditXScaleOptions): ChartProgram;
|
|
4833
|
+
editYScale(options: EditYScaleOptions): ChartProgram;
|
|
4834
|
+
editXOffsetScale(options: EditXOffsetScaleOptions): ChartProgram;
|
|
4835
|
+
editYOffsetScale(options: EditYOffsetScaleOptions): ChartProgram;
|
|
4836
|
+
editParallelScale(options: EditParallelScaleOptions): ChartProgram;
|
|
4837
|
+
editThetaScale(options: EditThetaScaleOptions): ChartProgram;
|
|
4838
|
+
editRScale(options: EditRScaleOptions): ChartProgram;
|
|
4839
|
+
editColorScale(options: EditColorScaleOptions): ChartProgram;
|
|
4840
|
+
editStrokeScale(options: EditStrokeScaleOptions): ChartProgram;
|
|
4841
|
+
editSizeScale(options: EditSizeScaleOptions): ChartProgram;
|
|
4842
|
+
editOpacityScale(options: EditOpacityScaleOptions): ChartProgram;
|
|
4843
|
+
editShapeScale(options: EditShapeScaleOptions): ChartProgram;
|
|
4844
|
+
editStrokeWidthScale(options: EditStrokeWidthScaleOptions): ChartProgram;
|
|
4845
|
+
editStrokeDashScale(options: EditStrokeDashScaleOptions): ChartProgram;
|
|
4053
4846
|
createDerivedData(options: CreateDerivedDataOptions): ChartProgram;
|
|
4054
4847
|
createRegressionBand(options: CreateRegressionBandOptions): ChartProgram;
|
|
4055
|
-
editRegressionBand(options: {
|
|
4848
|
+
editRegressionBand(options: StrokeStyleDetails & {
|
|
4056
4849
|
target?: string;
|
|
4057
4850
|
color?: string;
|
|
4058
4851
|
opacity?: number;
|
|
@@ -4061,7 +4854,7 @@ export class ChartProgram {
|
|
|
4061
4854
|
curve?: CurveInterpolation;
|
|
4062
4855
|
}): ChartProgram;
|
|
4063
4856
|
createRegressionLine(options: CreateRegressionLineOptions): ChartProgram;
|
|
4064
|
-
editRegressionLine(options: {
|
|
4857
|
+
editRegressionLine(options: StrokeStyleDetails & {
|
|
4065
4858
|
target?: string;
|
|
4066
4859
|
strokeWidth?: number;
|
|
4067
4860
|
curve?: CurveInterpolation;
|