ggaction 0.0.2 → 0.0.4
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 -2
- package/README.md +95 -72
- package/package.json +15 -5
- 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/data/regression.js +1 -1
- package/src/actions/encodings/appearance.js +12 -1
- package/src/actions/encodings/barWidth.js +5 -3
- package/src/actions/encodings/color/continuous.js +137 -0
- package/src/actions/encodings/color/index.js +151 -0
- package/src/actions/encodings/color/layout.js +91 -0
- package/src/actions/encodings/color/policy.js +88 -0
- package/src/actions/encodings/index.js +4 -2
- package/src/actions/encodings/offset.js +91 -73
- package/src/actions/encodings/position/apply.js +66 -0
- package/src/actions/encodings/position/index.js +130 -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 +58 -9
- package/src/actions/encodings/ranged.js +30 -8
- package/src/actions/encodings/shared.js +17 -21
- package/src/actions/encodings/strokeDash.js +1 -1
- 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 +22 -19
- 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 +10 -5
- package/src/actions/guides/axes/titles.js +8 -6
- package/src/actions/guides/grids/grid.js +144 -15
- package/src/actions/guides/grids/resolve.js +6 -14
- 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 +7 -3
- 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 +6 -6
- package/src/actions/guides/legends/continuous/opacity.js +1 -1
- package/src/actions/guides/legends/edit.js +4 -26
- 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 +46 -0
- package/src/actions/guides/legends/size.js +13 -15
- package/src/actions/guides/legends/target.js +25 -0
- package/src/actions/guides/polar/axes/facade.js +219 -0
- package/src/actions/guides/polar/axes/index.js +55 -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/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/guides/tickValues.js +1 -1
- package/src/actions/index.js +4 -0
- package/src/actions/intervals/resolve.js +1 -1
- 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/edit.js +1 -1
- 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 +26 -4
- package/src/actions/regression/components.js +2 -2
- package/src/actions/regression/create.js +19 -2
- 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/common.js +91 -0
- package/src/actions/scales/consumers/families.js +47 -0
- package/src/actions/scales/consumers/index.js +41 -0
- package/src/actions/scales/{consumers.js → consumers/seriesLayout.js} +14 -127
- package/src/actions/scales/create.js +1 -1
- package/src/actions/scales/definitions.js +15 -6
- package/src/actions/scales/edit.js +45 -22
- package/src/actions/scales/materialize.js +58 -409
- 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 +49 -65
- package/src/core/action.js +10 -0
- package/src/core/compositionState.js +169 -0
- package/src/core/materializationState.js +65 -0
- package/src/core/programState.js +28 -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/areaSeries.js +1 -1
- package/src/grammar/bars/aggregate.js +3 -3
- 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 +21 -2
- package/src/grammar/facets/dependencies.js +185 -0
- package/src/grammar/facets/guides.js +257 -0
- package/src/grammar/facets/index.js +122 -0
- package/src/grammar/facets/scales.js +254 -0
- package/src/grammar/interval.js +2 -96
- package/src/grammar/lineSeries.js +112 -4
- package/src/grammar/palettes.js +5 -7
- 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/regression/derive.js +97 -0
- package/src/grammar/regression/index.js +22 -0
- package/src/grammar/regression/models.js +282 -0
- package/src/grammar/regression/parameters.js +106 -0
- package/src/grammar/rules.js +1 -1
- package/src/grammar/scales/color.js +4 -2
- 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/statistics/studentT.js +98 -0
- package/src/grammar/text.js +71 -0
- package/src/grammar/ticks.js +50 -13
- package/src/grammar/transforms.js +1 -1
- 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 +6 -3
- package/src/materialization/bars/grouped.js +75 -37
- package/src/materialization/bars/histogram.js +1 -1
- package/src/materialization/bars/ranged.js +1 -1
- package/src/materialization/composition.js +152 -0
- package/src/materialization/compositionSnapshot.js +114 -0
- package/src/materialization/density.js +1 -1
- package/src/materialization/dependencies.js +47 -73
- package/src/materialization/encodings.js +14 -28
- package/src/materialization/facetGuides/index.js +2 -0
- package/src/materialization/facetGuides/legacyCategorical.js +125 -0
- package/src/materialization/facetGuides/placement.js +126 -0
- package/src/materialization/facetGuides/preparation.js +188 -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/capabilities.js +141 -0
- package/src/materialization/marks/index.js +105 -0
- package/src/materialization/marks/policies.js +87 -0
- 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/scaleGuideDependencies.js +94 -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 +25 -17
- package/src/materialization/text.js +156 -0
- package/src/renderers/canvas/index.js +68 -22
- package/src/renderers/canvas/text.js +14 -1
- package/types/extension.d.ts +5 -1
- package/types/index.d.ts +56 -1
- package/types/program.d.ts +664 -27
- package/src/actions/encodings/color.js +0 -329
- package/src/actions/encodings/position.js +0 -176
- package/src/actions/marks/line.js +0 -248
- package/src/grammar/regression.js +0 -578
- package/src/grammar/scales.js +0 -1
- package/src/materialization/marks.js +0 -110
- package/src/materialization/selection/items.js +0 -503
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { action } from "../../../core/action.js";
|
|
2
2
|
import { isPlainObject } from "../../../core/immutable.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
noOptions,
|
|
5
|
+
validateKeys,
|
|
6
|
+
validateOptionObject
|
|
7
|
+
} from "../../../core/validation.js";
|
|
4
8
|
import {
|
|
5
9
|
gridNames,
|
|
6
10
|
editGridConfig,
|
|
@@ -11,8 +15,29 @@ import {
|
|
|
11
15
|
validateGridCreateArgs,
|
|
12
16
|
validateGridEditArgs
|
|
13
17
|
} from "./resolve.js";
|
|
18
|
+
import { polarGuideNames } from "../polar/resolve.js";
|
|
19
|
+
import { resolveAutomaticGridOptions } from "../applicability.js";
|
|
14
20
|
|
|
15
|
-
const
|
|
21
|
+
const CARTESIAN_OPTIONS = Object.freeze(["horizontal", "vertical"]);
|
|
22
|
+
const POLAR_OPTIONS = Object.freeze(["theta", "radial"]);
|
|
23
|
+
const AGGREGATE_OPTIONS = Object.freeze([
|
|
24
|
+
...CARTESIAN_OPTIONS,
|
|
25
|
+
...POLAR_OPTIONS
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
function removeDirection(program, direction) {
|
|
29
|
+
const graphic = POLAR_OPTIONS.includes(direction)
|
|
30
|
+
? polarGuideNames(direction).grid
|
|
31
|
+
: gridNames(direction).graphic;
|
|
32
|
+
let next = program.editSemantic({
|
|
33
|
+
property: `guide.grid.${direction}`,
|
|
34
|
+
remove: true
|
|
35
|
+
});
|
|
36
|
+
if (next.graphicSpec.objects[graphic] !== undefined) {
|
|
37
|
+
next = next.editGraphics({ target: graphic, remove: true });
|
|
38
|
+
}
|
|
39
|
+
return next._withoutMaterializationConfig(["guides", "grid", direction]);
|
|
40
|
+
}
|
|
16
41
|
|
|
17
42
|
function makeRematerialize(direction) {
|
|
18
43
|
const operation = gridNames(direction);
|
|
@@ -22,9 +47,7 @@ function makeRematerialize(direction) {
|
|
|
22
47
|
description: `Recompute concrete ${direction} grid lines.`
|
|
23
48
|
},
|
|
24
49
|
function (args = {}) {
|
|
25
|
-
|
|
26
|
-
throw new TypeError(`${operation.rematerialize} does not accept options.`);
|
|
27
|
-
}
|
|
50
|
+
noOptions(args, operation.rematerialize);
|
|
28
51
|
const storedConfig = this.guideConfigs.grid?.[direction];
|
|
29
52
|
const semantic = this.semanticSpec.guides.grid?.[direction];
|
|
30
53
|
if (
|
|
@@ -160,21 +183,76 @@ const createVerticalGrid = makeCreate("vertical");
|
|
|
160
183
|
const editHorizontalGrid = makeEdit("horizontal");
|
|
161
184
|
const editVerticalGrid = makeEdit("vertical");
|
|
162
185
|
|
|
186
|
+
const editGrid = action(
|
|
187
|
+
{
|
|
188
|
+
op: "editGrid",
|
|
189
|
+
description: "Edit selected existing Cartesian grid directions."
|
|
190
|
+
},
|
|
191
|
+
function (args = {}) {
|
|
192
|
+
validateOptionObject(args, AGGREGATE_OPTIONS, "editGrid", {
|
|
193
|
+
allowEmpty: false,
|
|
194
|
+
emptyMessage: "editGrid requires horizontal or vertical changes.",
|
|
195
|
+
emptyError: Error
|
|
196
|
+
});
|
|
197
|
+
for (const direction of AGGREGATE_OPTIONS) {
|
|
198
|
+
if (!Object.hasOwn(args, direction)) continue;
|
|
199
|
+
if (!isPlainObject(args[direction])) {
|
|
200
|
+
throw new TypeError(`editGrid ${direction} must be a plain object.`);
|
|
201
|
+
}
|
|
202
|
+
validateGridEditArgs(
|
|
203
|
+
args[direction],
|
|
204
|
+
`edit${direction === "horizontal" ? "Horizontal" : "Vertical"}Grid`
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
let next = this;
|
|
208
|
+
if (args.horizontal !== undefined) {
|
|
209
|
+
next = next.editHorizontalGrid(args.horizontal);
|
|
210
|
+
}
|
|
211
|
+
if (args.vertical !== undefined) {
|
|
212
|
+
next = next.editVerticalGrid(args.vertical);
|
|
213
|
+
}
|
|
214
|
+
if (args.theta !== undefined) next = next.editThetaGrid(args.theta);
|
|
215
|
+
if (args.radial !== undefined) next = next.editRadialGrid(args.radial);
|
|
216
|
+
return next;
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
|
|
163
220
|
const createGrid = action(
|
|
164
221
|
{
|
|
165
222
|
op: "createGrid",
|
|
166
223
|
description: "Create selected Cartesian grid directions."
|
|
167
224
|
},
|
|
168
225
|
function (args = {}) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
226
|
+
validateOptionObject(args, AGGREGATE_OPTIONS, "createGrid");
|
|
227
|
+
const automatic = Object.keys(args).length === 0
|
|
228
|
+
? resolveAutomaticGridOptions(this)
|
|
229
|
+
: undefined;
|
|
230
|
+
const hasExplicitPolar = Object.hasOwn(args, "theta") ||
|
|
231
|
+
Object.hasOwn(args, "radial");
|
|
232
|
+
const polarDefault = automatic !== undefined &&
|
|
233
|
+
(Object.hasOwn(automatic, "theta") || Object.hasOwn(automatic, "radial"));
|
|
234
|
+
const horizontal = automatic !== undefined
|
|
235
|
+
? automatic.horizontal === false ? undefined : automatic.horizontal
|
|
236
|
+
: polarDefault ||
|
|
237
|
+
(hasExplicitPolar && args.horizontal === undefined)
|
|
238
|
+
? undefined
|
|
239
|
+
: normalizeDirection(args.horizontal, "horizontal");
|
|
240
|
+
const vertical = automatic !== undefined
|
|
241
|
+
? automatic.vertical === false ? undefined : automatic.vertical
|
|
242
|
+
: args.vertical === undefined
|
|
175
243
|
? undefined
|
|
176
244
|
: normalizeDirection(args.vertical, "vertical");
|
|
177
|
-
|
|
245
|
+
const theta = automatic !== undefined
|
|
246
|
+
? automatic.theta
|
|
247
|
+
: args.theta === undefined
|
|
248
|
+
? undefined
|
|
249
|
+
: normalizeDirection(args.theta, "theta");
|
|
250
|
+
const radial = automatic !== undefined
|
|
251
|
+
? automatic.radial
|
|
252
|
+
: args.radial === undefined
|
|
253
|
+
? undefined
|
|
254
|
+
: normalizeDirection(args.radial, "radial");
|
|
255
|
+
if ([horizontal, vertical, theta, radial].every(value => value === undefined)) {
|
|
178
256
|
throw new Error("createGrid requires at least one selected direction.");
|
|
179
257
|
}
|
|
180
258
|
|
|
@@ -185,6 +263,8 @@ const createGrid = action(
|
|
|
185
263
|
if (vertical !== undefined) {
|
|
186
264
|
next = next.createVerticalGrid(vertical);
|
|
187
265
|
}
|
|
266
|
+
if (radial !== undefined) next = next.createRadialGrid(radial);
|
|
267
|
+
if (theta !== undefined) next = next.createThetaGrid(theta);
|
|
188
268
|
return next;
|
|
189
269
|
}
|
|
190
270
|
);
|
|
@@ -195,9 +275,7 @@ const rematerializeGrid = action(
|
|
|
195
275
|
description: "Recompute every existing grid direction."
|
|
196
276
|
},
|
|
197
277
|
function (args = {}) {
|
|
198
|
-
|
|
199
|
-
throw new TypeError("rematerializeGrid does not accept options.");
|
|
200
|
-
}
|
|
278
|
+
noOptions(args, "rematerializeGrid");
|
|
201
279
|
let next = this;
|
|
202
280
|
let count = 0;
|
|
203
281
|
if (this.guideConfigs.grid?.horizontal !== undefined) {
|
|
@@ -208,6 +286,14 @@ const rematerializeGrid = action(
|
|
|
208
286
|
next = next.rematerializeVerticalGrid();
|
|
209
287
|
count += 1;
|
|
210
288
|
}
|
|
289
|
+
if (this.guideConfigs.grid?.theta !== undefined) {
|
|
290
|
+
next = next.rematerializeThetaGrid();
|
|
291
|
+
count += 1;
|
|
292
|
+
}
|
|
293
|
+
if (this.guideConfigs.grid?.radial !== undefined) {
|
|
294
|
+
next = next.rematerializeRadialGrid();
|
|
295
|
+
count += 1;
|
|
296
|
+
}
|
|
211
297
|
if (count === 0) {
|
|
212
298
|
throw new Error("rematerializeGrid requires an existing grid.");
|
|
213
299
|
}
|
|
@@ -215,12 +301,55 @@ const rematerializeGrid = action(
|
|
|
215
301
|
}
|
|
216
302
|
);
|
|
217
303
|
|
|
304
|
+
const removeGrid = action(
|
|
305
|
+
{
|
|
306
|
+
op: "removeGrid",
|
|
307
|
+
description: "Remove selected Cartesian grid directions."
|
|
308
|
+
},
|
|
309
|
+
function (args = {}) {
|
|
310
|
+
validateOptionObject(args, AGGREGATE_OPTIONS, "removeGrid");
|
|
311
|
+
for (const direction of AGGREGATE_OPTIONS) {
|
|
312
|
+
if (
|
|
313
|
+
Object.hasOwn(args, direction) &&
|
|
314
|
+
typeof args[direction] !== "boolean"
|
|
315
|
+
) {
|
|
316
|
+
throw new TypeError(`removeGrid ${direction} must be a boolean.`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const existing = AGGREGATE_OPTIONS.filter(direction =>
|
|
320
|
+
this.semanticSpec.guides.grid?.[direction] !== undefined ||
|
|
321
|
+
this.guideConfigs.grid?.[direction] !== undefined ||
|
|
322
|
+
this.graphicSpec.objects[
|
|
323
|
+
POLAR_OPTIONS.includes(direction)
|
|
324
|
+
? polarGuideNames(direction).grid
|
|
325
|
+
: gridNames(direction).graphic
|
|
326
|
+
] !== undefined
|
|
327
|
+
);
|
|
328
|
+
const selected = Object.keys(args).length === 0
|
|
329
|
+
? existing
|
|
330
|
+
: AGGREGATE_OPTIONS.filter(direction => args[direction] === true);
|
|
331
|
+
if (selected.length === 0) {
|
|
332
|
+
throw new Error("removeGrid requires at least one selected direction.");
|
|
333
|
+
}
|
|
334
|
+
for (const direction of selected) {
|
|
335
|
+
if (!existing.includes(direction)) {
|
|
336
|
+
throw new Error(`removeGrid requires an existing ${direction} grid.`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
let next = this;
|
|
340
|
+
for (const direction of selected) next = removeDirection(next, direction);
|
|
341
|
+
return next;
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
|
|
218
345
|
export function registerGridActions(ProgramClass) {
|
|
219
346
|
ProgramClass.prototype.createGrid = createGrid;
|
|
220
347
|
ProgramClass.prototype.createHorizontalGrid = createHorizontalGrid;
|
|
221
348
|
ProgramClass.prototype.createVerticalGrid = createVerticalGrid;
|
|
222
349
|
ProgramClass.prototype.editHorizontalGrid = editHorizontalGrid;
|
|
223
350
|
ProgramClass.prototype.editVerticalGrid = editVerticalGrid;
|
|
351
|
+
ProgramClass.prototype.editGrid = editGrid;
|
|
352
|
+
ProgramClass.prototype.removeGrid = removeGrid;
|
|
224
353
|
ProgramClass.prototype.rematerializeGrid = rematerializeGrid;
|
|
225
354
|
ProgramClass.prototype.rematerializeHorizontalGrid =
|
|
226
355
|
rematerializeHorizontalGrid;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { validateUserId } from "../../../core/identifiers.js";
|
|
2
|
-
import { isPlainObject } from "../../../core/immutable.js";
|
|
3
2
|
import {
|
|
4
|
-
|
|
3
|
+
validateOptionObject,
|
|
5
4
|
validateNonEmptyString,
|
|
6
5
|
validateNonNegativeFinite
|
|
7
6
|
} from "../../../core/validation.js";
|
|
8
7
|
import {
|
|
9
8
|
isTransformedScaleType,
|
|
10
9
|
mapContinuousScaleValues
|
|
11
|
-
} from "../../../grammar/scales.js";
|
|
10
|
+
} from "../../../grammar/scales/index.js";
|
|
12
11
|
import { resolveGraphicBounds } from "../../../layout/canvas.js";
|
|
13
12
|
import { resolveGridLineGeometry } from "../../../layout/grid.js";
|
|
14
13
|
import { DEFAULT_COLORS } from "../../../theme/defaults.js";
|
|
@@ -58,10 +57,7 @@ function validateStrokeDash(value) {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
export function validateGridCreateArgs(args, operation) {
|
|
61
|
-
|
|
62
|
-
throw new TypeError(`${operation} options must be a plain object.`);
|
|
63
|
-
}
|
|
64
|
-
validateKeys(args, GRID_OPTIONS, operation);
|
|
60
|
+
validateOptionObject(args, GRID_OPTIONS, operation);
|
|
65
61
|
if (Object.hasOwn(args, "count") && Object.hasOwn(args, "values")) {
|
|
66
62
|
throw new Error(`${operation} cannot use count and values together.`);
|
|
67
63
|
}
|
|
@@ -85,13 +81,9 @@ export function validateGridCreateArgs(args, operation) {
|
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
export function validateGridEditArgs(args, operation) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
validateKeys(args, GRID_EDIT_OPTIONS, operation);
|
|
92
|
-
if (Object.keys(args).length === 0) {
|
|
93
|
-
throw new TypeError(`${operation} requires at least one option.`);
|
|
94
|
-
}
|
|
84
|
+
validateOptionObject(args, GRID_EDIT_OPTIONS, operation, {
|
|
85
|
+
allowEmpty: false
|
|
86
|
+
});
|
|
95
87
|
if (Object.hasOwn(args, "count") && Object.hasOwn(args, "values")) {
|
|
96
88
|
throw new Error(`${operation} cannot use count and values together.`);
|
|
97
89
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { action } from "../../core/action.js";
|
|
2
2
|
import { isPlainObject } from "../../core/immutable.js";
|
|
3
|
+
import { validateOptionObject } from "../../core/validation.js";
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "
|
|
7
|
-
import { findSemanticScale } from "../../selectors/scales.js";
|
|
5
|
+
resolveAutomaticGridOptions,
|
|
6
|
+
resolveGuideApplicability
|
|
7
|
+
} from "./applicability.js";
|
|
8
8
|
|
|
9
9
|
const OPTIONS = Object.freeze(["axes", "grid", "legend"]);
|
|
10
10
|
|
|
@@ -15,54 +15,12 @@ function validateGuideOption(value, label) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function validateOptions(args) {
|
|
18
|
-
|
|
19
|
-
throw new TypeError("createGuides options must be a plain object.");
|
|
20
|
-
}
|
|
21
|
-
for (const key of Object.keys(args)) {
|
|
22
|
-
if (!OPTIONS.includes(key)) {
|
|
23
|
-
throw new Error(`Unknown createGuides option "${key}".`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
18
|
+
validateOptionObject(args, OPTIONS, "createGuides");
|
|
26
19
|
validateGuideOption(args.axes, "createGuides axes");
|
|
27
20
|
validateGuideOption(args.grid, "createGuides grid");
|
|
28
21
|
validateGuideOption(args.legend, "createGuides legend");
|
|
29
22
|
}
|
|
30
23
|
|
|
31
|
-
function hasCartesianEncoding(program) {
|
|
32
|
-
return program.semanticSpec.layers.some(
|
|
33
|
-
layer => layer.encoding?.x !== undefined || layer.encoding?.y !== undefined
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function hasGridEncoding(program) {
|
|
38
|
-
return program.semanticSpec.layers.some(
|
|
39
|
-
layer => layer.encoding?.x?.scale !== undefined ||
|
|
40
|
-
layer.encoding?.y?.scale !== undefined
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function inferGridOptions(program) {
|
|
45
|
-
const barOrientations = program.semanticSpec.layers
|
|
46
|
-
.map(resolveBarOrientation)
|
|
47
|
-
.filter(Boolean);
|
|
48
|
-
const positionedLayers = program.semanticSpec.layers.filter(
|
|
49
|
-
layer => layer.encoding?.x !== undefined && layer.encoding?.y !== undefined
|
|
50
|
-
);
|
|
51
|
-
const horizontalQuantitative = positionedLayers.length > 0 &&
|
|
52
|
-
positionedLayers.every(layer =>
|
|
53
|
-
layer.encoding.x.fieldType === "quantitative" &&
|
|
54
|
-
["nominal", "ordinal", "temporal"].includes(layer.encoding.y.fieldType)
|
|
55
|
-
);
|
|
56
|
-
if (
|
|
57
|
-
horizontalQuantitative ||
|
|
58
|
-
(barOrientations.length > 0 &&
|
|
59
|
-
barOrientations.every(value => value === BAR_ORIENTATIONS.horizontal))
|
|
60
|
-
) {
|
|
61
|
-
return { horizontal: false, vertical: true };
|
|
62
|
-
}
|
|
63
|
-
return { horizontal: true, vertical: false };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
24
|
function inferAxesOptions(program) {
|
|
67
25
|
const horizontalInterval = program.semanticSpec.layers.some(layer =>
|
|
68
26
|
layer.mark?.type === "rule" &&
|
|
@@ -75,28 +33,6 @@ function inferAxesOptions(program) {
|
|
|
75
33
|
: {};
|
|
76
34
|
}
|
|
77
35
|
|
|
78
|
-
function hasLegendEncoding(program) {
|
|
79
|
-
return program.semanticSpec.layers.some(
|
|
80
|
-
layer =>
|
|
81
|
-
(layer.mark?.type === "point" &&
|
|
82
|
-
layer.encoding?.opacity?.scale !== undefined) ||
|
|
83
|
-
(layer.mark?.type === "point" &&
|
|
84
|
-
layer.encoding?.color?.scale !== undefined &&
|
|
85
|
-
(layer.encoding?.shape?.scale !== undefined ||
|
|
86
|
-
["sequential", "quantize", "quantile", "threshold"].includes(
|
|
87
|
-
findSemanticScale(program, layer.encoding.color.scale)?.type
|
|
88
|
-
))) ||
|
|
89
|
-
(layer.mark?.type === "line" &&
|
|
90
|
-
["color", "strokeDash"].some(
|
|
91
|
-
channel => layer.encoding?.[channel]?.scale !== undefined
|
|
92
|
-
)) ||
|
|
93
|
-
(layer.mark?.type === "bar" &&
|
|
94
|
-
layer.encoding?.color?.scale !== undefined) ||
|
|
95
|
-
(layer.mark?.type === "area" &&
|
|
96
|
-
layer.encoding?.color?.scale !== undefined)
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
36
|
function selectOption(explicit, applicable) {
|
|
101
37
|
if (explicit === false) return undefined;
|
|
102
38
|
if (explicit !== undefined) return explicit;
|
|
@@ -110,15 +46,21 @@ const createGuides = action(
|
|
|
110
46
|
},
|
|
111
47
|
function (args = {}) {
|
|
112
48
|
validateOptions(args);
|
|
113
|
-
const
|
|
49
|
+
const applicability = resolveGuideApplicability(this);
|
|
50
|
+
const hasAxes = applicability.axes.cartesian || applicability.axes.polar;
|
|
51
|
+
const axes = args.axes === undefined && applicability.axes.cartesian
|
|
114
52
|
? inferAxesOptions(this)
|
|
115
|
-
: selectOption(args.axes,
|
|
116
|
-
const grid = args.grid === undefined &&
|
|
117
|
-
|
|
118
|
-
|
|
53
|
+
: selectOption(args.axes, hasAxes);
|
|
54
|
+
const grid = args.grid === undefined &&
|
|
55
|
+
(applicability.grid.cartesian || applicability.grid.polar)
|
|
56
|
+
? resolveAutomaticGridOptions(this)
|
|
57
|
+
: selectOption(
|
|
58
|
+
args.grid,
|
|
59
|
+
applicability.grid.cartesian || applicability.grid.polar
|
|
60
|
+
);
|
|
119
61
|
const legend = selectOption(
|
|
120
62
|
args.legend,
|
|
121
|
-
|
|
63
|
+
applicability.legend
|
|
122
64
|
);
|
|
123
65
|
|
|
124
66
|
if (axes === undefined && grid === undefined && legend === undefined) {
|
|
@@ -2,10 +2,16 @@ import { registerGuideAxisActions } from "./axes/index.js";
|
|
|
2
2
|
import { registerGuideCollectionActions } from "./guides.js";
|
|
3
3
|
import { registerGridActions } from "./grids/index.js";
|
|
4
4
|
import { registerLegendActions } from "./legends/index.js";
|
|
5
|
+
import {
|
|
6
|
+
registerPolarAxisActions,
|
|
7
|
+
registerPolarGridActions
|
|
8
|
+
} from "./polar/index.js";
|
|
5
9
|
|
|
6
10
|
export function registerGuideActions(ProgramClass) {
|
|
7
11
|
registerGuideAxisActions(ProgramClass);
|
|
8
12
|
registerLegendActions(ProgramClass);
|
|
9
13
|
registerGridActions(ProgramClass);
|
|
14
|
+
registerPolarGridActions(ProgramClass);
|
|
15
|
+
registerPolarAxisActions(ProgramClass);
|
|
10
16
|
registerGuideCollectionActions(ProgramClass);
|
|
11
17
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { action } from "../../../../core/action.js";
|
|
2
|
-
import {
|
|
2
|
+
import { validateOptionObject } from "../../../../core/validation.js";
|
|
3
3
|
import { noOptions, resolveLayout, activeConfig } from "./layout.js";
|
|
4
4
|
import { normalizeOptions } from "./options.js";
|
|
5
5
|
import { findLayer } from "../../../../selectors/layers.js";
|
|
6
6
|
import { findSemanticScale } from "../../../../selectors/scales.js";
|
|
7
|
+
import { isSizeLegendPoint } from "../size.js";
|
|
7
8
|
import {
|
|
8
9
|
resolveCurrentDefinition,
|
|
9
10
|
resolveDefinition,
|
|
@@ -69,11 +70,11 @@ export const rematerializeLegend = action(
|
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
if (config.border !== false) next = next.
|
|
73
|
+
if (config.border !== false) next = next.rematerializeLegendBackground();
|
|
73
74
|
next = next
|
|
74
|
-
.
|
|
75
|
-
.
|
|
76
|
-
if (config.titleVisible !== false) next = next.
|
|
75
|
+
.rematerializeLegendSymbols()
|
|
76
|
+
.rematerializeLegendLabels();
|
|
77
|
+
if (config.titleVisible !== false) next = next.rematerializeLegendTitle();
|
|
77
78
|
const hasHighlight = Object.values(
|
|
78
79
|
next.materializationConfigs.highlights ?? {}
|
|
79
80
|
).some(highlight => highlight.target === config.target);
|
|
@@ -170,13 +171,51 @@ export const createCategoricalLegend = action(
|
|
|
170
171
|
export const createLegend = action(
|
|
171
172
|
{ op: "createLegend", description: "Create an inferred legend for selected channels." },
|
|
172
173
|
function (args = {}) {
|
|
173
|
-
|
|
174
|
-
throw new TypeError("createLegend options must be a plain object.");
|
|
175
|
-
}
|
|
174
|
+
validateOptionObject(args, undefined, "createLegend");
|
|
176
175
|
const channels = args.channels;
|
|
177
176
|
if (channels !== undefined && !Array.isArray(channels)) {
|
|
178
177
|
throw new TypeError("createLegend channels must be an array.");
|
|
179
178
|
}
|
|
179
|
+
const explicitSize = channels?.length === 1 && channels[0] === "size";
|
|
180
|
+
const requestedSizeLayer = args.target === undefined
|
|
181
|
+
? undefined
|
|
182
|
+
: findLayer(this, args.target);
|
|
183
|
+
const sizeCandidates = this.semanticSpec.layers.filter(isSizeLegendPoint);
|
|
184
|
+
const hasNonSizeLegendEncoding = layer =>
|
|
185
|
+
["color", "shape", "strokeDash", "opacity"].some(channel =>
|
|
186
|
+
layer.encoding?.[channel]?.scale !== undefined
|
|
187
|
+
);
|
|
188
|
+
const hasNonSizeLegendCandidate = this.semanticSpec.layers.some(
|
|
189
|
+
hasNonSizeLegendEncoding
|
|
190
|
+
);
|
|
191
|
+
const inferredSize = channels === undefined && (
|
|
192
|
+
(args.target !== undefined && isSizeLegendPoint(requestedSizeLayer) &&
|
|
193
|
+
!hasNonSizeLegendEncoding(requestedSizeLayer)) ||
|
|
194
|
+
(args.target === undefined && sizeCandidates.length === 1 &&
|
|
195
|
+
!hasNonSizeLegendCandidate)
|
|
196
|
+
);
|
|
197
|
+
if (explicitSize || inferredSize) {
|
|
198
|
+
const {
|
|
199
|
+
target,
|
|
200
|
+
count,
|
|
201
|
+
position,
|
|
202
|
+
channels: _channels,
|
|
203
|
+
...unsupported
|
|
204
|
+
} = args;
|
|
205
|
+
const unsupportedKeys = Object.keys(unsupported);
|
|
206
|
+
if (unsupportedKeys.length > 0) {
|
|
207
|
+
throw new Error(
|
|
208
|
+
`Standalone size legend does not support option "${unsupportedKeys[0]}".`
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
if (position !== undefined && position !== "right") {
|
|
212
|
+
throw new Error('Standalone size legends currently require position "right".');
|
|
213
|
+
}
|
|
214
|
+
return this.createSizeLegend({
|
|
215
|
+
...(target === undefined ? {} : { target }),
|
|
216
|
+
...(count === undefined ? {} : { count })
|
|
217
|
+
});
|
|
218
|
+
}
|
|
180
219
|
const opacityCandidates = this.semanticSpec.layers.filter(layer =>
|
|
181
220
|
layer.mark?.type === "point" && layer.encoding?.opacity?.scale !== undefined
|
|
182
221
|
);
|
|
@@ -193,7 +232,7 @@ export const createLegend = action(
|
|
|
193
232
|
return this.createOpacityLegend(args);
|
|
194
233
|
}
|
|
195
234
|
const continuousColorCandidates = this.semanticSpec.layers.filter(layer => {
|
|
196
|
-
const encoding = ["point", "bar"].includes(layer.mark?.type)
|
|
235
|
+
const encoding = ["point", "bar", "rect"].includes(layer.mark?.type)
|
|
197
236
|
? layer.encoding?.color
|
|
198
237
|
: undefined;
|
|
199
238
|
const scale = findSemanticScale(this, encoding?.scale);
|
|
@@ -3,14 +3,14 @@ import { activeConfig, graphic, noOptions, resolveLayout } from "./layout.js";
|
|
|
3
3
|
import { resolveLegendGraphicPlacement } from
|
|
4
4
|
"../../../../materialization/graphicHierarchy.js";
|
|
5
5
|
|
|
6
|
-
export const
|
|
7
|
-
{ op: "
|
|
6
|
+
export const rematerializeLegendLabels = action(
|
|
7
|
+
{ op: "rematerializeLegendLabels", description: "Rematerialize categorical legend labels." },
|
|
8
8
|
function (args = {}) {
|
|
9
|
-
noOptions(args, "
|
|
9
|
+
noOptions(args, "rematerializeLegendLabels");
|
|
10
10
|
const { config } = activeConfig(this);
|
|
11
11
|
const id = graphic(config, "Labels");
|
|
12
12
|
if (this.graphicSpec.objects[id]?.type !== "text") {
|
|
13
|
-
throw new Error("
|
|
13
|
+
throw new Error("rematerializeLegendLabels requires existing legend labels.");
|
|
14
14
|
}
|
|
15
15
|
const layout = resolveLayout(this, config);
|
|
16
16
|
return this
|
|
@@ -43,18 +43,18 @@ export const createLegendLabels = action(
|
|
|
43
43
|
length: config.domain.length,
|
|
44
44
|
...resolveLegendGraphicPlacement(this)
|
|
45
45
|
})
|
|
46
|
-
.
|
|
46
|
+
.rematerializeLegendLabels();
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
-
export const
|
|
51
|
-
{ op: "
|
|
50
|
+
export const rematerializeLegendTitle = action(
|
|
51
|
+
{ op: "rematerializeLegendTitle", description: "Rematerialize the categorical legend title." },
|
|
52
52
|
function (args = {}) {
|
|
53
|
-
noOptions(args, "
|
|
53
|
+
noOptions(args, "rematerializeLegendTitle");
|
|
54
54
|
const { config } = activeConfig(this);
|
|
55
55
|
const id = graphic(config, "Title");
|
|
56
56
|
if (this.graphicSpec.objects[id]?.type !== "text") {
|
|
57
|
-
throw new Error("
|
|
57
|
+
throw new Error("rematerializeLegendTitle requires an existing legend title.");
|
|
58
58
|
}
|
|
59
59
|
const layout = resolveLayout(this, config);
|
|
60
60
|
return this
|
|
@@ -92,21 +92,21 @@ export const createLegendTitle = action(
|
|
|
92
92
|
type: "text",
|
|
93
93
|
...resolveLegendGraphicPlacement(this)
|
|
94
94
|
})
|
|
95
|
-
.
|
|
95
|
+
.rematerializeLegendTitle();
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
|
|
99
|
-
export const
|
|
100
|
-
{ op: "
|
|
99
|
+
export const rematerializeLegendBackground = action(
|
|
100
|
+
{ op: "rematerializeLegendBackground", description: "Rematerialize the legend background." },
|
|
101
101
|
function (args = {}) {
|
|
102
|
-
noOptions(args, "
|
|
102
|
+
noOptions(args, "rematerializeLegendBackground");
|
|
103
103
|
const { config } = activeConfig(this);
|
|
104
104
|
if (config.border === false) {
|
|
105
|
-
throw new Error("
|
|
105
|
+
throw new Error("rematerializeLegendBackground requires border configuration.");
|
|
106
106
|
}
|
|
107
107
|
const id = graphic(config, "Background");
|
|
108
108
|
if (this.graphicSpec.objects[id]?.type !== "rect") {
|
|
109
|
-
throw new Error("
|
|
109
|
+
throw new Error("rematerializeLegendBackground requires an existing background.");
|
|
110
110
|
}
|
|
111
111
|
const layout = resolveLayout(this, config).background;
|
|
112
112
|
return this
|
|
@@ -135,6 +135,6 @@ export const createLegendBackground = action(
|
|
|
135
135
|
type: "rect",
|
|
136
136
|
...resolveLegendGraphicPlacement(this)
|
|
137
137
|
})
|
|
138
|
-
.
|
|
138
|
+
.rematerializeLegendBackground();
|
|
139
139
|
}
|
|
140
140
|
);
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
createLegendBackground,
|
|
9
9
|
createLegendLabels,
|
|
10
10
|
createLegendTitle,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
rematerializeLegendBackground,
|
|
12
|
+
rematerializeLegendLabels,
|
|
13
|
+
rematerializeLegendTitle
|
|
14
14
|
} from "./components.js";
|
|
15
15
|
import {
|
|
16
16
|
createLegendSymbolLines,
|
|
17
17
|
createLegendSymbolPoints,
|
|
18
18
|
createLegendSymbolSwatches,
|
|
19
19
|
createLegendSymbols,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
rematerializeLegendSymbolLines,
|
|
21
|
+
rematerializeLegendSymbolPoints,
|
|
22
|
+
rematerializeLegendSymbolSwatches,
|
|
23
|
+
rematerializeLegendSymbols,
|
|
24
24
|
rematerializeLegendHighlights
|
|
25
25
|
} from "./symbols.js";
|
|
26
26
|
import { editLegend } from "../edit.js";
|
|
@@ -31,19 +31,19 @@ export function registerCategoricalLegendActions(ProgramClass) {
|
|
|
31
31
|
ProgramClass.prototype.createCategoricalLegend = createCategoricalLegend;
|
|
32
32
|
ProgramClass.prototype.removeCategoricalLegend = removeCategoricalLegend;
|
|
33
33
|
ProgramClass.prototype.createLegendBackground = createLegendBackground;
|
|
34
|
-
ProgramClass.prototype.
|
|
34
|
+
ProgramClass.prototype.rematerializeLegendBackground = rematerializeLegendBackground;
|
|
35
35
|
ProgramClass.prototype.createLegendSymbols = createLegendSymbols;
|
|
36
|
-
ProgramClass.prototype.
|
|
36
|
+
ProgramClass.prototype.rematerializeLegendSymbols = rematerializeLegendSymbols;
|
|
37
37
|
ProgramClass.prototype.rematerializeLegendHighlights = rematerializeLegendHighlights;
|
|
38
38
|
ProgramClass.prototype.createLegendSymbolLines = createLegendSymbolLines;
|
|
39
|
-
ProgramClass.prototype.
|
|
39
|
+
ProgramClass.prototype.rematerializeLegendSymbolLines = rematerializeLegendSymbolLines;
|
|
40
40
|
ProgramClass.prototype.createLegendSymbolPoints = createLegendSymbolPoints;
|
|
41
|
-
ProgramClass.prototype.
|
|
41
|
+
ProgramClass.prototype.rematerializeLegendSymbolPoints = rematerializeLegendSymbolPoints;
|
|
42
42
|
ProgramClass.prototype.createLegendSymbolSwatches = createLegendSymbolSwatches;
|
|
43
|
-
ProgramClass.prototype.
|
|
43
|
+
ProgramClass.prototype.rematerializeLegendSymbolSwatches = rematerializeLegendSymbolSwatches;
|
|
44
44
|
ProgramClass.prototype.createLegendLabels = createLegendLabels;
|
|
45
|
-
ProgramClass.prototype.
|
|
45
|
+
ProgramClass.prototype.rematerializeLegendLabels = rematerializeLegendLabels;
|
|
46
46
|
ProgramClass.prototype.createLegendTitle = createLegendTitle;
|
|
47
|
-
ProgramClass.prototype.
|
|
47
|
+
ProgramClass.prototype.rematerializeLegendTitle = rematerializeLegendTitle;
|
|
48
48
|
ProgramClass.prototype.rematerializeLegend = rematerializeLegend;
|
|
49
49
|
}
|