@uwdata/mosaic-spec 0.16.1 → 0.17.0

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.
Files changed (97) hide show
  1. package/package.json +8 -12
  2. package/src/ast/TransformNode.js +11 -17
  3. package/src/ast/WindowFrameNode.js +61 -0
  4. package/src/config/transforms.js +8 -0
  5. package/src/constants.js +1 -0
  6. package/src/spec/Interval.ts +75 -0
  7. package/src/spec/Transform.ts +56 -46
  8. package/tsconfig.json +10 -8
  9. package/LICENSE +0 -47
  10. package/dist/mosaic-schema.json +0 -200164
  11. package/dist/types/ast/ASTNode.d.ts +0 -26
  12. package/dist/types/ast/ColumnParamRefNode.d.ts +0 -8
  13. package/dist/types/ast/DataNode.d.ts +0 -60
  14. package/dist/types/ast/ExpressionNode.d.ts +0 -13
  15. package/dist/types/ast/HConcatNode.d.ts +0 -10
  16. package/dist/types/ast/HSpaceNode.d.ts +0 -11
  17. package/dist/types/ast/InputNode.d.ts +0 -8
  18. package/dist/types/ast/LiteralNode.d.ts +0 -7
  19. package/dist/types/ast/OptionsNode.d.ts +0 -10
  20. package/dist/types/ast/ParamNode.d.ts +0 -8
  21. package/dist/types/ast/ParamRefNode.d.ts +0 -8
  22. package/dist/types/ast/PlotAttributeNode.d.ts +0 -18
  23. package/dist/types/ast/PlotFromNode.d.ts +0 -9
  24. package/dist/types/ast/PlotInteractorNode.d.ts +0 -8
  25. package/dist/types/ast/PlotLegendNode.d.ts +0 -10
  26. package/dist/types/ast/PlotMarkNode.d.ts +0 -10
  27. package/dist/types/ast/PlotNode.d.ts +0 -11
  28. package/dist/types/ast/SelectionNode.d.ts +0 -24
  29. package/dist/types/ast/SpecNode.d.ts +0 -10
  30. package/dist/types/ast/TransformNode.d.ts +0 -21
  31. package/dist/types/ast/VConcatNode.d.ts +0 -10
  32. package/dist/types/ast/VSpaceNode.d.ts +0 -11
  33. package/dist/types/ast-to-dom.d.ts +0 -40
  34. package/dist/types/ast-to-esm.d.ts +0 -64
  35. package/dist/types/config/components.d.ts +0 -4
  36. package/dist/types/config/extensions.d.ts +0 -9
  37. package/dist/types/config/inputs.d.ts +0 -5
  38. package/dist/types/config/plots.d.ts +0 -34
  39. package/dist/types/config/transforms.d.ts +0 -4
  40. package/dist/types/constants.d.ts +0 -31
  41. package/dist/types/index.d.ts +0 -29
  42. package/dist/types/parse-spec.d.ts +0 -111
  43. package/dist/types/spec/CSSStyles.d.ts +0 -3
  44. package/dist/types/spec/Data.d.ts +0 -165
  45. package/dist/types/spec/Expression.d.ts +0 -27
  46. package/dist/types/spec/HConcat.d.ts +0 -8
  47. package/dist/types/spec/HSpace.d.ts +0 -9
  48. package/dist/types/spec/Input.d.ts +0 -212
  49. package/dist/types/spec/Param.d.ts +0 -63
  50. package/dist/types/spec/Plot.d.ts +0 -14
  51. package/dist/types/spec/PlotAttribute.d.ts +0 -1534
  52. package/dist/types/spec/PlotFrom.d.ts +0 -20
  53. package/dist/types/spec/PlotInteractor.d.ts +0 -9
  54. package/dist/types/spec/PlotLegend.d.ts +0 -68
  55. package/dist/types/spec/PlotMark.d.ts +0 -28
  56. package/dist/types/spec/PlotTypes.d.ts +0 -293
  57. package/dist/types/spec/Spec.d.ts +0 -52
  58. package/dist/types/spec/Transform.d.ts +0 -346
  59. package/dist/types/spec/VConcat.d.ts +0 -8
  60. package/dist/types/spec/VSpace.d.ts +0 -9
  61. package/dist/types/spec/interactors/BrushStyles.d.ts +0 -27
  62. package/dist/types/spec/interactors/Highlight.d.ts +0 -37
  63. package/dist/types/spec/interactors/Interval1D.d.ts +0 -42
  64. package/dist/types/spec/interactors/Interval2D.d.ts +0 -47
  65. package/dist/types/spec/interactors/Nearest.d.ts +0 -44
  66. package/dist/types/spec/interactors/PanZoom.d.ts +0 -58
  67. package/dist/types/spec/interactors/Region.d.ts +0 -32
  68. package/dist/types/spec/interactors/Toggle.d.ts +0 -59
  69. package/dist/types/spec/marks/Area.d.ts +0 -139
  70. package/dist/types/spec/marks/Arrow.d.ts +0 -94
  71. package/dist/types/spec/marks/Axis.d.ts +0 -281
  72. package/dist/types/spec/marks/Bar.d.ts +0 -150
  73. package/dist/types/spec/marks/Cell.d.ts +0 -57
  74. package/dist/types/spec/marks/Contour.d.ts +0 -23
  75. package/dist/types/spec/marks/Delaunay.d.ts +0 -86
  76. package/dist/types/spec/marks/DenseLine.d.ts +0 -27
  77. package/dist/types/spec/marks/Density.d.ts +0 -136
  78. package/dist/types/spec/marks/Dot.d.ts +0 -133
  79. package/dist/types/spec/marks/ErrorBar.d.ts +0 -82
  80. package/dist/types/spec/marks/Frame.d.ts +0 -21
  81. package/dist/types/spec/marks/Geo.d.ts +0 -53
  82. package/dist/types/spec/marks/Hexbin.d.ts +0 -30
  83. package/dist/types/spec/marks/Hexgrid.d.ts +0 -25
  84. package/dist/types/spec/marks/Image.d.ts +0 -89
  85. package/dist/types/spec/marks/Line.d.ts +0 -82
  86. package/dist/types/spec/marks/Link.d.ts +0 -60
  87. package/dist/types/spec/marks/Marks.d.ts +0 -910
  88. package/dist/types/spec/marks/Raster.d.ts +0 -124
  89. package/dist/types/spec/marks/Rect.d.ts +0 -166
  90. package/dist/types/spec/marks/Regression.d.ts +0 -58
  91. package/dist/types/spec/marks/Rule.d.ts +0 -100
  92. package/dist/types/spec/marks/Text.d.ts +0 -110
  93. package/dist/types/spec/marks/Tick.d.ts +0 -61
  94. package/dist/types/spec/marks/Vector.d.ts +0 -99
  95. package/dist/types/spec/marks/Waffle.d.ts +0 -58
  96. package/dist/types/util.d.ts +0 -12
  97. package/jsconfig.json +0 -10
