ggaction 0.0.4 → 0.0.6
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 +55 -0
- package/README.md +35 -13
- package/package.json +18 -7
- package/src/actions/boxPlots/create.js +13 -7
- package/src/actions/boxPlots/edit.js +484 -36
- package/src/actions/boxPlots/materialize.js +3 -0
- package/src/actions/boxPlots/options.js +11 -4
- package/src/actions/boxPlots/resolve.js +10 -2
- package/src/actions/charts/bar.js +50 -0
- package/src/actions/charts/heatmap.js +205 -0
- package/src/actions/charts/histogram.js +58 -0
- package/src/actions/charts/index.js +15 -0
- package/src/actions/charts/line.js +69 -0
- package/src/actions/charts/parallel.js +76 -0
- package/src/actions/charts/scatter.js +56 -0
- package/src/actions/charts/shared.js +121 -0
- package/src/actions/composition/actions.js +13 -3
- package/src/actions/coordinates/parallel.js +50 -0
- package/src/actions/data/bin2d.js +260 -0
- package/src/actions/data/density.js +54 -13
- package/src/actions/data/derived.js +22 -0
- package/src/actions/data/filter.js +5 -0
- package/src/actions/data/gradientProfile.js +65 -0
- package/src/actions/data/horizon.js +71 -0
- package/src/actions/data/index.js +34 -2
- package/src/actions/data/intervalEdit.js +76 -0
- package/src/actions/data/window.js +50 -0
- package/src/actions/distributions/revision.js +326 -0
- package/src/actions/encodings/appearance.js +35 -1
- package/src/actions/encodings/color/index.js +17 -1
- package/src/actions/encodings/color/layout.js +8 -0
- package/src/actions/encodings/density/resolve.js +109 -0
- package/src/actions/encodings/density.js +330 -90
- package/src/actions/encodings/horizon/resolve.js +283 -0
- package/src/actions/encodings/horizon.js +364 -0
- package/src/actions/encodings/index.js +8 -0
- package/src/actions/encodings/parallel.js +115 -0
- package/src/actions/encodings/pathOrder.js +131 -0
- package/src/actions/encodings/position/apply.js +73 -4
- package/src/actions/encodings/position/index.js +15 -2
- package/src/actions/encodings/position/policies/arc.js +27 -4
- package/src/actions/encodings/position/policies/area.js +33 -2
- package/src/actions/encodings/position/policies/index.js +7 -2
- package/src/actions/encodings/position/policies/line.js +18 -2
- package/src/actions/encodings/position/resolve.js +24 -2
- package/src/actions/encodings/ranged.js +3 -1
- package/src/actions/encodings/remove.js +268 -0
- package/src/actions/encodings/ruleAppearance.js +88 -10
- package/src/actions/errorBands/edit.js +121 -13
- package/src/actions/errorBars/edit.js +45 -8
- package/src/actions/errorBars/options.js +7 -1
- package/src/actions/facets/actions.js +137 -3
- package/src/actions/facets/derive.js +33 -3
- package/src/actions/facets/replay.js +7 -36
- package/src/actions/gradientPlots/components.js +177 -0
- package/src/actions/gradientPlots/create.js +96 -0
- package/src/actions/gradientPlots/edit.js +501 -0
- package/src/actions/gradientPlots/index.js +24 -0
- package/src/actions/gradientPlots/materialize.js +287 -0
- package/src/actions/gradientPlots/options.js +120 -0
- package/src/actions/gradientPlots/paint.js +107 -0
- package/src/actions/gradientPlots/rebind.js +51 -0
- package/src/actions/gradientPlots/resolve.js +81 -0
- package/src/actions/guides/applicability.js +44 -17
- package/src/actions/guides/axes/axes.js +37 -3
- package/src/actions/guides/axes/edit.js +129 -47
- package/src/actions/guides/axes/index.js +2 -0
- package/src/actions/guides/axes/labels.js +11 -6
- package/src/actions/guides/axes/parallel/resolve.js +86 -0
- package/src/actions/guides/axes/parallel.js +228 -0
- package/src/actions/guides/axes/titles.js +11 -8
- package/src/actions/guides/guides.js +60 -5
- package/src/actions/guides/legends/categorical/actions.js +67 -19
- package/src/actions/guides/legends/continuous/common.js +3 -3
- package/src/actions/guides/legends/edit.js +63 -0
- package/src/actions/guides/legends/index.js +2 -0
- package/src/actions/guides/legends/remove.js +124 -30
- package/src/actions/guides/legends/strokeWidth.js +198 -0
- package/src/actions/index.js +6 -0
- package/src/actions/marks/arc/actions.js +46 -14
- package/src/actions/marks/area/actions.js +60 -136
- package/src/actions/marks/area/materialize.js +163 -0
- package/src/actions/marks/index.js +5 -1
- package/src/actions/marks/line/actions.js +99 -80
- package/src/actions/marks/line/materialize.js +146 -0
- package/src/actions/marks/point/create.js +76 -0
- package/src/actions/marks/point/edit.js +97 -0
- package/src/actions/marks/point/index.js +11 -1
- package/src/actions/marks/point/jitter.js +72 -0
- package/src/actions/marks/point/{actions.js → materialize.js} +183 -172
- package/src/actions/marks/rect/actions.js +3 -0
- package/src/actions/marks/remove.js +13 -2
- package/src/actions/marks/rule/actions.js +29 -4
- package/src/actions/marks/text/actions.js +19 -4
- package/src/actions/marks/text/index.js +7 -1
- package/src/actions/marks/text/layout.js +321 -0
- package/src/actions/primitives/semanticValidation/dataset.js +22 -0
- package/src/actions/primitives/semanticValidation/guide.js +43 -0
- package/src/actions/primitives/semanticValidation/index.js +23 -0
- package/src/actions/primitives/semanticValidation/layer.js +74 -0
- package/src/actions/primitives/semanticValidation/scale.js +74 -0
- package/src/actions/primitives/semanticValidation/shared.js +5 -0
- package/src/actions/primitives/semanticValue.js +1 -204
- package/src/actions/regression/edit.js +247 -88
- package/src/actions/scales/consumers/common.js +18 -0
- package/src/actions/scales/consumers/families.js +14 -3
- package/src/actions/scales/definitions.js +30 -0
- package/src/actions/scales/edit.js +6 -204
- package/src/actions/scales/editPolicy.js +214 -0
- package/src/actions/scales/materialize.js +1 -1
- package/src/actions/scales/patch.js +26 -0
- package/src/actions/selection/actions.js +150 -5
- package/src/actions/selection/index.js +6 -0
- package/src/actions/violinPlots/create.js +198 -0
- package/src/actions/violinPlots/index.js +5 -0
- package/src/core/textMetrics.js +47 -0
- package/src/core/vocabulary.js +14 -2
- package/src/grammar/arcs.js +49 -12
- package/src/grammar/areaSeries.js +41 -5
- package/src/grammar/bin2d.js +333 -0
- package/src/grammar/categoricalDensity.js +192 -0
- package/src/grammar/coordinates.js +1 -1
- package/src/grammar/curveCommands.js +3 -1
- package/src/grammar/density.js +252 -26
- package/src/grammar/facets/dependencies.js +3 -11
- package/src/grammar/facets/index.js +3 -1
- package/src/grammar/gradientProfile.js +213 -0
- package/src/grammar/horizon.js +455 -0
- package/src/grammar/jitter.js +197 -0
- package/src/grammar/lineSeries.js +69 -0
- package/src/grammar/paint.js +88 -0
- package/src/grammar/parallelCoordinates.js +213 -0
- package/src/grammar/pathOrder.js +35 -0
- package/src/grammar/pointShapes.js +24 -0
- package/src/grammar/rules.js +1 -0
- package/src/grammar/scales/appearance.js +21 -0
- package/src/grammar/schemas/concreteGraphic.js +11 -1
- package/src/grammar/schemas/graphicBounds.js +19 -37
- package/src/grammar/schemas/semanticPath.js +17 -2
- package/src/grammar/transforms.js +100 -11
- package/src/grammar/window.js +339 -0
- package/src/layout/labels.js +270 -0
- package/src/layout/text.js +4 -1
- package/src/layout/title.js +10 -20
- package/src/materialization/dataProvenance.js +56 -2
- package/src/materialization/dependencies.js +9 -14
- package/src/materialization/guides/resources.js +74 -24
- package/src/materialization/horizon.js +29 -0
- package/src/materialization/layout.js +15 -0
- package/src/materialization/marks/capabilities.js +21 -1
- package/src/materialization/marks/index.js +3 -0
- package/src/materialization/marks/pathOrder.js +71 -0
- package/src/materialization/marks/policies.js +6 -2
- package/src/materialization/scaleGuideDependencies.js +8 -0
- package/src/materialization/scales/resolve.js +2 -0
- package/src/materialization/selection/items/path.js +27 -1
- package/src/materialization/selection/items/point.js +1 -5
- package/src/materialization/selection/items/rect.js +21 -0
- package/src/materialization/selection/styles.js +20 -9
- package/src/materialization/text.js +12 -4
- package/src/renderers/canvas/fill.js +33 -0
- package/src/renderers/canvas/index.js +7 -0
- package/src/renderers/canvas/path.js +7 -4
- package/src/renderers/canvas/rect.js +9 -3
- package/src/selectors/datasets.js +4 -0
- package/src/theme/defaults.js +4 -0
- package/types/extension.d.ts +6 -0
- package/types/index.d.ts +77 -0
- package/types/program.d.ts +703 -17
package/types/program.d.ts
CHANGED
|
@@ -20,6 +20,25 @@ export type ConcretePathCommand =
|
|
|
20
20
|
readonly y: number;
|
|
21
21
|
}
|
|
22
22
|
| { readonly op: "Z" };
|
|
23
|
+
export interface LinearGradientPoint {
|
|
24
|
+
readonly x: number;
|
|
25
|
+
readonly y: number;
|
|
26
|
+
}
|
|
27
|
+
export interface LinearGradientStop {
|
|
28
|
+
readonly offset: number;
|
|
29
|
+
readonly color: string;
|
|
30
|
+
}
|
|
31
|
+
export interface LinearGradientPaint {
|
|
32
|
+
readonly type: "linear-gradient";
|
|
33
|
+
readonly from: LinearGradientPoint;
|
|
34
|
+
readonly to: LinearGradientPoint;
|
|
35
|
+
readonly stops: readonly [
|
|
36
|
+
LinearGradientStop,
|
|
37
|
+
LinearGradientStop,
|
|
38
|
+
...LinearGradientStop[]
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
export type FillPaint = string | LinearGradientPaint;
|
|
23
42
|
export type CurveInterpolation =
|
|
24
43
|
| "linear"
|
|
25
44
|
| "step"
|
|
@@ -31,6 +50,19 @@ export type CurveInterpolation =
|
|
|
31
50
|
| "natural";
|
|
32
51
|
export type DashStyle = "solid" | "dashed" | "dotted" | "dashdot";
|
|
33
52
|
export type DashPattern = readonly number[];
|
|
53
|
+
export type JitterMaxOffset =
|
|
54
|
+
| { pixels: number; band?: never }
|
|
55
|
+
| { pixels?: never; band: number };
|
|
56
|
+
export interface JitterPointsOptions {
|
|
57
|
+
target?: string;
|
|
58
|
+
channel: "x" | "y";
|
|
59
|
+
maxOffset: JitterMaxOffset;
|
|
60
|
+
seed?: string | number;
|
|
61
|
+
key?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface RemoveJitterOptions {
|
|
64
|
+
target?: string;
|
|
65
|
+
}
|
|
34
66
|
export type ScaleType =
|
|
35
67
|
| "linear"
|
|
36
68
|
| "log"
|
|
@@ -64,6 +96,7 @@ export interface CompositionOptions {
|
|
|
64
96
|
padding?: number | CompositionPadding;
|
|
65
97
|
}
|
|
66
98
|
export interface EditCompositionLayoutOptions {
|
|
99
|
+
columns?: number;
|
|
67
100
|
gap?: number;
|
|
68
101
|
align?: CompositionAlign;
|
|
69
102
|
padding?: number | CompositionPadding;
|
|
@@ -140,6 +173,34 @@ export type DensityKernel =
|
|
|
140
173
|
| "uniform"
|
|
141
174
|
| "triangular";
|
|
142
175
|
export type DensityNormalization = "unit" | "count";
|
|
176
|
+
export type DensityPlacementSide =
|
|
177
|
+
| "both"
|
|
178
|
+
| "left"
|
|
179
|
+
| "right"
|
|
180
|
+
| "top"
|
|
181
|
+
| "bottom";
|
|
182
|
+
export type DensityWidthResolution = "shared" | "independent";
|
|
183
|
+
export interface DensityPlacementWidth {
|
|
184
|
+
band?: number;
|
|
185
|
+
resolve?: DensityWidthResolution;
|
|
186
|
+
}
|
|
187
|
+
export interface DensityPlacementSplit {
|
|
188
|
+
field: string;
|
|
189
|
+
domain?: readonly [unknown, unknown];
|
|
190
|
+
}
|
|
191
|
+
export interface BaselineDensityPlacement {
|
|
192
|
+
type: "baseline";
|
|
193
|
+
}
|
|
194
|
+
export interface CategoryDensityPlacement {
|
|
195
|
+
type: "category";
|
|
196
|
+
side?: DensityPlacementSide;
|
|
197
|
+
width?: DensityPlacementWidth;
|
|
198
|
+
split?: DensityPlacementSplit;
|
|
199
|
+
scale?: ScaleOptions;
|
|
200
|
+
}
|
|
201
|
+
export type DensityPlacement =
|
|
202
|
+
| BaselineDensityPlacement
|
|
203
|
+
| CategoryDensityPlacement;
|
|
143
204
|
export type FilterComparison =
|
|
144
205
|
| { op: "eq" | "neq"; value: unknown }
|
|
145
206
|
| { op: "lt" | "lte" | "gt" | "gte"; value: number | string };
|
|
@@ -205,9 +266,67 @@ export interface DatasetDensityTransform {
|
|
|
205
266
|
normalization?: DensityNormalization;
|
|
206
267
|
as: readonly [string, string];
|
|
207
268
|
resolve: "shared";
|
|
269
|
+
placement?: {
|
|
270
|
+
readonly type: "category";
|
|
271
|
+
readonly channel: "x" | "y";
|
|
272
|
+
readonly categoryField: string;
|
|
273
|
+
readonly side: DensityPlacementSide;
|
|
274
|
+
readonly width: {
|
|
275
|
+
readonly band: number;
|
|
276
|
+
readonly resolve: DensityWidthResolution;
|
|
277
|
+
};
|
|
278
|
+
readonly split?: {
|
|
279
|
+
readonly field: string;
|
|
280
|
+
readonly domain?: readonly [unknown, unknown];
|
|
281
|
+
};
|
|
282
|
+
};
|
|
208
283
|
resolved?: {
|
|
209
284
|
readonly bandwidth: number;
|
|
210
285
|
readonly extent: readonly [number, number];
|
|
286
|
+
readonly splitDomain?: readonly [unknown, unknown];
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
export type HorizonResolution = "shared" | "independent";
|
|
290
|
+
export type HorizonMissingPolicy = "break" | "error";
|
|
291
|
+
export type HorizonOverflowPolicy = "clip" | "error";
|
|
292
|
+
export interface HorizonOutputFields {
|
|
293
|
+
readonly x: string;
|
|
294
|
+
readonly lower: string;
|
|
295
|
+
readonly upper: string;
|
|
296
|
+
readonly group: string;
|
|
297
|
+
readonly color: string;
|
|
298
|
+
readonly sign: string;
|
|
299
|
+
readonly band: string;
|
|
300
|
+
readonly segment: string;
|
|
301
|
+
}
|
|
302
|
+
export interface DatasetHorizonTransform {
|
|
303
|
+
readonly type: "horizon";
|
|
304
|
+
readonly x: {
|
|
305
|
+
readonly field: string;
|
|
306
|
+
readonly fieldType: "quantitative" | "temporal";
|
|
307
|
+
};
|
|
308
|
+
readonly y: {
|
|
309
|
+
readonly field: string;
|
|
310
|
+
readonly fieldType: "quantitative";
|
|
311
|
+
};
|
|
312
|
+
readonly groupBy?: string;
|
|
313
|
+
readonly bands: number;
|
|
314
|
+
readonly baseline: number;
|
|
315
|
+
readonly extent: "auto" | number;
|
|
316
|
+
readonly resolve: HorizonResolution;
|
|
317
|
+
readonly missing: HorizonMissingPolicy;
|
|
318
|
+
readonly overflow: HorizonOverflowPolicy;
|
|
319
|
+
readonly palette: {
|
|
320
|
+
readonly positive: Readonly<Exclude<Palette, string>>;
|
|
321
|
+
readonly negative: Readonly<Exclude<Palette, string>>;
|
|
322
|
+
};
|
|
323
|
+
readonly as: HorizonOutputFields;
|
|
324
|
+
readonly resolved?: {
|
|
325
|
+
readonly extents: readonly {
|
|
326
|
+
readonly group?: DatasetScalar;
|
|
327
|
+
readonly extent: number;
|
|
328
|
+
readonly bandHeight: number;
|
|
329
|
+
}[];
|
|
211
330
|
};
|
|
212
331
|
}
|
|
213
332
|
export interface DatasetIntervalOutputFields {
|
|
@@ -237,15 +356,106 @@ export type DatasetIntervalTransform = {
|
|
|
237
356
|
level?: never;
|
|
238
357
|
}
|
|
239
358
|
);
|
|
359
|
+
export type WindowSortOrder = "ascending" | "descending";
|
|
360
|
+
export interface WindowSort {
|
|
361
|
+
field: string;
|
|
362
|
+
order?: WindowSortOrder;
|
|
363
|
+
}
|
|
364
|
+
export type WindowOperation =
|
|
365
|
+
| { op: "rowNumber" | "rank" | "denseRank"; as: string }
|
|
366
|
+
| { op: "cumulativeSum"; field: string; as: string }
|
|
367
|
+
| {
|
|
368
|
+
op: "lag" | "lead";
|
|
369
|
+
field: string;
|
|
370
|
+
as: string;
|
|
371
|
+
offset?: number;
|
|
372
|
+
default?: unknown;
|
|
373
|
+
};
|
|
374
|
+
export interface DatasetWindowSort {
|
|
375
|
+
readonly field: string;
|
|
376
|
+
readonly order: WindowSortOrder;
|
|
377
|
+
}
|
|
378
|
+
export type DatasetWindowOperation =
|
|
379
|
+
| { readonly op: "rowNumber" | "rank" | "denseRank"; readonly as: string }
|
|
380
|
+
| {
|
|
381
|
+
readonly op: "cumulativeSum";
|
|
382
|
+
readonly field: string;
|
|
383
|
+
readonly as: string;
|
|
384
|
+
}
|
|
385
|
+
| {
|
|
386
|
+
readonly op: "lag" | "lead";
|
|
387
|
+
readonly field: string;
|
|
388
|
+
readonly as: string;
|
|
389
|
+
readonly offset: number;
|
|
390
|
+
readonly default: unknown;
|
|
391
|
+
};
|
|
392
|
+
export interface DatasetWindowTransform {
|
|
393
|
+
readonly type: "window";
|
|
394
|
+
readonly partitionBy: readonly string[];
|
|
395
|
+
readonly sortBy: readonly DatasetWindowSort[];
|
|
396
|
+
readonly operations: readonly DatasetWindowOperation[];
|
|
397
|
+
}
|
|
398
|
+
export interface Bin2DCounts {
|
|
399
|
+
x: number;
|
|
400
|
+
y: number;
|
|
401
|
+
}
|
|
402
|
+
export interface Bin2DExtent {
|
|
403
|
+
x?: readonly [number, number];
|
|
404
|
+
y?: readonly [number, number];
|
|
405
|
+
}
|
|
406
|
+
export interface Bin2DOutputFields {
|
|
407
|
+
x0?: string;
|
|
408
|
+
x1?: string;
|
|
409
|
+
y0?: string;
|
|
410
|
+
y1?: string;
|
|
411
|
+
count?: string;
|
|
412
|
+
members?: string;
|
|
413
|
+
}
|
|
414
|
+
export interface DatasetBin2DOutputFields {
|
|
415
|
+
readonly x0: string;
|
|
416
|
+
readonly x1: string;
|
|
417
|
+
readonly y0: string;
|
|
418
|
+
readonly y1: string;
|
|
419
|
+
readonly count: string;
|
|
420
|
+
readonly members?: string;
|
|
421
|
+
}
|
|
422
|
+
export interface DatasetBin2DTransform {
|
|
423
|
+
readonly type: "bin2d";
|
|
424
|
+
readonly x: string;
|
|
425
|
+
readonly y: string;
|
|
426
|
+
readonly bins: Readonly<Bin2DCounts>;
|
|
427
|
+
readonly extent: {
|
|
428
|
+
readonly x: "auto" | readonly [number, number];
|
|
429
|
+
readonly y: "auto" | readonly [number, number];
|
|
430
|
+
};
|
|
431
|
+
readonly includeEmpty: boolean;
|
|
432
|
+
readonly members: boolean;
|
|
433
|
+
readonly as: DatasetBin2DOutputFields;
|
|
434
|
+
readonly resolved?: {
|
|
435
|
+
readonly extent: {
|
|
436
|
+
readonly x: readonly [number, number];
|
|
437
|
+
readonly y: readonly [number, number];
|
|
438
|
+
};
|
|
439
|
+
readonly edges: {
|
|
440
|
+
readonly x: readonly number[];
|
|
441
|
+
readonly y: readonly number[];
|
|
442
|
+
};
|
|
443
|
+
readonly eligibleCount: number;
|
|
444
|
+
readonly occupiedCount: number;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
240
447
|
export type DatasetTransform =
|
|
448
|
+
| DatasetBin2DTransform
|
|
241
449
|
| DatasetFilterTransform
|
|
242
450
|
| DatasetRegressionTransform
|
|
243
451
|
| DatasetDensityTransform
|
|
244
|
-
|
|
|
452
|
+
| DatasetHorizonTransform
|
|
453
|
+
| DatasetIntervalTransform
|
|
454
|
+
| DatasetWindowTransform;
|
|
245
455
|
export interface CreateDerivedDataOptions {
|
|
246
456
|
id: string;
|
|
247
457
|
source: string;
|
|
248
|
-
transform: readonly [DatasetTransform
|
|
458
|
+
transform: readonly [DatasetTransform];
|
|
249
459
|
}
|
|
250
460
|
export type MarkGraphicProperty =
|
|
251
461
|
| "x" | "y" | "width" | "height" | "radius"
|
|
@@ -277,6 +487,12 @@ export type SelectMarksOptions = {
|
|
|
277
487
|
id?: string;
|
|
278
488
|
target?: string;
|
|
279
489
|
} & MarkSelector;
|
|
490
|
+
export type EditMarkSelectionOptions = {
|
|
491
|
+
selection?: string;
|
|
492
|
+
} & MarkSelector;
|
|
493
|
+
export interface RemoveMarkSelectionOptions {
|
|
494
|
+
selection?: string;
|
|
495
|
+
}
|
|
280
496
|
export type FilterMarksOptions = {
|
|
281
497
|
target?: string;
|
|
282
498
|
} & MarkSelector;
|
|
@@ -509,7 +725,7 @@ export interface CompleteAxisOptions<P extends string> {
|
|
|
509
725
|
export interface CreateAxesOptions {
|
|
510
726
|
coordinate?: {
|
|
511
727
|
id?: string;
|
|
512
|
-
type?: "auto" | "cartesian" | "polar";
|
|
728
|
+
type?: "auto" | "cartesian" | "polar" | "parallel";
|
|
513
729
|
};
|
|
514
730
|
x?: false | CompleteAxisOptions<XAxisPosition>;
|
|
515
731
|
y?: false | CompleteAxisOptions<YAxisPosition>;
|
|
@@ -636,7 +852,7 @@ export interface CreateGuidesOptions {
|
|
|
636
852
|
|
|
637
853
|
export interface CreateCoordinateOptions {
|
|
638
854
|
id?: string;
|
|
639
|
-
type?: "cartesian" | "polar";
|
|
855
|
+
type?: "cartesian" | "polar" | "parallel";
|
|
640
856
|
layers?: readonly string[];
|
|
641
857
|
}
|
|
642
858
|
|
|
@@ -739,7 +955,8 @@ export interface ThetaEncodingOptions {
|
|
|
739
955
|
fieldType?: FieldType;
|
|
740
956
|
scale?: ThetaScaleOptions;
|
|
741
957
|
coordinate?: string;
|
|
742
|
-
aggregate?: "count";
|
|
958
|
+
aggregate?: "count" | "sum";
|
|
959
|
+
weight?: string;
|
|
743
960
|
}
|
|
744
961
|
|
|
745
962
|
export interface RadialEncodingOptions {
|
|
@@ -811,13 +1028,59 @@ export interface DensityDataOptions {
|
|
|
811
1028
|
as?: readonly [string, string];
|
|
812
1029
|
}
|
|
813
1030
|
|
|
814
|
-
|
|
815
|
-
extends Omit<DensityDataOptions, "id"> {
|
|
1031
|
+
type DensityEncodingBase = Omit<DensityDataOptions, "id"> & {
|
|
816
1032
|
target?: string;
|
|
817
1033
|
densityChannel?: "x" | "y";
|
|
818
1034
|
coordinate?: string;
|
|
819
1035
|
valueScale?: ScaleOptions;
|
|
820
|
-
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
export type DensityEncodingOptions = DensityEncodingBase & (
|
|
1039
|
+
| {
|
|
1040
|
+
placement?: BaselineDensityPlacement;
|
|
1041
|
+
densityScale?: ScaleOptions;
|
|
1042
|
+
}
|
|
1043
|
+
| {
|
|
1044
|
+
placement: CategoryDensityPlacement;
|
|
1045
|
+
densityScale?: never;
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
|
|
1049
|
+
export interface HorizonXEncoding {
|
|
1050
|
+
field: string;
|
|
1051
|
+
fieldType?: "quantitative" | "temporal";
|
|
1052
|
+
scale?: ScaleOptions;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export interface HorizonYEncoding {
|
|
1056
|
+
field: string;
|
|
1057
|
+
fieldType?: "quantitative";
|
|
1058
|
+
scale?: ScaleOptions;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export interface HorizonPaletteOptions {
|
|
1062
|
+
positive?: Palette;
|
|
1063
|
+
negative?: Palette;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export interface HorizonEncodingOptions {
|
|
1067
|
+
target?: string;
|
|
1068
|
+
source?: string;
|
|
1069
|
+
x?: string | HorizonXEncoding;
|
|
1070
|
+
y?: string | HorizonYEncoding;
|
|
1071
|
+
groupBy?: string;
|
|
1072
|
+
bands?: number;
|
|
1073
|
+
baseline?: number;
|
|
1074
|
+
extent?: "auto" | number;
|
|
1075
|
+
resolve?: HorizonResolution;
|
|
1076
|
+
missing?: HorizonMissingPolicy;
|
|
1077
|
+
overflow?: HorizonOverflowPolicy;
|
|
1078
|
+
palette?: HorizonPaletteOptions;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export interface EditHorizonOptions
|
|
1082
|
+
extends Omit<HorizonEncodingOptions, "groupBy"> {
|
|
1083
|
+
groupBy?: string | false;
|
|
821
1084
|
}
|
|
822
1085
|
|
|
823
1086
|
export type IntervalCenter = "mean" | "median";
|
|
@@ -840,6 +1103,38 @@ export interface IntervalDataOptions {
|
|
|
840
1103
|
as?: IntervalOutputFields;
|
|
841
1104
|
}
|
|
842
1105
|
|
|
1106
|
+
export interface WindowDataOptions {
|
|
1107
|
+
id: string;
|
|
1108
|
+
source?: string;
|
|
1109
|
+
partitionBy?: string | readonly string[];
|
|
1110
|
+
sortBy?: readonly WindowSort[];
|
|
1111
|
+
operations: readonly WindowOperation[];
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export interface Bin2DDataOptions {
|
|
1115
|
+
id: string;
|
|
1116
|
+
source?: string;
|
|
1117
|
+
x: string;
|
|
1118
|
+
y: string;
|
|
1119
|
+
bins?: number | Bin2DCounts;
|
|
1120
|
+
extent?: Bin2DExtent;
|
|
1121
|
+
includeEmpty?: boolean;
|
|
1122
|
+
members?: boolean;
|
|
1123
|
+
as?: Bin2DOutputFields;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export interface EditBin2DDataOptions {
|
|
1127
|
+
target?: string;
|
|
1128
|
+
source?: string;
|
|
1129
|
+
x?: string;
|
|
1130
|
+
y?: string;
|
|
1131
|
+
bins?: number | Bin2DCounts;
|
|
1132
|
+
extent?: Bin2DExtent;
|
|
1133
|
+
includeEmpty?: boolean;
|
|
1134
|
+
members?: boolean;
|
|
1135
|
+
as?: DatasetBin2DOutputFields;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
843
1138
|
export interface ErrorBarPositionChannel {
|
|
844
1139
|
field?: string;
|
|
845
1140
|
fieldType?: "nominal" | "ordinal" | "temporal";
|
|
@@ -889,6 +1184,11 @@ export interface EditErrorBarOptions {
|
|
|
889
1184
|
strokeWidth?: number;
|
|
890
1185
|
strokeDash?: DashStyle | DashPattern;
|
|
891
1186
|
opacity?: number;
|
|
1187
|
+
statistics?: {
|
|
1188
|
+
center?: IntervalCenter;
|
|
1189
|
+
extent?: IntervalExtent;
|
|
1190
|
+
level?: number;
|
|
1191
|
+
};
|
|
892
1192
|
}
|
|
893
1193
|
|
|
894
1194
|
export interface BoxPlotCategoryChannel {
|
|
@@ -936,10 +1236,14 @@ export interface BoxPlotOptions {
|
|
|
936
1236
|
radius?: number;
|
|
937
1237
|
opacity?: number;
|
|
938
1238
|
};
|
|
1239
|
+
guides?: false | CreateGuidesOptions;
|
|
939
1240
|
}
|
|
940
1241
|
|
|
941
1242
|
export interface EditBoxPlotOptions {
|
|
942
1243
|
target?: string;
|
|
1244
|
+
data?: string;
|
|
1245
|
+
x?: BoxPlotPositionChannel;
|
|
1246
|
+
y?: BoxPlotPositionChannel;
|
|
943
1247
|
whisker?: BoxPlotWhisker;
|
|
944
1248
|
width?: { band?: number };
|
|
945
1249
|
outliers?: boolean;
|
|
@@ -960,6 +1264,269 @@ export interface EditBoxPlotOptions {
|
|
|
960
1264
|
};
|
|
961
1265
|
}
|
|
962
1266
|
|
|
1267
|
+
export type GradientPlotPositionChannel = BoxPlotPositionChannel;
|
|
1268
|
+
|
|
1269
|
+
export interface GradientPlotDensityOptions {
|
|
1270
|
+
bandwidth?: "auto" | number;
|
|
1271
|
+
extent?: "auto" | readonly [number, number];
|
|
1272
|
+
steps?: number;
|
|
1273
|
+
kernel?: DensityKernel;
|
|
1274
|
+
normalization?: DensityNormalization;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
export interface GradientPlotAppearanceOptions {
|
|
1278
|
+
palette?: Palette;
|
|
1279
|
+
opacity?: readonly [number, number];
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
export interface GradientPlotCenterOptions {
|
|
1283
|
+
type?: "mean" | "median";
|
|
1284
|
+
stroke?: string;
|
|
1285
|
+
strokeWidth?: number;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export interface GradientPlotOptions {
|
|
1289
|
+
id?: string;
|
|
1290
|
+
target?: string;
|
|
1291
|
+
data?: string;
|
|
1292
|
+
x?: GradientPlotPositionChannel;
|
|
1293
|
+
y?: GradientPlotPositionChannel;
|
|
1294
|
+
coordinate?: string;
|
|
1295
|
+
density?: GradientPlotDensityOptions;
|
|
1296
|
+
width?: { band?: number };
|
|
1297
|
+
gradient?: GradientPlotAppearanceOptions;
|
|
1298
|
+
center?: false | GradientPlotCenterOptions;
|
|
1299
|
+
guides?: false | CreateGuidesOptions;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
export type ViolinPlotPositionChannel =
|
|
1303
|
+
| string
|
|
1304
|
+
| BoxPlotPositionChannel;
|
|
1305
|
+
|
|
1306
|
+
export interface ViolinPlotDensityOptions
|
|
1307
|
+
extends GradientPlotDensityOptions {
|
|
1308
|
+
width?: DensityPlacementWidth;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
export interface ViolinPlotSplitOptions {
|
|
1312
|
+
field: string;
|
|
1313
|
+
domain?: readonly [unknown, unknown];
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export type ViolinPlotColorOptions =
|
|
1317
|
+
| string
|
|
1318
|
+
| Omit<CategoricalEncodingOptions, "target">;
|
|
1319
|
+
|
|
1320
|
+
export interface ViolinPlotAreaOptions {
|
|
1321
|
+
fill?: string;
|
|
1322
|
+
opacity?: number;
|
|
1323
|
+
stroke?: string;
|
|
1324
|
+
strokeWidth?: number;
|
|
1325
|
+
curve?: CurveInterpolation;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
export interface ViolinPlotOptions {
|
|
1329
|
+
id?: string;
|
|
1330
|
+
data?: string;
|
|
1331
|
+
coordinate?: string;
|
|
1332
|
+
x: ViolinPlotPositionChannel;
|
|
1333
|
+
y: ViolinPlotPositionChannel;
|
|
1334
|
+
split?: ViolinPlotSplitOptions;
|
|
1335
|
+
color?: ViolinPlotColorOptions;
|
|
1336
|
+
density?: ViolinPlotDensityOptions;
|
|
1337
|
+
area?: ViolinPlotAreaOptions;
|
|
1338
|
+
guides?: false | CreateGuidesOptions;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
export interface EditGradientPlotOptions {
|
|
1342
|
+
target?: string;
|
|
1343
|
+
data?: string;
|
|
1344
|
+
x?: GradientPlotPositionChannel;
|
|
1345
|
+
y?: GradientPlotPositionChannel;
|
|
1346
|
+
density?: GradientPlotDensityOptions;
|
|
1347
|
+
width?: { band?: number };
|
|
1348
|
+
gradient?: GradientPlotAppearanceOptions;
|
|
1349
|
+
center?: false | GradientPlotCenterOptions;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
type BasicPositionChannel =
|
|
1353
|
+
| string
|
|
1354
|
+
| Omit<PositionEncodingOptions, "target" | "coordinate">;
|
|
1355
|
+
type BasicColorChannel =
|
|
1356
|
+
| string
|
|
1357
|
+
| (ColorEncodingOptions extends infer T
|
|
1358
|
+
? T extends unknown ? Omit<T, "target"> : never
|
|
1359
|
+
: never);
|
|
1360
|
+
export type BasicSizeChannel = string | {
|
|
1361
|
+
field: string;
|
|
1362
|
+
fieldType?: "quantitative";
|
|
1363
|
+
scale?: ScaleOptions;
|
|
1364
|
+
};
|
|
1365
|
+
export type BasicShapeChannel = string | {
|
|
1366
|
+
field: string;
|
|
1367
|
+
fieldType?: "nominal";
|
|
1368
|
+
scale?: ScaleOptions;
|
|
1369
|
+
};
|
|
1370
|
+
export type BasicStrokeDashChannel =
|
|
1371
|
+
StrokeDashEncodingOptions extends infer T
|
|
1372
|
+
? T extends unknown ? Omit<T, "target"> : never
|
|
1373
|
+
: never;
|
|
1374
|
+
|
|
1375
|
+
export type ParallelMissingPolicy = "break" | "drop-row" | "error";
|
|
1376
|
+
export type ParallelDimension = string | {
|
|
1377
|
+
field: string;
|
|
1378
|
+
fieldType?: "quantitative" | "ordinal";
|
|
1379
|
+
title?: string;
|
|
1380
|
+
scale?: Omit<ScaleOptions, "id">;
|
|
1381
|
+
};
|
|
1382
|
+
export interface ParallelCoordinatesEncodingOptions {
|
|
1383
|
+
target?: string;
|
|
1384
|
+
coordinate?: string;
|
|
1385
|
+
dimensions: readonly [ParallelDimension, ParallelDimension, ...ParallelDimension[]];
|
|
1386
|
+
key?: string;
|
|
1387
|
+
missing?: ParallelMissingPolicy;
|
|
1388
|
+
}
|
|
1389
|
+
export interface CreateParallelCoordinatesOptions {
|
|
1390
|
+
id?: string;
|
|
1391
|
+
data?: string;
|
|
1392
|
+
coordinate?: string;
|
|
1393
|
+
dimensions: readonly [ParallelDimension, ParallelDimension, ...ParallelDimension[]];
|
|
1394
|
+
key?: string;
|
|
1395
|
+
missing?: ParallelMissingPolicy;
|
|
1396
|
+
color?: BasicColorChannel;
|
|
1397
|
+
strokeDash?: BasicStrokeDashChannel;
|
|
1398
|
+
line?: {
|
|
1399
|
+
strokeWidth?: number;
|
|
1400
|
+
stroke?: string;
|
|
1401
|
+
opacity?: number;
|
|
1402
|
+
curve?: "linear";
|
|
1403
|
+
closed?: false;
|
|
1404
|
+
};
|
|
1405
|
+
guides?: false | CreateGuidesOptions;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
export interface CreateScatterPlotOptions {
|
|
1409
|
+
id?: string;
|
|
1410
|
+
data?: string;
|
|
1411
|
+
coordinate?: string;
|
|
1412
|
+
x: BasicPositionChannel;
|
|
1413
|
+
y: BasicPositionChannel;
|
|
1414
|
+
color?: BasicColorChannel;
|
|
1415
|
+
size?: BasicSizeChannel;
|
|
1416
|
+
shape?: BasicShapeChannel;
|
|
1417
|
+
point?: {
|
|
1418
|
+
shape?: PointShape;
|
|
1419
|
+
fill?: string;
|
|
1420
|
+
opacity?: number;
|
|
1421
|
+
stroke?: string;
|
|
1422
|
+
strokeWidth?: number;
|
|
1423
|
+
};
|
|
1424
|
+
guides?: false | CreateGuidesOptions;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
export interface CreateLinePlotOptions {
|
|
1428
|
+
id?: string;
|
|
1429
|
+
data?: string;
|
|
1430
|
+
coordinate?: string;
|
|
1431
|
+
x: BasicPositionChannel;
|
|
1432
|
+
y: BasicPositionChannel;
|
|
1433
|
+
color?: BasicColorChannel;
|
|
1434
|
+
groupBy?: string;
|
|
1435
|
+
strokeDash?: BasicStrokeDashChannel;
|
|
1436
|
+
line?: {
|
|
1437
|
+
strokeWidth?: number;
|
|
1438
|
+
curve?: CurveInterpolation;
|
|
1439
|
+
stroke?: string;
|
|
1440
|
+
opacity?: number;
|
|
1441
|
+
closed?: boolean;
|
|
1442
|
+
};
|
|
1443
|
+
guides?: false | CreateGuidesOptions;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
type BasicHistogramEncoding =
|
|
1447
|
+
HistogramEncodingOptions extends infer T
|
|
1448
|
+
? T extends unknown ? Omit<T, "field" | "target" | "coordinate"> : never
|
|
1449
|
+
: never;
|
|
1450
|
+
|
|
1451
|
+
export interface CreateBarPlotOptions {
|
|
1452
|
+
id?: string;
|
|
1453
|
+
data?: string;
|
|
1454
|
+
coordinate?: string;
|
|
1455
|
+
x: BasicPositionChannel;
|
|
1456
|
+
y: BasicPositionChannel;
|
|
1457
|
+
color?: BasicColorChannel;
|
|
1458
|
+
width?: Omit<BarWidthOptions, "target">;
|
|
1459
|
+
bar?: {
|
|
1460
|
+
fill?: string;
|
|
1461
|
+
opacity?: number;
|
|
1462
|
+
stroke?: string;
|
|
1463
|
+
strokeWidth?: number;
|
|
1464
|
+
};
|
|
1465
|
+
guides?: false | CreateGuidesOptions;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
export type CreateHistogramOptions = BasicHistogramEncoding & {
|
|
1469
|
+
id?: string;
|
|
1470
|
+
data?: string;
|
|
1471
|
+
coordinate?: string;
|
|
1472
|
+
field: string;
|
|
1473
|
+
color?: BasicColorChannel;
|
|
1474
|
+
bar?: {
|
|
1475
|
+
fill?: string;
|
|
1476
|
+
opacity?: number;
|
|
1477
|
+
stroke?: string;
|
|
1478
|
+
strokeWidth?: number;
|
|
1479
|
+
};
|
|
1480
|
+
guides?: false | CreateGuidesOptions;
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
export interface HeatmapBaseOptions {
|
|
1484
|
+
id?: string;
|
|
1485
|
+
data?: string;
|
|
1486
|
+
coordinate?: string;
|
|
1487
|
+
rect?: {
|
|
1488
|
+
opacity?: number;
|
|
1489
|
+
stroke?: string | false;
|
|
1490
|
+
strokeWidth?: number;
|
|
1491
|
+
};
|
|
1492
|
+
guides?: false | CreateGuidesOptions;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
export interface PreGriddedHeatmapOptions extends HeatmapBaseOptions {
|
|
1496
|
+
x: BasicPositionChannel;
|
|
1497
|
+
y: BasicPositionChannel;
|
|
1498
|
+
bin?: never;
|
|
1499
|
+
color: BasicColorChannel;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
export interface BinnedHeatmapPositionChannel {
|
|
1503
|
+
field: string;
|
|
1504
|
+
fieldType?: "quantitative";
|
|
1505
|
+
scale?: ScaleOptions;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
export interface BinnedHeatmapColorOptions {
|
|
1509
|
+
scale?: ContinuousColorScaleOptions | DiscretizedColorScaleOptions;
|
|
1510
|
+
palette?: Palette;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export interface HeatmapBinOptions {
|
|
1514
|
+
bins?: number | Bin2DCounts;
|
|
1515
|
+
extent?: Bin2DExtent;
|
|
1516
|
+
includeEmpty?: boolean;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
export interface BinnedHeatmapOptions extends HeatmapBaseOptions {
|
|
1520
|
+
x: string | BinnedHeatmapPositionChannel;
|
|
1521
|
+
y: string | BinnedHeatmapPositionChannel;
|
|
1522
|
+
bin: HeatmapBinOptions;
|
|
1523
|
+
color?: BinnedHeatmapColorOptions;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
export type CreateHeatmapOptions =
|
|
1527
|
+
| PreGriddedHeatmapOptions
|
|
1528
|
+
| BinnedHeatmapOptions;
|
|
1529
|
+
|
|
963
1530
|
export interface ErrorBandPositionChannel {
|
|
964
1531
|
field?: string;
|
|
965
1532
|
fieldType?: "quantitative" | "temporal";
|
|
@@ -1010,6 +1577,18 @@ export interface EditErrorBandOptions {
|
|
|
1010
1577
|
fill?: string;
|
|
1011
1578
|
opacity?: number;
|
|
1012
1579
|
curve?: CurveInterpolation;
|
|
1580
|
+
statistics?: {
|
|
1581
|
+
center?: IntervalCenter;
|
|
1582
|
+
extent?: IntervalExtent;
|
|
1583
|
+
level?: number;
|
|
1584
|
+
};
|
|
1585
|
+
boundaries?: false | {
|
|
1586
|
+
stroke?: string;
|
|
1587
|
+
strokeWidth?: number;
|
|
1588
|
+
strokeDash?: DashStyle | DashPattern;
|
|
1589
|
+
opacity?: number;
|
|
1590
|
+
curve?: CurveInterpolation;
|
|
1591
|
+
};
|
|
1013
1592
|
}
|
|
1014
1593
|
|
|
1015
1594
|
export interface EditErrorBandBoundaryOptions {
|
|
@@ -1024,11 +1603,15 @@ export interface EditErrorBandBoundaryOptions {
|
|
|
1024
1603
|
|
|
1025
1604
|
export interface EditDensityOptions {
|
|
1026
1605
|
target?: string;
|
|
1606
|
+
source?: string;
|
|
1607
|
+
field?: string;
|
|
1608
|
+
groupBy?: string | false;
|
|
1027
1609
|
bandwidth?: "auto" | number;
|
|
1028
1610
|
extent?: "auto" | readonly [number, number];
|
|
1029
1611
|
steps?: number;
|
|
1030
1612
|
kernel?: DensityKernel;
|
|
1031
1613
|
normalization?: DensityNormalization;
|
|
1614
|
+
placement?: DensityPlacement;
|
|
1032
1615
|
}
|
|
1033
1616
|
|
|
1034
1617
|
export interface OffsetScaleOptions {
|
|
@@ -1072,6 +1655,29 @@ export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data"
|
|
|
1072
1655
|
target?: string;
|
|
1073
1656
|
}
|
|
1074
1657
|
|
|
1658
|
+
export type LabelLayoutAxis = "x" | "y" | "both";
|
|
1659
|
+
export type LabelLayoutBounds = "plot" | "canvas";
|
|
1660
|
+
|
|
1661
|
+
export interface LabelLeaderOptions {
|
|
1662
|
+
stroke?: string;
|
|
1663
|
+
strokeWidth?: number;
|
|
1664
|
+
strokeDash?: readonly number[];
|
|
1665
|
+
opacity?: number;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
export interface LabelLayoutOptions {
|
|
1669
|
+
target?: string;
|
|
1670
|
+
axis?: LabelLayoutAxis;
|
|
1671
|
+
padding?: number;
|
|
1672
|
+
maxDisplacement?: number;
|
|
1673
|
+
bounds?: LabelLayoutBounds;
|
|
1674
|
+
leader?: false | LabelLeaderOptions;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
export interface RemoveLabelLayoutOptions {
|
|
1678
|
+
target?: string;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1075
1681
|
export interface RectMarkOptions {
|
|
1076
1682
|
id?: string;
|
|
1077
1683
|
data?: string;
|
|
@@ -1204,6 +1810,36 @@ export type OpacityEncodingOptions =
|
|
|
1204
1810
|
scale?: OpacityScaleOptions;
|
|
1205
1811
|
};
|
|
1206
1812
|
|
|
1813
|
+
export interface StrokeWidthScaleOptions {
|
|
1814
|
+
id?: string;
|
|
1815
|
+
type?: "linear" | "log" | "pow" | "sqrt" | "symlog";
|
|
1816
|
+
domain?: "auto" | readonly [number, number];
|
|
1817
|
+
range?: "auto" | readonly [number, number];
|
|
1818
|
+
nice?: boolean;
|
|
1819
|
+
zero?: boolean;
|
|
1820
|
+
clamp?: boolean;
|
|
1821
|
+
reverse?: boolean;
|
|
1822
|
+
base?: number;
|
|
1823
|
+
exponent?: number;
|
|
1824
|
+
constant?: number;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
export type StrokeWidthEncodingOptions =
|
|
1828
|
+
| {
|
|
1829
|
+
value: number;
|
|
1830
|
+
field?: never;
|
|
1831
|
+
target?: string;
|
|
1832
|
+
fieldType?: never;
|
|
1833
|
+
scale?: never;
|
|
1834
|
+
}
|
|
1835
|
+
| {
|
|
1836
|
+
field: string;
|
|
1837
|
+
value?: never;
|
|
1838
|
+
target?: string;
|
|
1839
|
+
fieldType?: "quantitative";
|
|
1840
|
+
scale?: StrokeWidthScaleOptions;
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1207
1843
|
export type RegressionMethod = "linear" | "polynomial" | "loess";
|
|
1208
1844
|
export type RegressionInterval = "mean" | "prediction";
|
|
1209
1845
|
|
|
@@ -1299,6 +1935,10 @@ export type RegressionOptions = RegressionCommonOptions & (
|
|
|
1299
1935
|
|
|
1300
1936
|
export interface EditRegressionOptions {
|
|
1301
1937
|
target?: string;
|
|
1938
|
+
data?: string;
|
|
1939
|
+
x?: string;
|
|
1940
|
+
y?: string;
|
|
1941
|
+
groupBy?: string | false;
|
|
1302
1942
|
method?: RegressionMethod;
|
|
1303
1943
|
degree?: number;
|
|
1304
1944
|
span?: number;
|
|
@@ -1322,6 +1962,7 @@ export interface RemoveGridOptions {
|
|
|
1322
1962
|
|
|
1323
1963
|
export interface RemoveLegendOptions {
|
|
1324
1964
|
target?: string;
|
|
1965
|
+
channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
1325
1966
|
}
|
|
1326
1967
|
|
|
1327
1968
|
export interface RemoveMarkOptions {
|
|
@@ -1376,7 +2017,7 @@ export interface LegendBorderOptions {
|
|
|
1376
2017
|
|
|
1377
2018
|
export interface LegendOptions {
|
|
1378
2019
|
target?: string;
|
|
1379
|
-
channels?: readonly ("color" | "strokeDash" | "shape" | "size" | "opacity")[];
|
|
2020
|
+
channels?: readonly ("color" | "strokeDash" | "strokeWidth" | "shape" | "size" | "opacity")[];
|
|
1380
2021
|
position?: "right" | "left" | "bottom" | "top";
|
|
1381
2022
|
align?: "left" | "center" | "right";
|
|
1382
2023
|
direction?: "horizontal" | "vertical";
|
|
@@ -1432,11 +2073,11 @@ export interface EditLegendBorderOptions {
|
|
|
1432
2073
|
|
|
1433
2074
|
export interface EditAxisOptions<P extends string> {
|
|
1434
2075
|
position?: P;
|
|
1435
|
-
line?: AxisLineStyleOptions;
|
|
1436
|
-
ticks?: Omit<AxisTickOptions<P>, "scale" | "position">;
|
|
1437
|
-
labels?: Omit<AxisLabelOptions<P>, "scale" | "position">;
|
|
1438
|
-
ticksAndLabels?: Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
|
|
1439
|
-
title?: Omit<AxisTitleOptions<P>, "scale" | "position">;
|
|
2076
|
+
line?: false | AxisLineStyleOptions;
|
|
2077
|
+
ticks?: false | Omit<AxisTickOptions<P>, "scale" | "position">;
|
|
2078
|
+
labels?: false | Omit<AxisLabelOptions<P>, "scale" | "position">;
|
|
2079
|
+
ticksAndLabels?: false | Omit<AxisTicksAndLabelsOptions<P>, "scale" | "position">;
|
|
2080
|
+
title?: false | Omit<AxisTitleOptions<P>, "scale" | "position">;
|
|
1440
2081
|
}
|
|
1441
2082
|
|
|
1442
2083
|
export interface TitleTextStyleOptions {
|
|
@@ -1446,6 +2087,17 @@ export interface TitleTextStyleOptions {
|
|
|
1446
2087
|
fontWeight?: string | number;
|
|
1447
2088
|
}
|
|
1448
2089
|
|
|
2090
|
+
export interface PathOrderEncodingOptions {
|
|
2091
|
+
target?: string;
|
|
2092
|
+
field: string;
|
|
2093
|
+
fieldType?: "quantitative";
|
|
2094
|
+
order?: "ascending" | "descending";
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
export interface RemovePathOrderOptions {
|
|
2098
|
+
target?: string;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
1449
2101
|
export interface TitleOptions {
|
|
1450
2102
|
text: string;
|
|
1451
2103
|
subtitle?: string;
|
|
@@ -1484,10 +2136,16 @@ export class ChartProgram {
|
|
|
1484
2136
|
filterData(options: FilterDataOptions): ChartProgram;
|
|
1485
2137
|
filterMarks(options: FilterMarksOptions): ChartProgram;
|
|
1486
2138
|
selectMarks(options: SelectMarksOptions): ChartProgram;
|
|
2139
|
+
editMarkSelection(options: EditMarkSelectionOptions): ChartProgram;
|
|
2140
|
+
removeMarkHighlight(options?: RemoveMarkSelectionOptions): ChartProgram;
|
|
2141
|
+
removeMarkSelection(options?: RemoveMarkSelectionOptions): ChartProgram;
|
|
1487
2142
|
highlightMarks(options: HighlightMarksOptions): ChartProgram;
|
|
1488
2143
|
createDensityData(options: DensityDataOptions): ChartProgram;
|
|
1489
2144
|
createRegressionData(options: RegressionDataOptions): ChartProgram;
|
|
1490
2145
|
createIntervalData(options: IntervalDataOptions): ChartProgram;
|
|
2146
|
+
createWindowData(options: WindowDataOptions): ChartProgram;
|
|
2147
|
+
createBin2DData(options: Bin2DDataOptions): ChartProgram;
|
|
2148
|
+
editBin2DData(options: EditBin2DDataOptions): ChartProgram;
|
|
1491
2149
|
|
|
1492
2150
|
createPointMark(options?: {
|
|
1493
2151
|
id?: string;
|
|
@@ -1503,9 +2161,11 @@ export class ChartProgram {
|
|
|
1503
2161
|
shape?: PointShape;
|
|
1504
2162
|
fill?: string;
|
|
1505
2163
|
opacity?: number;
|
|
1506
|
-
stroke?: string;
|
|
2164
|
+
stroke?: string | false;
|
|
1507
2165
|
strokeWidth?: number;
|
|
1508
2166
|
}): ChartProgram;
|
|
2167
|
+
jitterPoints(options: JitterPointsOptions): ChartProgram;
|
|
2168
|
+
removeJitter(options?: RemoveJitterOptions): ChartProgram;
|
|
1509
2169
|
createLineMark(options?: {
|
|
1510
2170
|
id?: string;
|
|
1511
2171
|
data?: string;
|
|
@@ -1563,7 +2223,7 @@ export class ChartProgram {
|
|
|
1563
2223
|
padAngle?: number;
|
|
1564
2224
|
fill?: string;
|
|
1565
2225
|
opacity?: number;
|
|
1566
|
-
stroke?: string;
|
|
2226
|
+
stroke?: string | false;
|
|
1567
2227
|
strokeWidth?: number;
|
|
1568
2228
|
}): ChartProgram;
|
|
1569
2229
|
createRectMark(options?: RectMarkOptions): ChartProgram;
|
|
@@ -1571,6 +2231,8 @@ export class ChartProgram {
|
|
|
1571
2231
|
createRuleMark(options?: { id?: string; data?: string }): ChartProgram;
|
|
1572
2232
|
createTextMark(options?: TextMarkOptions): ChartProgram;
|
|
1573
2233
|
editTextMark(options: EditTextMarkOptions): ChartProgram;
|
|
2234
|
+
layoutLabels(options?: LabelLayoutOptions): ChartProgram;
|
|
2235
|
+
removeLabelLayout(options?: RemoveLabelLayoutOptions): ChartProgram;
|
|
1574
2236
|
editAreaMark(options: {
|
|
1575
2237
|
target?: string;
|
|
1576
2238
|
fill?: string;
|
|
@@ -1592,6 +2254,7 @@ export class ChartProgram {
|
|
|
1592
2254
|
encodeOpacity(options: OpacityEncodingOptions): ChartProgram;
|
|
1593
2255
|
encodeRadius(options: { value: number; target?: string }): ChartProgram;
|
|
1594
2256
|
encodePointRadius(options: { value: number; target?: string }): ChartProgram;
|
|
2257
|
+
removePointRadius(options?: { target?: string }): ChartProgram;
|
|
1595
2258
|
encodeXOffset(options: XOffsetEncodingOptions): ChartProgram;
|
|
1596
2259
|
encodeYOffset(options: YOffsetEncodingOptions): ChartProgram;
|
|
1597
2260
|
encodeY2(options: SecondaryPositionEncodingOptions): ChartProgram;
|
|
@@ -1612,13 +2275,25 @@ export class ChartProgram {
|
|
|
1612
2275
|
scale?: ScaleOptions;
|
|
1613
2276
|
}): ChartProgram;
|
|
1614
2277
|
encodeGroup(options: { field: string; target?: string; fieldType?: "nominal" }): ChartProgram;
|
|
2278
|
+
encodePathOrder(options: PathOrderEncodingOptions): ChartProgram;
|
|
2279
|
+
encodeParallelCoordinates(options: ParallelCoordinatesEncodingOptions): ChartProgram;
|
|
2280
|
+
removePathOrder(options?: RemovePathOrderOptions): ChartProgram;
|
|
2281
|
+
removeEncoding(options: {
|
|
2282
|
+
target?: string;
|
|
2283
|
+
channel:
|
|
2284
|
+
| "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset"
|
|
2285
|
+
| "theta" | "radius" | "color" | "strokeDash" | "strokeWidth"
|
|
2286
|
+
| "size" | "shape" | "group" | "opacity" | "text";
|
|
2287
|
+
}): ChartProgram;
|
|
1615
2288
|
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
1616
2289
|
encodeHistogram(options: HistogramEncodingOptions): ChartProgram;
|
|
1617
2290
|
encodeDensity(options: DensityEncodingOptions): ChartProgram;
|
|
1618
2291
|
editDensity(options: EditDensityOptions): ChartProgram;
|
|
2292
|
+
encodeHorizon(options?: HorizonEncodingOptions): ChartProgram;
|
|
2293
|
+
editHorizon(options: EditHorizonOptions): ChartProgram;
|
|
1619
2294
|
encodeBarWidth(options?: BarWidthOptions): ChartProgram;
|
|
1620
2295
|
encodeStroke(options: { target?: string; value: string }): ChartProgram;
|
|
1621
|
-
encodeStrokeWidth(options:
|
|
2296
|
+
encodeStrokeWidth(options: StrokeWidthEncodingOptions): ChartProgram;
|
|
1622
2297
|
|
|
1623
2298
|
createRegression(options?: RegressionOptions): ChartProgram;
|
|
1624
2299
|
editRegression(options: EditRegressionOptions): ChartProgram;
|
|
@@ -1629,6 +2304,15 @@ export class ChartProgram {
|
|
|
1629
2304
|
editErrorBandBoundary(options: EditErrorBandBoundaryOptions): ChartProgram;
|
|
1630
2305
|
createBoxPlot(options?: BoxPlotOptions): ChartProgram;
|
|
1631
2306
|
editBoxPlot(options: EditBoxPlotOptions): ChartProgram;
|
|
2307
|
+
createGradientPlot(options?: GradientPlotOptions): ChartProgram;
|
|
2308
|
+
editGradientPlot(options: EditGradientPlotOptions): ChartProgram;
|
|
2309
|
+
createViolinPlot(options: ViolinPlotOptions): ChartProgram;
|
|
2310
|
+
createScatterPlot(options: CreateScatterPlotOptions): ChartProgram;
|
|
2311
|
+
createLinePlot(options: CreateLinePlotOptions): ChartProgram;
|
|
2312
|
+
createBarPlot(options: CreateBarPlotOptions): ChartProgram;
|
|
2313
|
+
createHistogram(options: CreateHistogramOptions): ChartProgram;
|
|
2314
|
+
createHeatmap(options: CreateHeatmapOptions): ChartProgram;
|
|
2315
|
+
createParallelCoordinates(options: CreateParallelCoordinatesOptions): ChartProgram;
|
|
1632
2316
|
removeMark(options?: RemoveMarkOptions): ChartProgram;
|
|
1633
2317
|
createAxes(options?: CreateAxesOptions): ChartProgram;
|
|
1634
2318
|
createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
|
|
@@ -1718,6 +2402,8 @@ export class ChartProgram {
|
|
|
1718
2402
|
editCompositionLayout(options: EditCompositionLayoutOptions): ChartProgram;
|
|
1719
2403
|
replaceCompositionChild(options: ReplaceCompositionChildOptions): ChartProgram;
|
|
1720
2404
|
facet(options: FacetOptions): ChartProgram;
|
|
2405
|
+
editFacetScales(options: FacetScaleResolutions): ChartProgram;
|
|
2406
|
+
editFacetGuides(options: FacetGuideOptions): ChartProgram;
|
|
1721
2407
|
editFacetHeaders(options: EditFacetHeadersOptions): ChartProgram;
|
|
1722
2408
|
|
|
1723
2409
|
editSemantic(options: EditSemanticOptions): ChartProgram;
|