ggaction 0.0.2 → 0.0.3
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 +28 -0
- package/README.md +12 -1
- package/package.json +6 -1
- package/src/actions/boxPlots/components.js +3 -3
- package/src/actions/boxPlots/edit.js +277 -0
- package/src/actions/boxPlots/index.js +2 -0
- package/src/actions/boxPlots/materialize.js +12 -1
- package/src/actions/boxPlots/options.js +25 -14
- package/src/actions/canvas/actions.js +21 -17
- package/src/actions/composition/actions.js +247 -0
- package/src/actions/composition/index.js +1 -0
- package/src/actions/coordinates/actions.js +2 -5
- package/src/actions/data/density.js +7 -1
- package/src/actions/data/filter.js +3 -1
- package/src/actions/encodings/appearance.js +11 -0
- package/src/actions/encodings/barWidth.js +5 -3
- package/src/actions/encodings/color.js +120 -25
- package/src/actions/encodings/index.js +2 -0
- package/src/actions/encodings/offset.js +90 -72
- package/src/actions/encodings/position/apply.js +66 -0
- package/src/actions/encodings/position/policies/arc.js +26 -0
- package/src/actions/encodings/position/policies/bar.js +9 -5
- package/src/actions/encodings/position/policies/index.js +5 -1
- package/src/actions/encodings/position/policies/line.js +20 -3
- package/src/actions/encodings/position/resolve.js +57 -8
- package/src/actions/encodings/position.js +44 -90
- package/src/actions/encodings/ranged.js +28 -6
- package/src/actions/encodings/shared.js +17 -21
- package/src/actions/encodings/text.js +73 -0
- package/src/actions/errorBands/create.js +37 -29
- package/src/actions/errorBands/edit.js +206 -0
- package/src/actions/errorBands/index.js +9 -0
- package/src/actions/errorBands/options.js +39 -0
- package/src/actions/errorBars/create.js +50 -43
- package/src/actions/errorBars/edit.js +130 -0
- package/src/actions/errorBars/index.js +3 -0
- package/src/actions/errorBars/options.js +52 -0
- package/src/actions/facets/actions.js +162 -0
- package/src/actions/facets/derive.js +200 -0
- package/src/actions/facets/guides.js +16 -0
- package/src/actions/facets/index.js +1 -0
- package/src/actions/facets/replay.js +69 -0
- package/src/actions/guides/applicability.js +113 -0
- package/src/actions/guides/axes/axes.js +70 -16
- package/src/actions/guides/axes/edit.js +126 -0
- package/src/actions/guides/axes/index.js +12 -0
- package/src/actions/guides/axes/labels.js +21 -18
- package/src/actions/guides/axes/remove.js +60 -0
- package/src/actions/guides/axes/tickGroups.js +7 -5
- package/src/actions/guides/axes/ticks.js +9 -4
- package/src/actions/guides/axes/titles.js +7 -5
- package/src/actions/guides/grids/grid.js +144 -15
- package/src/actions/guides/grids/resolve.js +5 -13
- package/src/actions/guides/guides.js +17 -75
- package/src/actions/guides/index.js +6 -0
- package/src/actions/guides/legends/categorical/actions.js +48 -9
- package/src/actions/guides/legends/categorical/components.js +16 -16
- package/src/actions/guides/legends/categorical/index.js +14 -14
- package/src/actions/guides/legends/categorical/layout.js +3 -1
- package/src/actions/guides/legends/categorical/options.js +2 -5
- package/src/actions/guides/legends/categorical/resolve.js +2 -2
- package/src/actions/guides/legends/categorical/symbols.js +14 -14
- package/src/actions/guides/legends/continuous/common.js +7 -7
- package/src/actions/guides/legends/continuous/interval.js +5 -5
- package/src/actions/guides/legends/edit.js +2 -6
- package/src/actions/guides/legends/focused.js +63 -0
- package/src/actions/guides/legends/index.js +4 -0
- package/src/actions/guides/legends/remove.js +64 -0
- package/src/actions/guides/legends/size.js +12 -14
- package/src/actions/guides/polar/axes/facade.js +219 -0
- package/src/actions/guides/polar/axes/labels.js +188 -0
- package/src/actions/guides/polar/axes/lines.js +113 -0
- package/src/actions/guides/polar/axes/shared.js +112 -0
- package/src/actions/guides/polar/axes/ticks.js +164 -0
- package/src/actions/guides/polar/axes/titles.js +165 -0
- package/src/actions/guides/polar/axes.js +55 -0
- package/src/actions/guides/polar/grids.js +252 -0
- package/src/actions/guides/polar/index.js +2 -0
- package/src/actions/guides/polar/resolve.js +269 -0
- package/src/actions/index.js +4 -0
- package/src/actions/marks/arc/actions.js +239 -0
- package/src/actions/marks/arc/index.js +1 -0
- package/src/actions/marks/{area.js → area/actions.js} +51 -38
- package/src/actions/marks/area/index.js +4 -0
- package/src/actions/marks/bar/create.js +26 -5
- package/src/actions/marks/bar/materialize.js +25 -31
- package/src/actions/marks/index.js +12 -4
- package/src/actions/marks/lifecycle.js +27 -0
- package/src/actions/marks/line/actions.js +373 -0
- package/src/actions/marks/line/index.js +1 -0
- package/src/actions/marks/{point.js → point/actions.js} +67 -108
- package/src/actions/marks/point/index.js +1 -0
- package/src/actions/marks/rect/actions.js +165 -0
- package/src/actions/marks/rect/index.js +1 -0
- package/src/actions/marks/remove.js +214 -0
- package/src/actions/marks/{rule.js → rule/actions.js} +34 -28
- package/src/actions/marks/rule/index.js +1 -0
- package/src/actions/marks/shared.js +156 -25
- package/src/actions/marks/text/actions.js +192 -0
- package/src/actions/marks/text/index.js +1 -0
- package/src/actions/primitives/createGraphics.js +13 -6
- package/src/actions/primitives/editGraphics.js +10 -3
- package/src/actions/primitives/semantic.js +26 -3
- package/src/actions/primitives/semanticValue.js +25 -3
- package/src/actions/regression/components.js +1 -1
- package/src/actions/regression/create.js +18 -1
- package/src/actions/regression/edit.js +247 -0
- package/src/actions/regression/index.js +3 -0
- package/src/actions/regression/resolve.js +3 -1
- package/src/actions/scales/consumers.js +15 -6
- package/src/actions/scales/definitions.js +13 -4
- package/src/actions/scales/edit.js +42 -19
- package/src/actions/scales/materialize.js +57 -408
- package/src/actions/selection/actions.js +38 -24
- package/src/actions/selection/index.js +2 -0
- package/src/actions/titles/actions.js +63 -2
- package/src/actions/titles/index.js +2 -0
- package/src/actions/titles/resolve.js +12 -17
- package/src/composition.js +10 -0
- package/src/core/ChartProgram.js +200 -2
- package/src/core/action.js +10 -0
- package/src/core/validation.js +16 -0
- package/src/core/vocabulary.js +154 -4
- package/src/grammar/arcs.js +154 -0
- package/src/grammar/bars/aggregate.js +2 -2
- package/src/grammar/bars/geometry.js +3 -3
- package/src/grammar/bars/policy.js +7 -1
- package/src/grammar/coordinates.js +3 -7
- package/src/grammar/density.js +20 -1
- package/src/grammar/facets/dependencies.js +185 -0
- package/src/grammar/facets/guides.js +257 -0
- package/src/grammar/facets/scales.js +254 -0
- package/src/grammar/facets.js +122 -0
- package/src/grammar/lineSeries.js +111 -3
- package/src/grammar/polar.js +102 -0
- package/src/grammar/polarGuides.js +243 -0
- package/src/grammar/polarLineCommands.js +43 -0
- package/src/grammar/polarPaths.js +161 -0
- package/src/grammar/positionCompatibility.js +18 -2
- package/src/grammar/rects.js +26 -0
- package/src/grammar/scales/continuous.js +6 -1
- package/src/grammar/scales/fields.js +7 -0
- package/src/grammar/scales/ordinal.js +5 -2
- package/src/grammar/scales/policies.js +1 -1
- package/src/grammar/schemas/graphic.js +1 -1
- package/src/grammar/schemas/graphicBounds.js +64 -9
- package/src/grammar/schemas/graphicTree.js +44 -10
- package/src/grammar/schemas/semanticPath.js +31 -9
- package/src/grammar/seriesLayout.js +13 -2
- package/src/grammar/text.js +71 -0
- package/src/grammar/ticks.js +50 -13
- package/src/index.js +1 -0
- package/src/layout/composition.js +310 -0
- package/src/layout/facets.js +131 -0
- package/src/layout/title.js +6 -0
- package/src/materialization/bars/aggregate.js +5 -2
- package/src/materialization/bars/grouped.js +75 -37
- package/src/materialization/composition.js +152 -0
- package/src/materialization/compositionSnapshot.js +114 -0
- package/src/materialization/dependencies.js +71 -16
- package/src/materialization/encodings.js +14 -28
- package/src/materialization/facetGuides.js +426 -0
- package/src/materialization/facets.js +214 -0
- package/src/materialization/graphicHierarchy.js +15 -5
- package/src/materialization/guides/resources.js +46 -0
- package/src/materialization/marks.js +220 -14
- package/src/materialization/planner.js +105 -12
- package/src/materialization/rect.js +138 -0
- package/src/materialization/rectConfig.js +38 -0
- package/src/materialization/rowEncoding.js +33 -0
- package/src/materialization/scales/map.js +40 -0
- package/src/materialization/scales/policies/arc.js +37 -0
- package/src/materialization/scales/policies/bar.js +132 -0
- package/src/materialization/scales/policies/series.js +76 -0
- package/src/materialization/scales/resolve.js +326 -0
- package/src/materialization/selection/items/arc.js +29 -0
- package/src/materialization/selection/items/bar.js +255 -0
- package/src/materialization/selection/items/common.js +131 -0
- package/src/materialization/selection/items/index.js +6 -0
- package/src/materialization/selection/items/path.js +59 -0
- package/src/materialization/selection/items/point.js +55 -0
- package/src/materialization/selection/items/rect.js +23 -0
- package/src/materialization/selection/items/rule.js +25 -0
- package/src/materialization/selection/policies/arc.js +10 -0
- package/src/materialization/selection/policies/area.js +1 -1
- package/src/materialization/selection/policies/bar.js +1 -1
- package/src/materialization/selection/policies/index.js +5 -1
- package/src/materialization/selection/policies/line.js +1 -1
- package/src/materialization/selection/policies/point.js +1 -1
- package/src/materialization/selection/policies/rect.js +10 -0
- package/src/materialization/selection/policies/rule.js +1 -1
- package/src/materialization/selection/styles.js +24 -16
- package/src/materialization/text.js +156 -0
- package/src/renderers/canvas/index.js +68 -22
- package/types/extension.d.ts +1 -0
- package/types/index.d.ts +56 -1
- package/types/program.d.ts +664 -27
- package/src/actions/marks/line.js +0 -248
- package/src/materialization/selection/items.js +0 -503
package/types/program.d.ts
CHANGED
|
@@ -46,6 +46,94 @@ export type ScaleType =
|
|
|
46
46
|
| "quantile"
|
|
47
47
|
| "threshold";
|
|
48
48
|
export type StackMode = "zero" | "normalize" | null;
|
|
49
|
+
export type CompositionAlign = "start" | "center" | "end";
|
|
50
|
+
export interface CompositionPadding {
|
|
51
|
+
top?: number;
|
|
52
|
+
right?: number;
|
|
53
|
+
bottom?: number;
|
|
54
|
+
left?: number;
|
|
55
|
+
}
|
|
56
|
+
export type CompositionProgramEntry =
|
|
57
|
+
| ChartProgram
|
|
58
|
+
| { id?: string; program: ChartProgram };
|
|
59
|
+
export interface CompositionOptions {
|
|
60
|
+
id?: string;
|
|
61
|
+
programs: readonly CompositionProgramEntry[];
|
|
62
|
+
gap?: number;
|
|
63
|
+
align?: CompositionAlign;
|
|
64
|
+
padding?: number | CompositionPadding;
|
|
65
|
+
}
|
|
66
|
+
export interface EditCompositionLayoutOptions {
|
|
67
|
+
gap?: number;
|
|
68
|
+
align?: CompositionAlign;
|
|
69
|
+
padding?: number | CompositionPadding;
|
|
70
|
+
}
|
|
71
|
+
export interface ReplaceCompositionChildOptions {
|
|
72
|
+
target: string;
|
|
73
|
+
program: ChartProgram;
|
|
74
|
+
}
|
|
75
|
+
export type FacetScaleResolution = "shared" | "independent";
|
|
76
|
+
export interface FacetScaleResolutions {
|
|
77
|
+
x?: FacetScaleResolution;
|
|
78
|
+
y?: FacetScaleResolution;
|
|
79
|
+
xOffset?: FacetScaleResolution;
|
|
80
|
+
yOffset?: FacetScaleResolution;
|
|
81
|
+
color?: FacetScaleResolution;
|
|
82
|
+
size?: FacetScaleResolution;
|
|
83
|
+
shape?: FacetScaleResolution;
|
|
84
|
+
opacity?: FacetScaleResolution;
|
|
85
|
+
strokeDash?: FacetScaleResolution;
|
|
86
|
+
}
|
|
87
|
+
export interface FacetGuideOptions {
|
|
88
|
+
axes?: "each" | "outer";
|
|
89
|
+
legend?: false | "shared";
|
|
90
|
+
}
|
|
91
|
+
export interface FacetOptions {
|
|
92
|
+
id?: string;
|
|
93
|
+
field: string;
|
|
94
|
+
data?: string;
|
|
95
|
+
columns?: number;
|
|
96
|
+
gap?: number;
|
|
97
|
+
align?: CompositionAlign;
|
|
98
|
+
padding?: number | CompositionPadding;
|
|
99
|
+
scales?: FacetScaleResolutions;
|
|
100
|
+
guides?: FacetGuideOptions;
|
|
101
|
+
}
|
|
102
|
+
export interface EditFacetHeadersOptions {
|
|
103
|
+
fontSize?: number;
|
|
104
|
+
fontFamily?: string;
|
|
105
|
+
fontWeight?: string | number;
|
|
106
|
+
color?: string;
|
|
107
|
+
offset?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface ConcatCompositionSpec {
|
|
110
|
+
readonly id: string;
|
|
111
|
+
readonly direction: "horizontal" | "vertical";
|
|
112
|
+
readonly children: readonly string[];
|
|
113
|
+
readonly gap: number;
|
|
114
|
+
readonly align: CompositionAlign;
|
|
115
|
+
readonly padding: Readonly<Required<CompositionPadding>>;
|
|
116
|
+
}
|
|
117
|
+
export interface FacetCompositionSpec {
|
|
118
|
+
readonly id: string;
|
|
119
|
+
readonly type: "facet";
|
|
120
|
+
readonly children: readonly string[];
|
|
121
|
+
readonly columns: number;
|
|
122
|
+
readonly gap: number;
|
|
123
|
+
readonly align: CompositionAlign;
|
|
124
|
+
readonly padding: Readonly<Required<CompositionPadding>>;
|
|
125
|
+
readonly facet: {
|
|
126
|
+
readonly data: string;
|
|
127
|
+
readonly field: string;
|
|
128
|
+
readonly values: readonly DatasetScalar[];
|
|
129
|
+
readonly scales: Readonly<Required<FacetScaleResolutions>>;
|
|
130
|
+
readonly guides: {
|
|
131
|
+
readonly axes: "each" | "outer";
|
|
132
|
+
readonly legend: false | "shared";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export type CompositionSpec = ConcatCompositionSpec | FacetCompositionSpec;
|
|
49
137
|
export type DensityKernel =
|
|
50
138
|
| "gaussian"
|
|
51
139
|
| "epanechnikov"
|
|
@@ -69,6 +157,96 @@ export type FilterDataOptions = {
|
|
|
69
157
|
source?: string;
|
|
70
158
|
field: string;
|
|
71
159
|
} & FilterModeOptions;
|
|
160
|
+
export type DatasetScalar = string | number | boolean | null;
|
|
161
|
+
export type DatasetFilterTransform = {
|
|
162
|
+
type: "filter";
|
|
163
|
+
field: string;
|
|
164
|
+
} & (
|
|
165
|
+
| { oneOf: readonly DatasetScalar[]; predicate?: never; range?: never }
|
|
166
|
+
| { oneOf?: never; predicate: FilterComparison; range?: never }
|
|
167
|
+
| { oneOf?: never; predicate?: never; range: FilterRange }
|
|
168
|
+
);
|
|
169
|
+
export type DatasetRegressionTransform = {
|
|
170
|
+
type: "regression";
|
|
171
|
+
x: string;
|
|
172
|
+
y: string;
|
|
173
|
+
groupBy?: string;
|
|
174
|
+
} & (
|
|
175
|
+
| {
|
|
176
|
+
method: "linear";
|
|
177
|
+
confidence: number;
|
|
178
|
+
interval: "mean" | "prediction";
|
|
179
|
+
degree?: never;
|
|
180
|
+
span?: never;
|
|
181
|
+
}
|
|
182
|
+
| {
|
|
183
|
+
method: "polynomial";
|
|
184
|
+
degree: number;
|
|
185
|
+
confidence: number;
|
|
186
|
+
interval: "mean" | "prediction";
|
|
187
|
+
span?: never;
|
|
188
|
+
}
|
|
189
|
+
| {
|
|
190
|
+
method: "loess";
|
|
191
|
+
span: number;
|
|
192
|
+
degree?: never;
|
|
193
|
+
confidence?: never;
|
|
194
|
+
interval?: never;
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
export interface DatasetDensityTransform {
|
|
198
|
+
type: "density";
|
|
199
|
+
field: string;
|
|
200
|
+
groupBy?: string;
|
|
201
|
+
bandwidth: "auto" | number;
|
|
202
|
+
extent: "auto" | readonly [number, number];
|
|
203
|
+
steps: number;
|
|
204
|
+
kernel?: DensityKernel;
|
|
205
|
+
normalization?: DensityNormalization;
|
|
206
|
+
as: readonly [string, string];
|
|
207
|
+
resolve: "shared";
|
|
208
|
+
resolved?: {
|
|
209
|
+
readonly bandwidth: number;
|
|
210
|
+
readonly extent: readonly [number, number];
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export interface DatasetIntervalOutputFields {
|
|
214
|
+
center: string;
|
|
215
|
+
lower: string;
|
|
216
|
+
upper: string;
|
|
217
|
+
}
|
|
218
|
+
export type DatasetIntervalTransform = {
|
|
219
|
+
type: "interval";
|
|
220
|
+
field: string;
|
|
221
|
+
groupBy: readonly string[];
|
|
222
|
+
as: DatasetIntervalOutputFields;
|
|
223
|
+
} & (
|
|
224
|
+
| {
|
|
225
|
+
center: "mean";
|
|
226
|
+
extent: "stderr" | "stdev";
|
|
227
|
+
level?: never;
|
|
228
|
+
}
|
|
229
|
+
| {
|
|
230
|
+
center: "mean";
|
|
231
|
+
extent: "ci";
|
|
232
|
+
level: number;
|
|
233
|
+
}
|
|
234
|
+
| {
|
|
235
|
+
center: "median";
|
|
236
|
+
extent: "iqr";
|
|
237
|
+
level?: never;
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
export type DatasetTransform =
|
|
241
|
+
| DatasetFilterTransform
|
|
242
|
+
| DatasetRegressionTransform
|
|
243
|
+
| DatasetDensityTransform
|
|
244
|
+
| DatasetIntervalTransform;
|
|
245
|
+
export interface CreateDerivedDataOptions {
|
|
246
|
+
id: string;
|
|
247
|
+
source: string;
|
|
248
|
+
transform: readonly [DatasetTransform, ...DatasetTransform[]];
|
|
249
|
+
}
|
|
72
250
|
export type MarkGraphicProperty =
|
|
73
251
|
| "x" | "y" | "width" | "height" | "radius"
|
|
74
252
|
| "x1" | "y1" | "x2" | "y2"
|
|
@@ -77,7 +255,7 @@ export type MarkSelector = {
|
|
|
77
255
|
grain?: "item" | "stack";
|
|
78
256
|
} & (
|
|
79
257
|
| { field: string; channel?: never; property?: never }
|
|
80
|
-
| { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "theta" | "radius" | "color" | "strokeDash" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
|
|
258
|
+
| { channel: "x" | "y" | "x2" | "y2" | "xOffset" | "yOffset" | "theta" | "radius" | "color" | "strokeDash" | "size" | "shape" | "group" | "opacity"; field?: never; property?: never }
|
|
81
259
|
| { property: MarkGraphicProperty; field?: never; channel?: never }
|
|
82
260
|
) & (
|
|
83
261
|
| { op: "eq" | "neq" | "gt" | "gte" | "lt" | "lte"; value: unknown }
|
|
@@ -207,11 +385,44 @@ export interface TraceNode {
|
|
|
207
385
|
readonly children: readonly TraceNode[];
|
|
208
386
|
}
|
|
209
387
|
|
|
388
|
+
export interface SemanticDataset {
|
|
389
|
+
readonly id: string;
|
|
390
|
+
readonly values?: readonly Readonly<Record<string, unknown>>[];
|
|
391
|
+
readonly source?: string;
|
|
392
|
+
readonly transform?: readonly Readonly<Record<string, unknown>>[];
|
|
393
|
+
readonly [key: string]: unknown;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface SemanticLayer {
|
|
397
|
+
readonly id: string;
|
|
398
|
+
readonly data?: string;
|
|
399
|
+
readonly source?: string;
|
|
400
|
+
readonly coordinate?: string;
|
|
401
|
+
readonly mark?: Readonly<{ type?: string; [key: string]: unknown }>;
|
|
402
|
+
readonly encoding?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
403
|
+
readonly [key: string]: unknown;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface SemanticScale {
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly type?: ScaleType;
|
|
409
|
+
readonly domain?: "auto" | readonly unknown[];
|
|
410
|
+
readonly range?: ScaleRange;
|
|
411
|
+
readonly [key: string]: unknown;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface SemanticCoordinate {
|
|
415
|
+
readonly id: string;
|
|
416
|
+
readonly type?: "cartesian" | "polar";
|
|
417
|
+
readonly layers?: readonly string[];
|
|
418
|
+
readonly [key: string]: unknown;
|
|
419
|
+
}
|
|
420
|
+
|
|
210
421
|
export interface SemanticSpec {
|
|
211
|
-
readonly datasets: readonly
|
|
212
|
-
readonly layers: readonly
|
|
213
|
-
readonly scales: readonly
|
|
214
|
-
readonly coordinates: readonly
|
|
422
|
+
readonly datasets: readonly SemanticDataset[];
|
|
423
|
+
readonly layers: readonly SemanticLayer[];
|
|
424
|
+
readonly scales: readonly SemanticScale[];
|
|
425
|
+
readonly coordinates: readonly SemanticCoordinate[];
|
|
215
426
|
readonly guides: Readonly<Record<string, unknown>>;
|
|
216
427
|
readonly title: Readonly<Record<string, unknown>>;
|
|
217
428
|
}
|
|
@@ -302,6 +513,8 @@ export interface CreateAxesOptions {
|
|
|
302
513
|
};
|
|
303
514
|
x?: false | CompleteAxisOptions<XAxisPosition>;
|
|
304
515
|
y?: false | CompleteAxisOptions<YAxisPosition>;
|
|
516
|
+
theta?: false | CompletePolarAxisOptions;
|
|
517
|
+
radius?: false | CompleteRadialAxisOptions;
|
|
305
518
|
}
|
|
306
519
|
export interface AxisTickOptions<P extends string>
|
|
307
520
|
extends AxisTickStyleOptions {
|
|
@@ -318,6 +531,58 @@ export interface AxisLabelOptions<P extends string>
|
|
|
318
531
|
values?: readonly AxisValue[];
|
|
319
532
|
}
|
|
320
533
|
|
|
534
|
+
export interface PolarGuideResourceOptions {
|
|
535
|
+
scale?: string;
|
|
536
|
+
coordinate?: string;
|
|
537
|
+
angle?: number;
|
|
538
|
+
}
|
|
539
|
+
export interface PolarTickOptions extends AxisTickStyleOptions {
|
|
540
|
+
count?: number;
|
|
541
|
+
values?: readonly AxisValue[];
|
|
542
|
+
}
|
|
543
|
+
export interface PolarLabelOptions extends AxisLabelStyleOptions {
|
|
544
|
+
count?: number;
|
|
545
|
+
values?: readonly AxisValue[];
|
|
546
|
+
}
|
|
547
|
+
export interface PolarTicksAndLabelsOptions {
|
|
548
|
+
count?: number;
|
|
549
|
+
values?: readonly AxisValue[];
|
|
550
|
+
ticks?: AxisTickStyleOptions;
|
|
551
|
+
labels?: AxisLabelStyleOptions;
|
|
552
|
+
}
|
|
553
|
+
export interface PolarTitleOptions {
|
|
554
|
+
text?: string;
|
|
555
|
+
offset?: number;
|
|
556
|
+
color?: string;
|
|
557
|
+
fontSize?: number;
|
|
558
|
+
fontFamily?: string;
|
|
559
|
+
fontWeight?: string | number;
|
|
560
|
+
}
|
|
561
|
+
export interface RadialTitleOptions extends PolarTitleOptions {
|
|
562
|
+
position?: "inside" | "outside";
|
|
563
|
+
}
|
|
564
|
+
export interface CompletePolarAxisOptions extends PolarGuideResourceOptions {
|
|
565
|
+
line?: AxisLineStyleOptions;
|
|
566
|
+
ticksAndLabels?: PolarTicksAndLabelsOptions;
|
|
567
|
+
title?: false | PolarTitleOptions;
|
|
568
|
+
}
|
|
569
|
+
export interface CompleteRadialAxisOptions
|
|
570
|
+
extends Omit<CompletePolarAxisOptions, "title"> {
|
|
571
|
+
title?: false | RadialTitleOptions;
|
|
572
|
+
}
|
|
573
|
+
export interface EditPolarAxisOptions {
|
|
574
|
+
angle?: number;
|
|
575
|
+
line?: AxisLineStyleOptions;
|
|
576
|
+
ticks?: PolarTickOptions;
|
|
577
|
+
labels?: PolarLabelOptions;
|
|
578
|
+
ticksAndLabels?: PolarTicksAndLabelsOptions;
|
|
579
|
+
title?: PolarTitleOptions;
|
|
580
|
+
}
|
|
581
|
+
export interface EditRadialAxisOptions
|
|
582
|
+
extends Omit<EditPolarAxisOptions, "title"> {
|
|
583
|
+
title?: RadialTitleOptions;
|
|
584
|
+
}
|
|
585
|
+
|
|
321
586
|
export interface GridDirectionOptions {
|
|
322
587
|
scale?: string;
|
|
323
588
|
coordinate?: string;
|
|
@@ -334,9 +599,45 @@ export interface EditGridOptions {
|
|
|
334
599
|
lineWidth?: number;
|
|
335
600
|
strokeDash?: readonly number[];
|
|
336
601
|
}
|
|
602
|
+
export interface EditGridDirectionsOptions {
|
|
603
|
+
horizontal?: EditGridOptions;
|
|
604
|
+
vertical?: EditGridOptions;
|
|
605
|
+
theta?: EditPolarGridOptions;
|
|
606
|
+
radial?: EditPolarGridOptions;
|
|
607
|
+
}
|
|
337
608
|
export interface CreateGridOptions {
|
|
338
609
|
horizontal?: boolean | GridDirectionOptions;
|
|
339
610
|
vertical?: boolean | GridDirectionOptions;
|
|
611
|
+
theta?: boolean | PolarGridOptions;
|
|
612
|
+
radial?: boolean | PolarGridOptions;
|
|
613
|
+
}
|
|
614
|
+
export interface PolarGridOptions {
|
|
615
|
+
scale?: string;
|
|
616
|
+
coordinate?: string;
|
|
617
|
+
count?: number;
|
|
618
|
+
values?: readonly AxisValue[];
|
|
619
|
+
color?: string;
|
|
620
|
+
lineWidth?: number;
|
|
621
|
+
strokeDash?: readonly number[];
|
|
622
|
+
}
|
|
623
|
+
export interface EditPolarGridOptions {
|
|
624
|
+
count?: number;
|
|
625
|
+
values?: readonly AxisValue[];
|
|
626
|
+
color?: string;
|
|
627
|
+
lineWidth?: number;
|
|
628
|
+
strokeDash?: readonly number[];
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export interface CreateGuidesOptions {
|
|
632
|
+
axes?: false | CreateAxesOptions;
|
|
633
|
+
grid?: false | CreateGridOptions;
|
|
634
|
+
legend?: false | LegendOptions;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export interface CreateCoordinateOptions {
|
|
638
|
+
id?: string;
|
|
639
|
+
type?: "cartesian" | "polar";
|
|
640
|
+
layers?: readonly string[];
|
|
340
641
|
}
|
|
341
642
|
|
|
342
643
|
export interface ScaleOptions {
|
|
@@ -360,6 +661,8 @@ export interface ScaleOptions {
|
|
|
360
661
|
unknown?: unknown;
|
|
361
662
|
}
|
|
362
663
|
|
|
664
|
+
export type CreateScaleOptions = ScaleOptions & { id: string };
|
|
665
|
+
|
|
363
666
|
export interface EditScaleOptions {
|
|
364
667
|
id?: string;
|
|
365
668
|
type?: ScaleType;
|
|
@@ -376,6 +679,7 @@ export interface EditScaleOptions {
|
|
|
376
679
|
paddingOuter?: number;
|
|
377
680
|
padding?: number;
|
|
378
681
|
align?: number;
|
|
682
|
+
palette?: Palette;
|
|
379
683
|
interpolate?: ContinuousColorInterpolation;
|
|
380
684
|
unknown?: unknown;
|
|
381
685
|
}
|
|
@@ -398,6 +702,54 @@ export interface PositionEncodingOptions {
|
|
|
398
702
|
stack?: StackMode;
|
|
399
703
|
}
|
|
400
704
|
|
|
705
|
+
export interface ThetaScaleOptions {
|
|
706
|
+
id?: string;
|
|
707
|
+
type?: "linear" | "time" | "band" | "point";
|
|
708
|
+
domain?: "auto" | readonly unknown[];
|
|
709
|
+
range?: "auto" | readonly [number, number];
|
|
710
|
+
nice?: boolean;
|
|
711
|
+
zero?: boolean;
|
|
712
|
+
clamp?: boolean;
|
|
713
|
+
reverse?: boolean;
|
|
714
|
+
paddingInner?: number;
|
|
715
|
+
paddingOuter?: number;
|
|
716
|
+
padding?: number;
|
|
717
|
+
align?: number;
|
|
718
|
+
unknown?: unknown;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export interface RadiusScaleOptions {
|
|
722
|
+
id?: string;
|
|
723
|
+
type?: "linear" | "log" | "pow" | "sqrt" | "symlog";
|
|
724
|
+
domain?: "auto" | readonly [number, number];
|
|
725
|
+
range?: "auto" | readonly [number, number];
|
|
726
|
+
nice?: boolean;
|
|
727
|
+
zero?: boolean;
|
|
728
|
+
clamp?: boolean;
|
|
729
|
+
reverse?: boolean;
|
|
730
|
+
base?: number;
|
|
731
|
+
exponent?: number;
|
|
732
|
+
constant?: number;
|
|
733
|
+
unknown?: unknown;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export interface ThetaEncodingOptions {
|
|
737
|
+
field: string;
|
|
738
|
+
target?: string;
|
|
739
|
+
fieldType?: FieldType;
|
|
740
|
+
scale?: ThetaScaleOptions;
|
|
741
|
+
coordinate?: string;
|
|
742
|
+
aggregate?: "count";
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export interface RadialEncodingOptions {
|
|
746
|
+
field: string;
|
|
747
|
+
target?: string;
|
|
748
|
+
fieldType?: "quantitative";
|
|
749
|
+
scale?: RadiusScaleOptions;
|
|
750
|
+
coordinate?: string;
|
|
751
|
+
}
|
|
752
|
+
|
|
401
753
|
type RulePositionValue =
|
|
402
754
|
| { field: string; datum?: never }
|
|
403
755
|
| { field?: never; datum: unknown };
|
|
@@ -415,7 +767,7 @@ export type SecondaryPositionEncodingOptions =
|
|
|
415
767
|
field: string;
|
|
416
768
|
datum?: never;
|
|
417
769
|
target?: string;
|
|
418
|
-
fieldType?: "quantitative";
|
|
770
|
+
fieldType?: "quantitative" | "temporal";
|
|
419
771
|
scale?: { id?: string };
|
|
420
772
|
coordinate?: string;
|
|
421
773
|
};
|
|
@@ -440,8 +792,9 @@ export type HistogramEncodingOptions = {
|
|
|
440
792
|
export interface CategoricalEncodingOptions {
|
|
441
793
|
field: string;
|
|
442
794
|
target?: string;
|
|
443
|
-
fieldType?: "nominal";
|
|
795
|
+
fieldType?: "nominal" | "ordinal";
|
|
444
796
|
scale?: ScaleOptions;
|
|
797
|
+
palette?: Palette;
|
|
445
798
|
layout?: ColorLayout;
|
|
446
799
|
}
|
|
447
800
|
|
|
@@ -528,6 +881,16 @@ export interface ErrorBarOptions {
|
|
|
528
881
|
opacity?: number;
|
|
529
882
|
}
|
|
530
883
|
|
|
884
|
+
export interface EditErrorBarOptions {
|
|
885
|
+
target?: string;
|
|
886
|
+
caps?: boolean;
|
|
887
|
+
capSize?: number;
|
|
888
|
+
stroke?: string;
|
|
889
|
+
strokeWidth?: number;
|
|
890
|
+
strokeDash?: DashStyle | DashPattern;
|
|
891
|
+
opacity?: number;
|
|
892
|
+
}
|
|
893
|
+
|
|
531
894
|
export interface BoxPlotCategoryChannel {
|
|
532
895
|
field: string;
|
|
533
896
|
fieldType: "nominal" | "ordinal" | "temporal";
|
|
@@ -575,6 +938,28 @@ export interface BoxPlotOptions {
|
|
|
575
938
|
};
|
|
576
939
|
}
|
|
577
940
|
|
|
941
|
+
export interface EditBoxPlotOptions {
|
|
942
|
+
target?: string;
|
|
943
|
+
whisker?: BoxPlotWhisker;
|
|
944
|
+
width?: { band?: number };
|
|
945
|
+
outliers?: boolean;
|
|
946
|
+
box?: {
|
|
947
|
+
fill?: string;
|
|
948
|
+
opacity?: number;
|
|
949
|
+
stroke?: string;
|
|
950
|
+
strokeWidth?: number;
|
|
951
|
+
};
|
|
952
|
+
median?: {
|
|
953
|
+
stroke?: string;
|
|
954
|
+
strokeWidth?: number;
|
|
955
|
+
};
|
|
956
|
+
outlier?: {
|
|
957
|
+
shape?: PointShape;
|
|
958
|
+
radius?: number;
|
|
959
|
+
opacity?: number;
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
|
|
578
963
|
export interface ErrorBandPositionChannel {
|
|
579
964
|
field?: string;
|
|
580
965
|
fieldType?: "quantitative" | "temporal";
|
|
@@ -620,6 +1005,23 @@ export interface ErrorBandOptions {
|
|
|
620
1005
|
};
|
|
621
1006
|
}
|
|
622
1007
|
|
|
1008
|
+
export interface EditErrorBandOptions {
|
|
1009
|
+
target?: string;
|
|
1010
|
+
fill?: string;
|
|
1011
|
+
opacity?: number;
|
|
1012
|
+
curve?: CurveInterpolation;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface EditErrorBandBoundaryOptions {
|
|
1016
|
+
target?: string;
|
|
1017
|
+
boundary?: "both" | "lower" | "upper";
|
|
1018
|
+
stroke?: string;
|
|
1019
|
+
strokeWidth?: number;
|
|
1020
|
+
strokeDash?: DashStyle | DashPattern;
|
|
1021
|
+
opacity?: number;
|
|
1022
|
+
curve?: CurveInterpolation;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
623
1025
|
export interface EditDensityOptions {
|
|
624
1026
|
target?: string;
|
|
625
1027
|
bandwidth?: "auto" | number;
|
|
@@ -636,15 +1038,61 @@ export interface OffsetScaleOptions {
|
|
|
636
1038
|
range?: "auto" | readonly [number, number];
|
|
637
1039
|
}
|
|
638
1040
|
|
|
639
|
-
export interface
|
|
1041
|
+
export interface OffsetEncodingOptions {
|
|
640
1042
|
field: string;
|
|
641
1043
|
target?: string;
|
|
642
|
-
fieldType?: "nominal";
|
|
1044
|
+
fieldType?: "nominal" | "ordinal";
|
|
643
1045
|
scale?: OffsetScaleOptions;
|
|
644
1046
|
paddingInner?: number;
|
|
645
1047
|
paddingOuter?: number;
|
|
646
1048
|
}
|
|
647
1049
|
|
|
1050
|
+
export interface XOffsetEncodingOptions extends OffsetEncodingOptions {}
|
|
1051
|
+
export interface YOffsetEncodingOptions extends OffsetEncodingOptions {}
|
|
1052
|
+
|
|
1053
|
+
export type TextFormat = "auto" | `.${number}f`;
|
|
1054
|
+
|
|
1055
|
+
export interface TextMarkOptions {
|
|
1056
|
+
id?: string;
|
|
1057
|
+
data?: string;
|
|
1058
|
+
text?: unknown;
|
|
1059
|
+
fill?: string;
|
|
1060
|
+
opacity?: number;
|
|
1061
|
+
fontSize?: number;
|
|
1062
|
+
fontFamily?: string;
|
|
1063
|
+
fontWeight?: string | number;
|
|
1064
|
+
align?: "left" | "right" | "center" | "start" | "end";
|
|
1065
|
+
baseline?: "top" | "hanging" | "middle" | "alphabetic" | "ideographic" | "bottom";
|
|
1066
|
+
rotation?: number;
|
|
1067
|
+
dx?: number;
|
|
1068
|
+
dy?: number;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
export interface EditTextMarkOptions extends Omit<TextMarkOptions, "id" | "data" | "text"> {
|
|
1072
|
+
target?: string;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export interface RectMarkOptions {
|
|
1076
|
+
id?: string;
|
|
1077
|
+
data?: string;
|
|
1078
|
+
fill?: string;
|
|
1079
|
+
opacity?: number;
|
|
1080
|
+
stroke?: string | false;
|
|
1081
|
+
strokeWidth?: number;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
export interface EditRectMarkOptions extends Omit<RectMarkOptions, "id" | "data"> {
|
|
1085
|
+
target?: string;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
export type TextEncodingOptions = {
|
|
1089
|
+
target?: string;
|
|
1090
|
+
format?: TextFormat;
|
|
1091
|
+
} & (
|
|
1092
|
+
| { field: string; value?: never }
|
|
1093
|
+
| { field?: never; value: unknown }
|
|
1094
|
+
);
|
|
1095
|
+
|
|
648
1096
|
export type BarWidthOptions = { target?: string } & (
|
|
649
1097
|
| { band?: number; pixels?: never }
|
|
650
1098
|
| { band?: never; pixels: number }
|
|
@@ -722,6 +1170,7 @@ export type ColorEncodingOptions =
|
|
|
722
1170
|
fieldType: "quantitative";
|
|
723
1171
|
aggregate?: AggregateOperation;
|
|
724
1172
|
scale?: ContinuousColorScaleOptions | DiscretizedColorScaleOptions;
|
|
1173
|
+
palette?: Palette;
|
|
725
1174
|
layout?: never;
|
|
726
1175
|
}
|
|
727
1176
|
| {
|
|
@@ -730,6 +1179,7 @@ export type ColorEncodingOptions =
|
|
|
730
1179
|
fieldType: "temporal";
|
|
731
1180
|
aggregate?: never;
|
|
732
1181
|
scale?: ContinuousColorScaleOptions;
|
|
1182
|
+
palette?: Palette;
|
|
733
1183
|
layout?: never;
|
|
734
1184
|
};
|
|
735
1185
|
|
|
@@ -765,6 +1215,37 @@ export interface RegressionBandOptions {
|
|
|
765
1215
|
curve?: CurveInterpolation;
|
|
766
1216
|
}
|
|
767
1217
|
|
|
1218
|
+
export interface CreateRegressionBandOptions {
|
|
1219
|
+
id: string;
|
|
1220
|
+
data: string;
|
|
1221
|
+
x: string;
|
|
1222
|
+
lower: string;
|
|
1223
|
+
upper: string;
|
|
1224
|
+
groupBy?: string;
|
|
1225
|
+
coordinate: string;
|
|
1226
|
+
xScale: string;
|
|
1227
|
+
yScale: string;
|
|
1228
|
+
color?: string;
|
|
1229
|
+
opacity?: number;
|
|
1230
|
+
stroke?: string;
|
|
1231
|
+
strokeWidth?: number;
|
|
1232
|
+
curve?: CurveInterpolation;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
export interface CreateRegressionLineOptions {
|
|
1236
|
+
id: string;
|
|
1237
|
+
data: string;
|
|
1238
|
+
x: string;
|
|
1239
|
+
y: string;
|
|
1240
|
+
groupBy?: string;
|
|
1241
|
+
coordinate: string;
|
|
1242
|
+
xScale: string;
|
|
1243
|
+
yScale: string;
|
|
1244
|
+
colorScale?: string;
|
|
1245
|
+
strokeWidth?: number;
|
|
1246
|
+
curve?: CurveInterpolation;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
768
1249
|
type RegressionParameterOptions =
|
|
769
1250
|
| {
|
|
770
1251
|
method?: "linear";
|
|
@@ -816,6 +1297,37 @@ export type RegressionOptions = RegressionCommonOptions & (
|
|
|
816
1297
|
})
|
|
817
1298
|
);
|
|
818
1299
|
|
|
1300
|
+
export interface EditRegressionOptions {
|
|
1301
|
+
target?: string;
|
|
1302
|
+
method?: RegressionMethod;
|
|
1303
|
+
degree?: number;
|
|
1304
|
+
span?: number;
|
|
1305
|
+
confidence?: number;
|
|
1306
|
+
interval?: RegressionInterval;
|
|
1307
|
+
band?: false | RegressionBandOptions;
|
|
1308
|
+
line?: { strokeWidth?: number; curve?: CurveInterpolation };
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
export interface RemoveAxisOptions {
|
|
1312
|
+
coordinate?: string;
|
|
1313
|
+
scale?: string;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export interface RemoveGridOptions {
|
|
1317
|
+
horizontal?: boolean;
|
|
1318
|
+
vertical?: boolean;
|
|
1319
|
+
theta?: boolean;
|
|
1320
|
+
radial?: boolean;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
export interface RemoveLegendOptions {
|
|
1324
|
+
target?: string;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
export interface RemoveMarkOptions {
|
|
1328
|
+
target?: string;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
819
1331
|
export interface LegendTextOptions {
|
|
820
1332
|
offset?: number;
|
|
821
1333
|
color?: string;
|
|
@@ -864,7 +1376,7 @@ export interface LegendBorderOptions {
|
|
|
864
1376
|
|
|
865
1377
|
export interface LegendOptions {
|
|
866
1378
|
target?: string;
|
|
867
|
-
channels?: readonly ("color" | "strokeDash" | "shape" | "opacity")[];
|
|
1379
|
+
channels?: readonly ("color" | "strokeDash" | "shape" | "size" | "opacity")[];
|
|
868
1380
|
position?: "right" | "left" | "bottom" | "top";
|
|
869
1381
|
align?: "left" | "center" | "right";
|
|
870
1382
|
direction?: "horizontal" | "vertical";
|
|
@@ -886,6 +1398,47 @@ export interface EditLegendOptions
|
|
|
886
1398
|
title?: string | "auto" | false;
|
|
887
1399
|
}
|
|
888
1400
|
|
|
1401
|
+
export interface EditLegendLayoutOptions {
|
|
1402
|
+
target?: string;
|
|
1403
|
+
position?: "right" | "left" | "bottom" | "top";
|
|
1404
|
+
align?: "left" | "center" | "right";
|
|
1405
|
+
direction?: "horizontal" | "vertical";
|
|
1406
|
+
columns?: number;
|
|
1407
|
+
offset?: number;
|
|
1408
|
+
titlePosition?: "top" | "left";
|
|
1409
|
+
itemGap?: number;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
export interface EditLegendLabelsOptions extends LegendTitleStyleOptions {
|
|
1413
|
+
target?: string;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
export interface EditLegendTitleOptions extends LegendTitleStyleOptions {
|
|
1417
|
+
target?: string;
|
|
1418
|
+
title?: string | "auto" | false;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
export interface EditLegendSymbolsOptions {
|
|
1422
|
+
target?: string;
|
|
1423
|
+
symbol?: LegendSymbolRecipe;
|
|
1424
|
+
count?: number;
|
|
1425
|
+
gradient?: { length?: number; thickness?: number };
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
export interface EditLegendBorderOptions {
|
|
1429
|
+
target?: string;
|
|
1430
|
+
border: boolean | LegendBorderOptions;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
export interface EditAxisOptions<P extends string> {
|
|
1434
|
+
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">;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
889
1442
|
export interface TitleTextStyleOptions {
|
|
890
1443
|
color?: string;
|
|
891
1444
|
fontSize?: number;
|
|
@@ -919,6 +1472,8 @@ export class ChartProgram {
|
|
|
919
1472
|
readonly graphicSpec: GraphicSpec;
|
|
920
1473
|
readonly resolvedScales: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
921
1474
|
readonly materializationConfigs: Readonly<Record<string, unknown>>;
|
|
1475
|
+
readonly children: Readonly<Record<string, ChartProgram>>;
|
|
1476
|
+
readonly compositionSpec?: CompositionSpec;
|
|
922
1477
|
readonly context: Readonly<Record<string, unknown>>;
|
|
923
1478
|
readonly trace: TraceNode;
|
|
924
1479
|
readonly actionStack: readonly unknown[];
|
|
@@ -934,7 +1489,15 @@ export class ChartProgram {
|
|
|
934
1489
|
createRegressionData(options: RegressionDataOptions): ChartProgram;
|
|
935
1490
|
createIntervalData(options: IntervalDataOptions): ChartProgram;
|
|
936
1491
|
|
|
937
|
-
createPointMark(options?: {
|
|
1492
|
+
createPointMark(options?: {
|
|
1493
|
+
id?: string;
|
|
1494
|
+
data?: string;
|
|
1495
|
+
shape?: PointShape;
|
|
1496
|
+
fill?: string;
|
|
1497
|
+
opacity?: number;
|
|
1498
|
+
stroke?: string;
|
|
1499
|
+
strokeWidth?: number;
|
|
1500
|
+
}): ChartProgram;
|
|
938
1501
|
editPointMark(options: {
|
|
939
1502
|
target?: string;
|
|
940
1503
|
shape?: PointShape;
|
|
@@ -948,13 +1511,26 @@ export class ChartProgram {
|
|
|
948
1511
|
data?: string;
|
|
949
1512
|
strokeWidth?: number;
|
|
950
1513
|
curve?: CurveInterpolation;
|
|
1514
|
+
stroke?: string;
|
|
1515
|
+
opacity?: number;
|
|
1516
|
+
closed?: boolean;
|
|
951
1517
|
}): ChartProgram;
|
|
952
1518
|
editLineMark(options: {
|
|
953
1519
|
target?: string;
|
|
954
1520
|
strokeWidth?: number;
|
|
955
1521
|
curve?: CurveInterpolation;
|
|
1522
|
+
stroke?: string;
|
|
1523
|
+
opacity?: number;
|
|
1524
|
+
closed?: boolean;
|
|
1525
|
+
}): ChartProgram;
|
|
1526
|
+
createBarMark(options?: {
|
|
1527
|
+
id?: string;
|
|
1528
|
+
data?: string;
|
|
1529
|
+
fill?: string;
|
|
1530
|
+
opacity?: number;
|
|
1531
|
+
stroke?: string;
|
|
1532
|
+
strokeWidth?: number;
|
|
956
1533
|
}): ChartProgram;
|
|
957
|
-
createBarMark(options?: { id?: string; data?: string }): ChartProgram;
|
|
958
1534
|
editBarMark(options: {
|
|
959
1535
|
target?: string;
|
|
960
1536
|
fill?: string;
|
|
@@ -971,7 +1547,30 @@ export class ChartProgram {
|
|
|
971
1547
|
strokeWidth?: number;
|
|
972
1548
|
curve?: CurveInterpolation;
|
|
973
1549
|
}): ChartProgram;
|
|
1550
|
+
createArcMark(options?: {
|
|
1551
|
+
id?: string;
|
|
1552
|
+
data?: string;
|
|
1553
|
+
innerRadius?: number;
|
|
1554
|
+
padAngle?: number;
|
|
1555
|
+
fill?: string;
|
|
1556
|
+
opacity?: number;
|
|
1557
|
+
stroke?: string;
|
|
1558
|
+
strokeWidth?: number;
|
|
1559
|
+
}): ChartProgram;
|
|
1560
|
+
editArcMark(options: {
|
|
1561
|
+
target?: string;
|
|
1562
|
+
innerRadius?: number;
|
|
1563
|
+
padAngle?: number;
|
|
1564
|
+
fill?: string;
|
|
1565
|
+
opacity?: number;
|
|
1566
|
+
stroke?: string;
|
|
1567
|
+
strokeWidth?: number;
|
|
1568
|
+
}): ChartProgram;
|
|
1569
|
+
createRectMark(options?: RectMarkOptions): ChartProgram;
|
|
1570
|
+
editRectMark(options: EditRectMarkOptions): ChartProgram;
|
|
974
1571
|
createRuleMark(options?: { id?: string; data?: string }): ChartProgram;
|
|
1572
|
+
createTextMark(options?: TextMarkOptions): ChartProgram;
|
|
1573
|
+
editTextMark(options: EditTextMarkOptions): ChartProgram;
|
|
975
1574
|
editAreaMark(options: {
|
|
976
1575
|
target?: string;
|
|
977
1576
|
fill?: string;
|
|
@@ -983,6 +1582,8 @@ export class ChartProgram {
|
|
|
983
1582
|
|
|
984
1583
|
encodeX(options: PositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
|
|
985
1584
|
encodeY(options: PositionEncodingOptions | RulePositionEncodingOptions): ChartProgram;
|
|
1585
|
+
encodeTheta(options: ThetaEncodingOptions): ChartProgram;
|
|
1586
|
+
encodeR(options: RadialEncodingOptions): ChartProgram;
|
|
986
1587
|
encodeX2(options: SecondaryPositionEncodingOptions): ChartProgram;
|
|
987
1588
|
encodeColor(options: ColorEncodingOptions): ChartProgram;
|
|
988
1589
|
encodeStrokeDash(options: StrokeDashEncodingOptions): ChartProgram;
|
|
@@ -990,7 +1591,9 @@ export class ChartProgram {
|
|
|
990
1591
|
encodeShape(options: { field: string; target?: string; fieldType?: "nominal"; scale?: ScaleOptions }): ChartProgram;
|
|
991
1592
|
encodeOpacity(options: OpacityEncodingOptions): ChartProgram;
|
|
992
1593
|
encodeRadius(options: { value: number; target?: string }): ChartProgram;
|
|
1594
|
+
encodePointRadius(options: { value: number; target?: string }): ChartProgram;
|
|
993
1595
|
encodeXOffset(options: XOffsetEncodingOptions): ChartProgram;
|
|
1596
|
+
encodeYOffset(options: YOffsetEncodingOptions): ChartProgram;
|
|
994
1597
|
encodeY2(options: SecondaryPositionEncodingOptions): ChartProgram;
|
|
995
1598
|
encodeYRange(options: {
|
|
996
1599
|
lower: string;
|
|
@@ -1009,6 +1612,7 @@ export class ChartProgram {
|
|
|
1009
1612
|
scale?: ScaleOptions;
|
|
1010
1613
|
}): ChartProgram;
|
|
1011
1614
|
encodeGroup(options: { field: string; target?: string; fieldType?: "nominal" }): ChartProgram;
|
|
1615
|
+
encodeText(options: TextEncodingOptions): ChartProgram;
|
|
1012
1616
|
encodeHistogram(options: HistogramEncodingOptions): ChartProgram;
|
|
1013
1617
|
encodeDensity(options: DensityEncodingOptions): ChartProgram;
|
|
1014
1618
|
editDensity(options: EditDensityOptions): ChartProgram;
|
|
@@ -1017,12 +1621,28 @@ export class ChartProgram {
|
|
|
1017
1621
|
encodeStrokeWidth(options: { target?: string; value: number }): ChartProgram;
|
|
1018
1622
|
|
|
1019
1623
|
createRegression(options?: RegressionOptions): ChartProgram;
|
|
1624
|
+
editRegression(options: EditRegressionOptions): ChartProgram;
|
|
1020
1625
|
createErrorBar(options?: ErrorBarOptions): ChartProgram;
|
|
1626
|
+
editErrorBar(options: EditErrorBarOptions): ChartProgram;
|
|
1021
1627
|
createErrorBand(options?: ErrorBandOptions): ChartProgram;
|
|
1628
|
+
editErrorBand(options: EditErrorBandOptions): ChartProgram;
|
|
1629
|
+
editErrorBandBoundary(options: EditErrorBandBoundaryOptions): ChartProgram;
|
|
1022
1630
|
createBoxPlot(options?: BoxPlotOptions): ChartProgram;
|
|
1631
|
+
editBoxPlot(options: EditBoxPlotOptions): ChartProgram;
|
|
1632
|
+
removeMark(options?: RemoveMarkOptions): ChartProgram;
|
|
1023
1633
|
createAxes(options?: CreateAxesOptions): ChartProgram;
|
|
1024
1634
|
createXAxis(options?: CompleteAxisOptions<XAxisPosition>): ChartProgram;
|
|
1025
1635
|
createYAxis(options?: CompleteAxisOptions<YAxisPosition>): ChartProgram;
|
|
1636
|
+
createThetaAxis(options?: CompletePolarAxisOptions): ChartProgram;
|
|
1637
|
+
createRadialAxis(options?: CompleteRadialAxisOptions): ChartProgram;
|
|
1638
|
+
editThetaAxisLine(options?: AxisLineStyleOptions): ChartProgram;
|
|
1639
|
+
editRadialAxisLine(options?: AxisLineStyleOptions): ChartProgram;
|
|
1640
|
+
editThetaAxisTicks(options?: PolarTickOptions): ChartProgram;
|
|
1641
|
+
editRadialAxisTicks(options?: PolarTickOptions): ChartProgram;
|
|
1642
|
+
editThetaAxisLabels(options?: PolarLabelOptions): ChartProgram;
|
|
1643
|
+
editRadialAxisLabels(options?: PolarLabelOptions): ChartProgram;
|
|
1644
|
+
editThetaAxisTitle(options?: PolarTitleOptions): ChartProgram;
|
|
1645
|
+
editRadialAxisTitle(options?: RadialTitleOptions): ChartProgram;
|
|
1026
1646
|
createXAxisLine(options?: AxisLineStyleOptions & { scale?: string; position?: XAxisPosition }): ChartProgram;
|
|
1027
1647
|
createYAxisLine(options?: AxisLineStyleOptions & { scale?: string; position?: YAxisPosition }): ChartProgram;
|
|
1028
1648
|
editXAxisLine(options?: AxisLineStyleOptions & { position?: XAxisPosition }): ChartProgram;
|
|
@@ -1043,27 +1663,43 @@ export class ChartProgram {
|
|
|
1043
1663
|
createYAxisTitle(options?: AxisTitleOptions<YAxisPosition>): ChartProgram;
|
|
1044
1664
|
editXAxisTitle(options?: Omit<AxisTitleOptions<XAxisPosition>, "scale">): ChartProgram;
|
|
1045
1665
|
editYAxisTitle(options?: Omit<AxisTitleOptions<YAxisPosition>, "scale">): ChartProgram;
|
|
1666
|
+
editXAxis(options: EditAxisOptions<XAxisPosition>): ChartProgram;
|
|
1667
|
+
editYAxis(options: EditAxisOptions<YAxisPosition>): ChartProgram;
|
|
1668
|
+
editThetaAxis(options: Omit<EditPolarAxisOptions, "angle">): ChartProgram;
|
|
1669
|
+
editRadialAxis(options: EditRadialAxisOptions): ChartProgram;
|
|
1670
|
+
removeXAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
1671
|
+
removeYAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
1672
|
+
removeThetaAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
1673
|
+
removeRadialAxis(options?: RemoveAxisOptions): ChartProgram;
|
|
1046
1674
|
createGrid(options?: CreateGridOptions): ChartProgram;
|
|
1047
1675
|
createHorizontalGrid(options?: GridDirectionOptions): ChartProgram;
|
|
1048
1676
|
createVerticalGrid(options?: GridDirectionOptions): ChartProgram;
|
|
1677
|
+
createThetaGrid(options?: PolarGridOptions): ChartProgram;
|
|
1678
|
+
createRadialGrid(options?: PolarGridOptions): ChartProgram;
|
|
1049
1679
|
editHorizontalGrid(options: EditGridOptions): ChartProgram;
|
|
1050
1680
|
editVerticalGrid(options: EditGridOptions): ChartProgram;
|
|
1681
|
+
editThetaGrid(options: EditPolarGridOptions): ChartProgram;
|
|
1682
|
+
editRadialGrid(options: EditPolarGridOptions): ChartProgram;
|
|
1683
|
+
editGrid(options: EditGridDirectionsOptions): ChartProgram;
|
|
1684
|
+
removeGrid(options?: RemoveGridOptions): ChartProgram;
|
|
1051
1685
|
createLegend(options?: LegendOptions): ChartProgram;
|
|
1052
1686
|
editLegend(options: EditLegendOptions): ChartProgram;
|
|
1053
|
-
|
|
1687
|
+
editLegendLayout(options: EditLegendLayoutOptions): ChartProgram;
|
|
1688
|
+
editLegendLabels(options: EditLegendLabelsOptions): ChartProgram;
|
|
1689
|
+
editLegendTitle(options: EditLegendTitleOptions): ChartProgram;
|
|
1690
|
+
editLegendSymbols(options: EditLegendSymbolsOptions): ChartProgram;
|
|
1691
|
+
editLegendBorder(options: EditLegendBorderOptions): ChartProgram;
|
|
1692
|
+
removeLegend(options?: RemoveLegendOptions): ChartProgram;
|
|
1693
|
+
createGuides(options?: CreateGuidesOptions): ChartProgram;
|
|
1054
1694
|
createTitle(options: TitleOptions): ChartProgram;
|
|
1055
1695
|
editTitle(options: EditTitleOptions): ChartProgram;
|
|
1696
|
+
removeTitle(): ChartProgram;
|
|
1056
1697
|
|
|
1057
|
-
createCoordinate(options?:
|
|
1058
|
-
createScale(options:
|
|
1698
|
+
createCoordinate(options?: CreateCoordinateOptions): ChartProgram;
|
|
1699
|
+
createScale(options: CreateScaleOptions): ChartProgram;
|
|
1059
1700
|
editScale(options: EditScaleOptions): ChartProgram;
|
|
1060
|
-
createDerivedData(options:
|
|
1061
|
-
createRegressionBand(options:
|
|
1062
|
-
id: string;
|
|
1063
|
-
stroke?: string;
|
|
1064
|
-
strokeWidth?: number;
|
|
1065
|
-
curve?: CurveInterpolation;
|
|
1066
|
-
}): ChartProgram;
|
|
1701
|
+
createDerivedData(options: CreateDerivedDataOptions): ChartProgram;
|
|
1702
|
+
createRegressionBand(options: CreateRegressionBandOptions): ChartProgram;
|
|
1067
1703
|
editRegressionBand(options: {
|
|
1068
1704
|
target?: string;
|
|
1069
1705
|
color?: string;
|
|
@@ -1072,17 +1708,18 @@ export class ChartProgram {
|
|
|
1072
1708
|
strokeWidth?: number;
|
|
1073
1709
|
curve?: CurveInterpolation;
|
|
1074
1710
|
}): ChartProgram;
|
|
1075
|
-
createRegressionLine(options:
|
|
1076
|
-
id: string;
|
|
1077
|
-
strokeWidth?: number;
|
|
1078
|
-
curve?: CurveInterpolation;
|
|
1079
|
-
}): ChartProgram;
|
|
1711
|
+
createRegressionLine(options: CreateRegressionLineOptions): ChartProgram;
|
|
1080
1712
|
editRegressionLine(options: {
|
|
1081
1713
|
target?: string;
|
|
1082
1714
|
strokeWidth?: number;
|
|
1083
1715
|
curve?: CurveInterpolation;
|
|
1084
1716
|
}): ChartProgram;
|
|
1085
1717
|
|
|
1718
|
+
editCompositionLayout(options: EditCompositionLayoutOptions): ChartProgram;
|
|
1719
|
+
replaceCompositionChild(options: ReplaceCompositionChildOptions): ChartProgram;
|
|
1720
|
+
facet(options: FacetOptions): ChartProgram;
|
|
1721
|
+
editFacetHeaders(options: EditFacetHeadersOptions): ChartProgram;
|
|
1722
|
+
|
|
1086
1723
|
editSemantic(options: EditSemanticOptions): ChartProgram;
|
|
1087
1724
|
createGraphics(options: {
|
|
1088
1725
|
id: string;
|