@@ -1,346 +0,0 @@
1
- import { ParamRef } from './Param.js';
2
- /** A field argument to a data transform. */
3
- export type TransformField = string | ParamRef;
4
- /** Window transform options. */
5
- export interface WindowOptions {
6
- orderby?: TransformField | TransformField[];
7
- partitionby?: TransformField | TransformField[];
8
- rows?: (number | null)[] | ParamRef;
9
- range?: (number | null)[] | ParamRef;
10
- }
11
- /** Aggregate transform options. */
12
- export interface AggregateOptions {
13
- distinct?: boolean;
14
- }
15
- /** A transform argument. */
16
- type Arg = string | number | boolean | ParamRef;
17
- /** A zero argument transform signature. */
18
- type Arg0 = null | [];
19
- /** A single argument transform signature. */
20
- type Arg1 = Arg | [Arg];
21
- /**
22
- * A two argument transform signature; both arguments are required.
23
- */
24
- type Arg2 = [Arg, Arg];
25
- /**
26
- * A two argument transform signature; the second argument is optional.
27
- */
28
- type Arg2Opt = Arg | [Arg, Arg?];
29
- /**
30
- * A three argument transform signature; the
31
- * second and third arguments are optional.
32
- */
33
- type Arg3Opt = Arg | [Arg, Arg?, Arg?];
34
- /** Binning interval names. */
35
- export type BinInterval = 'date' | 'number' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year';
36
- export interface Bin {
37
- /**
38
- * Bin a continuous variable into discrete intervals. The bin argument
39
- * specifies a data column or expression to bin. Both numerical and
40
- * temporal (date/time) values are supported.
41
- */
42
- bin: Arg | [Arg];
43
- /**
44
- * The interval bin unit to use, typically used to indicate a date/time
45
- * unit for binning temporal values, such as `hour`, `day`, or `month`.
46
- * If `date`, the extent of data values is used to automatically select
47
- * an interval for temporal data. The value `number` enforces normal
48
- * numerical binning, even over temporal data. If unspecified, defaults
49
- * to `number` for numerical data and `date` for temporal data.
50
- */
51
- interval?: BinInterval;
52
- /**
53
- * The step size to use between bins. When binning numerical values (or
54
- * interval type `number`), this setting specifies the numerical step size.
55
- * For data/time intervals, this indicates the number of steps of that unit,
56
- * such as hours, days, or years.
57
- */
58
- step?: number;
59
- /**
60
- * The target number of binning steps to use. To accommodate human-friendly
61
- * ("nice") bin boundaries, the actual number of bins may diverge from this
62
- * exact value. This option is ignored when **step** is specified.
63
- */
64
- steps?: number;
65
- /**
66
- * The minimum allowed bin step size (default `0`) when performing numerical
67
- * binning. For example, a setting of `1` prevents step sizes less than 1.
68
- * This option is ignored when **step** is specified.
69
- */
70
- minstep?: number;
71
- /**
72
- * A flag (default `true`) requesting "nice" human-friendly end points and
73
- * step sizes when performing numerical binning. When **step** is specified,
74
- * this option affects the binning end points (e.g., origin) only.
75
- */
76
- nice?: true;
77
- /**
78
- * Offset for computed bins (default `0`). For example, a value of `1` will
79
- * result in using the next consecutive bin boundary.
80
- */
81
- offset?: number;
82
- }
83
- export interface Column {
84
- /**
85
- * Intpret a string or param-value as a column reference.
86
- */
87
- column: Arg1;
88
- }
89
- export interface DateMonth {
90
- /**
91
- * Transform a Date value to a month boundary for cyclic comparison.
92
- * Year values are collapsed to enable comparison over months only.
93
- */
94
- dateMonth: Arg1;
95
- }
96
- export interface DateMonthDay {
97
- /**
98
- * Transform a Date value to a month and day boundary for cyclic comparison.
99
- * Year values are collapsed to enable comparison over months and days only.
100
- */
101
- dateMonthDay: Arg1;
102
- }
103
- export interface DateDay {
104
- /**
105
- * Transform a Date value to a day of the month for cyclic comparison.
106
- * Year and month values are collapsed to enable comparison over days only.
107
- */
108
- dateDay: Arg1;
109
- }
110
- export interface Centroid {
111
- /**
112
- * Compute the 2D centroid of geometry-typed data.
113
- * This transform requires the DuckDB `spatial` extension.
114
- */
115
- centroid: Arg1;
116
- }
117
- export interface CentroidX {
118
- /**
119
- * Compute the centroid x-coordinate of geometry-typed data.
120
- * This transform requires the DuckDB `spatial` extension.
121
- */
122
- centroidX: Arg1;
123
- }
124
- export interface CentroidY {
125
- /**
126
- * Compute the centroid y-coordinate of geometry-typed data.
127
- * This transform requires the DuckDB `spatial` extension.
128
- */
129
- centroidY: Arg1;
130
- }
131
- export interface GeoJSON {
132
- /**
133
- * Compute a GeoJSON-formatted string from geometry-typed data.
134
- * This transform requires the DuckDB `spatial` extension.
135
- */
136
- geojson: Arg1;
137
- }
138
- export interface Argmax extends AggregateOptions, WindowOptions {
139
- /**
140
- * Find a value of the first column that maximizes the second column.
141
- */
142
- argmax: Arg2;
143
- }
144
- export interface Argmin extends AggregateOptions, WindowOptions {
145
- /**
146
- * Find a value of the first column that minimizes the second column.
147
- */
148
- argmin: Arg2;
149
- }
150
- export interface Avg extends AggregateOptions, WindowOptions {
151
- /**
152
- * Compute the average (mean) value of the given column.
153
- */
154
- avg: Arg1;
155
- }
156
- export interface Count extends AggregateOptions, WindowOptions {
157
- /**
158
- * Compute the count of records in an aggregation group.
159
- */
160
- count: Arg0 | Arg1;
161
- }
162
- export interface Covariance extends AggregateOptions, WindowOptions {
163
- /**
164
- * Compute the sample covariance of between the given columns.
165
- */
166
- covariance: Arg2;
167
- }
168
- export interface CovarPop extends AggregateOptions, WindowOptions {
169
- /**
170
- * Compute the population covariance of between the given columns.
171
- */
172
- covarPop: Arg2;
173
- }
174
- export interface First extends AggregateOptions, WindowOptions {
175
- /**
176
- * Return the first column value found in an aggregation group.
177
- */
178
- first: Arg1;
179
- }
180
- export interface Geomean extends AggregateOptions, WindowOptions {
181
- /**
182
- * Compute the geometric mean value of the given column.
183
- */
184
- geomean: Arg1;
185
- }
186
- export interface Last extends AggregateOptions, WindowOptions {
187
- /**
188
- * Return the last column value found in an aggregation group.
189
- */
190
- last: Arg1;
191
- }
192
- export interface Max extends AggregateOptions, WindowOptions {
193
- /**
194
- * Compute the maximum value of the given column.
195
- */
196
- max: Arg1;
197
- }
198
- export interface Min extends AggregateOptions, WindowOptions {
199
- /**
200
- * Compute the minimum value of the given column.
201
- */
202
- min: Arg1;
203
- }
204
- export interface Median extends AggregateOptions, WindowOptions {
205
- /**
206
- * Compute the median value of the given column.
207
- */
208
- median: Arg1;
209
- }
210
- export interface Mode extends AggregateOptions, WindowOptions {
211
- /**
212
- * Compute the mode value of the given column.
213
- */
214
- mode: Arg1;
215
- }
216
- export interface Product extends AggregateOptions, WindowOptions {
217
- /**
218
- * Compute the product of the given column.
219
- */
220
- product: Arg1;
221
- }
222
- export interface Quantile extends AggregateOptions, WindowOptions {
223
- /**
224
- * Compute the quantile value of the given column at the provided
225
- * probability threshold. For example, 0.5 is the median.
226
- */
227
- quantile: Arg2;
228
- }
229
- export interface Stddev extends AggregateOptions, WindowOptions {
230
- /**
231
- * Compute the sum of the given column.
232
- */
233
- stddev: Arg1;
234
- }
235
- export interface StddevPop extends AggregateOptions, WindowOptions {
236
- /**
237
- * Compute the sum of the given column.
238
- */
239
- stddevPop: Arg1;
240
- }
241
- export interface Sum extends AggregateOptions, WindowOptions {
242
- /**
243
- * Compute the sum of the given column.
244
- */
245
- sum: Arg1;
246
- }
247
- export interface Variance extends AggregateOptions, WindowOptions {
248
- /**
249
- * Compute the sample variance of the given column.
250
- */
251
- variance: Arg1;
252
- }
253
- export interface VarPop extends AggregateOptions, WindowOptions {
254
- /**
255
- * Compute the population variance of the given column.
256
- */
257
- varPop: Arg1;
258
- }
259
- export interface RowNumber extends WindowOptions {
260
- /**
261
- * Compute the 1-based row number over an ordered window partition.
262
- */
263
- row_number: Arg0;
264
- }
265
- export interface Rank extends WindowOptions {
266
- /**
267
- * Compute the row rank over an ordered window partition.
268
- * Sorting ties result in gaps in the rank numbers ([1, 1, 3, ...]).
269
- */
270
- rank: Arg0;
271
- }
272
- export interface DenseRank extends WindowOptions {
273
- /**
274
- * Compute the dense row rank (no gaps) over an ordered window partition.
275
- * Sorting ties do not result in gaps in the rank numbers ( [1, 1, 2, ...]).
276
- */
277
- dense_rank: Arg0;
278
- }
279
- export interface PercentRank extends WindowOptions {
280
- /**
281
- * Compute the percetange rank over an ordered window partition.
282
- */
283
- percent_rank: Arg0;
284
- }
285
- export interface CumeDist extends WindowOptions {
286
- /**
287
- * Compute the cumulative distribution value over an ordered window
288
- * partition. Equals the number of partition rows preceding or peer with
289
- * the current row, divided by the total number of partition rows.
290
- */
291
- cume_dist: Arg0;
292
- }
293
- export interface NTile extends WindowOptions {
294
- /**
295
- * Compute an n-tile integer ranging from 1 to the provided argument
296
- * (num_buckets), dividing the partition as equally as possible.
297
- */
298
- ntile: Arg1;
299
- }
300
- export interface Lag extends WindowOptions {
301
- /**
302
- * Compute lagging values in a column. Returns the value at the row that is
303
- * `offset` (second argument, default `1`) rows before the current row within
304
- * the window frame. If there is no such row, instead return `default` (third
305
- * argument, default `null`). Both offset and default are evaluated with
306
- * respect to the current row.
307
- */
308
- lag: Arg3Opt;
309
- }
310
- export interface Lead extends WindowOptions {
311
- /**
312
- * Compute leading values in a column. Returns the value at the row that is
313
- * `offset` (second argument, default `1`) rows after the current row within
314
- * the window frame. If there is no such row, instead return `default` (third
315
- * argument, default `null`). Both offset and default are evaluated with
316
- * respect to the current row.
317
- */
318
- lag: Arg3Opt;
319
- }
320
- export interface FirstValue extends WindowOptions {
321
- /**
322
- * Get the first value of the given column in the current window frame.
323
- */
324
- first_value: Arg1;
325
- }
326
- export interface LastValue extends WindowOptions {
327
- /**
328
- * Get the last value of the given column in the current window frame.
329
- */
330
- last_value: Arg1;
331
- }
332
- export interface NthValue extends WindowOptions {
333
- /**
334
- * Get the nth value of the given column in the current window frame,
335
- * counting from one. The second argument is the offset for the nth row.
336
- */
337
- nth_value: Arg2Opt;
338
- }
339
- /** A data transform that maps one column value to another. */
340
- export type ColumnTransform = Bin | Column | DateMonth | DateMonthDay | DateDay | Centroid | CentroidX | CentroidY | GeoJSON;
341
- /** An aggregate transform that combines multiple values. */
342
- export type AggregateTransform = Argmax | Argmin | Avg | Count | Max | Min | First | Last | Max | Min | Median | Mode | Product | Quantile | Stddev | StddevPop | Sum | Variance | VarPop;
343
- export type WindowTransform = RowNumber | Rank | DenseRank | PercentRank | CumeDist | NTile | Rank | Lag | Lead | FirstValue | LastValue | NthValue;
344
- /** A data transform. */
345
- export type Transform = ColumnTransform | AggregateTransform | WindowTransform;
346
- export {};
@@ -1,8 +0,0 @@
1
- import { Component } from './Spec.js';
2
- /** A vconcat component. */
3
- export interface VConcat {
4
- /**
5
- * Vertically concatenate components in a column layout.
6
- */
7
- vconcat: Component[];
8
- }
@@ -1,9 +0,0 @@
1
- /** A vspace component. */
2
- export interface VSpace {
3
- /**
4
- * Vertical space to place between components.
5
- * Number values indicate screen pixels.
6
- * String values may use CSS units (em, pt, px, etc).
7
- */
8
- vspace: number | string;
9
- }
@@ -1,27 +0,0 @@
1
- /** Styles for rectangular selection brushes. */
2
- export interface BrushStyles {
3
- /**
4
- * The overall opacity of the brush rectangle.
5
- */
6
- opacity?: number;
7
- /**
8
- * The fill opacity of the brush rectangle.
9
- */
10
- fillOpacity?: number;
11
- /**
12
- * The stroke opacity of the brush rectangle.
13
- */
14
- strokeOpacity?: number;
15
- /**
16
- * The fill color of the brush rectangle.
17
- */
18
- fill?: string;
19
- /**
20
- * The stroke color of the brush rectangle.
21
- */
22
- stroke?: string;
23
- /**
24
- * The stroke dash array of the brush rectangle.
25
- */
26
- strokeDasharray?: string;
27
- }
@@ -1,37 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- /** A highlight interactor. */
3
- export interface Highlight {
4
- /**
5
- * Highlight selected marks by deemphasizing the others.
6
- */
7
- select: 'highlight';
8
- /**
9
- * The input selection. Unselected marks are deemphasized.
10
- */
11
- by: ParamRef;
12
- /**
13
- * The overall opacity of deemphasized marks.
14
- * By default the opacity is set to 0.2.
15
- */
16
- opacity?: number;
17
- /**
18
- * The fill opacity of deemphasized marks.
19
- * By default the fill opacity is unchanged.
20
- */
21
- fillOpacity?: number;
22
- /**
23
- * The stroke opacity of deemphasized marks.
24
- * By default the stroke opacity is unchanged.
25
- */
26
- strokeOpacity?: number;
27
- /**
28
- * The fill color of deemphasized marks.
29
- * By default the fill is unchanged.
30
- */
31
- fill?: string;
32
- /**
33
- * The stroke color of deemphasized marks.
34
- * By default the stroke is unchanged.
35
- */
36
- stroke?: string;
37
- }
@@ -1,42 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- import { BrushStyles } from './BrushStyles.js';
3
- /** Options for 1D interval interactors. */
4
- export interface Interval1DOptions {
5
- /**
6
- * The output selection. A clause of the form `field BETWEEN lo AND hi`
7
- * is added for the currently selected interval [lo, hi].
8
- */
9
- as: ParamRef;
10
- /**
11
- * The name of the field (database column) over which the interval
12
- * selection should be defined. If unspecified, the channel field of the
13
- * first valid prior mark definition is used.
14
- */
15
- field?: string;
16
- /**
17
- * The size of an interative pixel (default `1`). Larger pixel sizes reduce
18
- * the brush resolution, which can reduce the size of pre-aggregated
19
- * materialized views.
20
- */
21
- pixelSize?: number;
22
- /**
23
- * A flag indicating if peer (sibling) marks are excluded when
24
- * cross-filtering (default `true`). If set, peer marks will not be
25
- * filtered by this interactor's selection in cross-filtering setups.
26
- */
27
- peers?: boolean;
28
- /**
29
- * CSS styles for the brush (SVG `rect`) element.
30
- */
31
- brush?: BrushStyles;
32
- }
33
- /** An intervalX interactor. */
34
- export interface IntervalX extends Interval1DOptions {
35
- /** Select a continuous 1D interval selection over the `x` scale domain. */
36
- select: 'intervalX';
37
- }
38
- /** An intervalY interactor. */
39
- export interface IntervalY extends Interval1DOptions {
40
- /** Select a continuous 1D interval selection over the `y` scale domain. */
41
- select: 'intervalY';
42
- }
@@ -1,47 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- import { BrushStyles } from './BrushStyles.js';
3
- /** Options for 2D interval interactors. */
4
- export interface Interval2DOptions {
5
- /**
6
- * The output selection. A clause of the form
7
- * `(xfield BETWEEN x1 AND x2) AND (yfield BETWEEN y1 AND y2)`
8
- * is added for the currently selected intervals.
9
- */
10
- as: ParamRef;
11
- /**
12
- * The name of the field (database column) over which the `x`-component
13
- * of the interval selection should be defined. If unspecified, the `x`
14
- * channel field of the first valid prior mark definition is used.
15
- */
16
- xfield?: string;
17
- /**
18
- * The name of the field (database column) over which the `y`-component
19
- * of the interval selection should be defined. If unspecified, the `y`
20
- * channel field of the first valid prior mark definition is used.
21
- */
22
- yfield?: string;
23
- /**
24
- * The size of an interative pixel (default `1`). Larger pixel sizes reduce
25
- * the brush resolution, which can reduce the size of pre-aggregated
26
- * materialized views.
27
- */
28
- pixelSize?: number;
29
- /**
30
- * A flag indicating if peer (sibling) marks are excluded when
31
- * cross-filtering (default `true`). If set, peer marks will not be
32
- * filtered by this interactor's selection in cross-filtering setups.
33
- */
34
- peers?: boolean;
35
- /**
36
- * CSS styles for the brush (SVG `rect`) element.
37
- */
38
- brush?: BrushStyles;
39
- }
40
- /** An intervalXY interactor. */
41
- export interface IntervalXY extends Interval2DOptions {
42
- /**
43
- * Select a continuous 2D interval selection
44
- * over the `x` and `y` scale domains.
45
- */
46
- select: 'intervalXY';
47
- }
@@ -1,44 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- /** Options for nearest interactors. */
3
- export interface NearestOptions {
4
- /**
5
- * The output selection. A clause of the form `field = value`
6
- * is added for the currently nearest value.
7
- */
8
- as: ParamRef;
9
- /**
10
- * The encoding channels whose domain values should be selected. For example,
11
- * a setting of `['color']` selects the data value backing the color channel,
12
- * whereas `['x', 'z']` selects both x and z channel domain values. If
13
- * unspecified, the selected channels default to match the current pointer
14
- * settings: a `nearestX` interactor selects the `['x']` channels, while
15
- * a `nearest` interactor selects the `['x', 'y']` channels.
16
- */
17
- channels?: string[];
18
- /**
19
- * The fields (database column names) to use in generated selection clause
20
- * predicates. If unspecified, the fields backing the selected *channels*
21
- * in the first valid prior mark definition are used by default.
22
- */
23
- fields?: string[];
24
- /**
25
- * The maximum radius of a nearest selection (default 40). Marks with (x, y)
26
- * coordinates outside this radius will not be selected as nearest points.
27
- */
28
- maxRadius?: number;
29
- }
30
- /** A nearest interactor. */
31
- export interface Nearest extends NearestOptions {
32
- /** Select values from the mark closest to the pointer. */
33
- select: 'nearest';
34
- }
35
- /** A nearestX interactor. */
36
- export interface NearestX extends NearestOptions {
37
- /** Select values from the mark closest to the pointer *x* location. */
38
- select: 'nearestX';
39
- }
40
- /** A nearestY interactor. */
41
- export interface NearestY extends NearestOptions {
42
- /** Select values from the mark closest to the pointer *y* location. */
43
- select: 'nearestY';
44
- }
@@ -1,58 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- /** Options for pan/zoom interactors. */
3
- export interface PanZoomOptions {
4
- /**
5
- * The output selection for the `x` domain.
6
- * A clause of the form `field BETWEEN x1 AND x2` is added for the
7
- * current pan/zom interval [x1, x2].
8
- */
9
- x?: ParamRef;
10
- /**
11
- * The output selection for the `y` domain.
12
- * A clause of the form `field BETWEEN y1 AND y2` is added for the
13
- * current pan/zom interval [y1, y2].
14
- */
15
- y?: ParamRef;
16
- /**
17
- * The name of the field (database column) over which the `x`-component
18
- * of the pan/zoom interval should be defined. If unspecified, the `x`
19
- * channel field of the first valid prior mark definition is used.
20
- */
21
- xfield?: string;
22
- /**
23
- * The name of the field (database column) over which the `y`-component
24
- * of the pan/zoom interval should be defined. If unspecified, the `y`
25
- * channel field of the first valid prior mark definition is used.
26
- */
27
- yfield?: string;
28
- }
29
- /** A pan interactor. */
30
- export interface Pan extends PanZoomOptions {
31
- /** Pan a plot along both the `x` and `y` scales. */
32
- select: 'pan';
33
- }
34
- /** A panX interactor. */
35
- export interface PanX extends PanZoomOptions {
36
- /** Pan a plot along the `x` scale only. */
37
- select: 'panX';
38
- }
39
- /** A panY interactor. */
40
- export interface PanY extends PanZoomOptions {
41
- /** Pan a plot along the `y` scale only. */
42
- select: 'panY';
43
- }
44
- /** A panZoom interactor. */
45
- export interface PanZoom extends PanZoomOptions {
46
- /** Pan and zoom a plot along both the `x` and `y` scales. */
47
- select: 'panZoom';
48
- }
49
- /** A panZoomX interactor. */
50
- export interface PanZoomX extends PanZoomOptions {
51
- /** Pan and zoom a plot along the `x` scale only. */
52
- select: 'panZoomX';
53
- }
54
- /** A panZoomY interactor. */
55
- export interface PanZoomY extends PanZoomOptions {
56
- /** Pan and zoom a plot along the `y` scale only. */
57
- select: 'panZoomY';
58
- }
@@ -1,32 +0,0 @@
1
- import { ParamRef } from '../Param.js';
2
- import { BrushStyles } from './BrushStyles.js';
3
- /** Options for region interactors. */
4
- export interface RegionOptions {
5
- /**
6
- * The output selection. A clause of the form
7
- * `(field = value1) OR (field = value2) ...`
8
- * is added for the currently selected values.
9
- */
10
- as: ParamRef;
11
- /**
12
- * The encoding channels over which to select values.
13
- * For a selected mark, selection clauses will cover
14
- * the backing data fields for each channel.
15
- */
16
- channels: string[];
17
- /**
18
- * A flag indicating if peer (sibling) marks are excluded when
19
- * cross-filtering (default `true`). If set, peer marks will not be
20
- * filtered by this interactor's selection in cross-filtering setups.
21
- */
22
- peers?: boolean;
23
- /**
24
- * CSS styles for the brush (SVG `rect`) element.
25
- */
26
- brush?: BrushStyles;
27
- }
28
- /** A rectangular region interactor. */
29
- export interface Region extends RegionOptions {
30
- /** Select aspects of individual marks within a 2D range. */
31
- select: 'region';
32
- }