svelteplot 0.3.5-pr-121.0 → 0.3.5-pr-121.2
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/dist/Plot.svelte +1 -1
- package/dist/types/channel.d.ts +1 -1
- package/dist/types/data.d.ts +1 -1
- package/dist/types/facet.d.ts +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/plot.d.ts +1 -1
- package/dist/types/scale.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types.d.ts +0 -834
- package/dist/types.js +0 -1
package/dist/Plot.svelte
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import Plot from './core/Plot.svelte';
|
|
14
14
|
|
|
15
|
-
import type {
|
|
15
|
+
import type { PlotOptions } from './types/index.js';
|
|
16
16
|
|
|
17
17
|
// implicit marks
|
|
18
18
|
import AxisX from './marks/AxisX.svelte';
|
package/dist/types/channel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConstantAccessor, RawValue } from '.';
|
|
1
|
+
import type { ConstantAccessor, RawValue } from './index.js';
|
|
2
2
|
export type Channels = Record<string, ChannelAccessor | ConstantAccessor<string | number | boolean | symbol>>;
|
|
3
3
|
export type ChannelAccessor<T = Record<string | symbol, RawValue>> = ChannelValue<T> | {
|
|
4
4
|
/** the channel value */
|
package/dist/types/data.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScaledChannelName } from './channel';
|
|
1
|
+
import type { ScaledChannelName } from './channel.js';
|
|
2
2
|
export type RawValue = number | Date | boolean | string | symbol;
|
|
3
3
|
export type DataRecord<T = Record<string | symbol, RawValue>> = T & {
|
|
4
4
|
___orig___?: RawValue | [RawValue, RawValue];
|
package/dist/types/facet.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { MarkerShape } from '../marks/helpers/Marker.svelte';
|
|
3
2
|
import type { Writable } from 'svelte/store';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
3
|
+
import type { MarkerShape } from '../marks/helpers/Marker.svelte';
|
|
4
|
+
import type { Channels, ScaledChannelName } from './channel.js';
|
|
5
|
+
import type { DataRecord, DataRow, RawValue } from './data.js';
|
|
6
|
+
import type { BaseMarkProps } from './mark.js';
|
|
7
7
|
export type GenericMarkOptions = Record<string | symbol, any>;
|
|
8
8
|
export type CurveName = 'basis' | 'basis-closed' | 'basis-open' | 'bundle' | 'bump-x' | 'bump-y' | 'cardinal' | 'cardinal-closed' | 'cardinal-open' | 'catmull-rom' | 'catmull-rom-closed' | 'catmull-rom-open' | 'linear' | 'linear-closed' | 'monotone-x' | 'monotone-y' | 'natural' | 'step' | 'step-after' | 'step-before';
|
|
9
9
|
export type MarkerOptions = {
|
package/dist/types/plot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'svelte';
|
|
2
|
-
import type { ColorScheme } from './colorScheme';
|
|
2
|
+
import type { ColorScheme } from './colorScheme.js';
|
|
3
3
|
import type { GeoProjection } from 'd3-geo';
|
|
4
4
|
import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, ScaleOptions, XScaleOptions, YScaleOptions } from '.';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
package/dist/types/scale.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScaleBand, ScaleLinear, ScaleOrdinal } from 'd3-scale';
|
|
2
|
-
import type { ChannelAccessor, RawValue, ScaledChannelName } from '.';
|
|
2
|
+
import type { ChannelAccessor, RawValue, ScaledChannelName } from './index.js';
|
|
3
3
|
export type AxisXAnchor = 'bottom' | 'top' | 'both';
|
|
4
4
|
export type AxisYAnchor = 'left' | 'right' | 'both';
|
|
5
5
|
export type ScaleName = 'x' | 'y' | 'r' | 'color' | 'opacity' | 'length' | 'symbol' | 'fx' | 'fy' | 'projection';
|
package/package.json
CHANGED
package/dist/types.d.ts
DELETED
|
@@ -1,834 +0,0 @@
|
|
|
1
|
-
import type { ScaleBand, ScaleLinear, ScaleOrdinal } from 'd3-scale';
|
|
2
|
-
import type { ComponentProps, Snippet } from 'svelte';
|
|
3
|
-
import type { MouseEventHandler } from 'svelte/elements';
|
|
4
|
-
import type { MarkerShape } from './marks/helpers/Marker.svelte';
|
|
5
|
-
import type { Writable } from 'svelte/store';
|
|
6
|
-
import type * as CSS from 'csstype';
|
|
7
|
-
import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, Dot, Frame, Geo, Graticule, GridX, GridY, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Vector } from './marks';
|
|
8
|
-
import type { GeoProjection } from 'd3-geo';
|
|
9
|
-
import type { Clip } from './helpers/projection';
|
|
10
|
-
export type MarkType = 'area' | 'arrow' | 'axisX' | 'axisY' | 'barX' | 'barY' | 'cell' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY';
|
|
11
|
-
export type ScaleName = 'x' | 'y' | 'r' | 'color' | 'opacity' | 'length' | 'symbol' | 'fx' | 'fy' | 'projection';
|
|
12
|
-
export type ScaleType = 'linear' | 'pow' | 'sqrt' | 'log' | 'symlog' | 'time' | 'point' | 'ordinal' | 'sequential' | 'band' | 'categorical' | 'cyclical' | 'threshold' | 'quantile-cont' | 'quantile' | 'quantize' | 'diverging' | 'diverging-log' | 'diverging-pow' | 'diverging-sqrt' | 'diverging-symlog';
|
|
13
|
-
export type Mark<T> = {
|
|
14
|
-
id: symbol;
|
|
15
|
-
type: MarkType;
|
|
16
|
-
channels: ScaledChannelName[];
|
|
17
|
-
scales: Set<ScaleName>;
|
|
18
|
-
data: DataRecord<T>[];
|
|
19
|
-
options: T;
|
|
20
|
-
};
|
|
21
|
-
export type ScaledChannelName = 'fill' | 'fillOpacity' | 'opacity' | 'r' | 'length' | 'stroke' | 'strokeOpacity' | 'symbol' | 'fx' | 'fy' | 'x' | 'x1' | 'x2' | 'y' | 'y1' | 'y2';
|
|
22
|
-
export type ChannelName = ScaledChannelName | 'z' | 'sort' | 'filter' | 'interval';
|
|
23
|
-
export type RawValue = number | Date | boolean | string | symbol;
|
|
24
|
-
export type ScaleOptions = {
|
|
25
|
-
/**
|
|
26
|
-
* Override the automatic scale type detection.
|
|
27
|
-
*/
|
|
28
|
-
type: ScaleType | 'auto';
|
|
29
|
-
/**
|
|
30
|
-
* Set a custom domain for the scale instead of auto-computing the domain
|
|
31
|
-
* from the mark data channels.
|
|
32
|
-
*/
|
|
33
|
-
domain?: RawValue[];
|
|
34
|
-
/**
|
|
35
|
-
* Set a custom range for the scale.
|
|
36
|
-
*/
|
|
37
|
-
range?: RawValue[];
|
|
38
|
-
/**
|
|
39
|
-
* Reverse the scale.
|
|
40
|
-
*/
|
|
41
|
-
reverse: boolean;
|
|
42
|
-
label?: string;
|
|
43
|
-
interval?: string | number;
|
|
44
|
-
clamp: boolean;
|
|
45
|
-
nice: boolean;
|
|
46
|
-
zero: boolean;
|
|
47
|
-
round: boolean;
|
|
48
|
-
percent: boolean;
|
|
49
|
-
transform?: (d: RawValue) => RawValue;
|
|
50
|
-
/**
|
|
51
|
-
* set the padding for band scales
|
|
52
|
-
*/
|
|
53
|
-
padding: number;
|
|
54
|
-
/**
|
|
55
|
-
* set the align for band or point scales
|
|
56
|
-
*/
|
|
57
|
-
align: number;
|
|
58
|
-
/**
|
|
59
|
-
* set the inner padding for band scales
|
|
60
|
-
*/
|
|
61
|
-
paddingInner?: number;
|
|
62
|
-
/**
|
|
63
|
-
* set the outer padding for band scales
|
|
64
|
-
*/
|
|
65
|
-
paddingOuter?: number;
|
|
66
|
-
insetLeft?: number;
|
|
67
|
-
insetRight?: number;
|
|
68
|
-
insetTop?: number;
|
|
69
|
-
insetBottom?: number;
|
|
70
|
-
ticks?: (number | Date)[];
|
|
71
|
-
tickSpacing: number;
|
|
72
|
-
base?: number;
|
|
73
|
-
sort?: ChannelAccessor | ((a: RawValue, b: RawValue) => number) | {
|
|
74
|
-
channel: string;
|
|
75
|
-
order: 'ascending' | 'descending';
|
|
76
|
-
};
|
|
77
|
-
constant?: number;
|
|
78
|
-
};
|
|
79
|
-
export type ColorScaleOptions = ScaleOptions & {
|
|
80
|
-
legend: boolean;
|
|
81
|
-
type: ScaleType | 'categorical' | 'sequential' | 'cyclical' | 'threshold' | 'quantile' | 'quantize' | 'diverging' | 'diverging-log' | 'diverging-pow' | 'diverging-sqrt' | 'diverging-symlog';
|
|
82
|
-
scheme: string;
|
|
83
|
-
/**
|
|
84
|
-
* fallback color used for null/undefined
|
|
85
|
-
*/
|
|
86
|
-
unknown: string;
|
|
87
|
-
/**
|
|
88
|
-
* center value for diverging scales
|
|
89
|
-
*/
|
|
90
|
-
pivot: number;
|
|
91
|
-
/**
|
|
92
|
-
* number of colors for quantize and quantile-threshold scales
|
|
93
|
-
*/
|
|
94
|
-
n: number;
|
|
95
|
-
interpolate: (d: any) => typeof d;
|
|
96
|
-
/**
|
|
97
|
-
* The tick format for the color scale legend.
|
|
98
|
-
*/
|
|
99
|
-
tickFormat: false | Intl.NumberFormatOptions | ((d: RawValue) => string);
|
|
100
|
-
};
|
|
101
|
-
export type AxisXAnchor = 'bottom' | 'top' | 'both';
|
|
102
|
-
export type AxisYAnchor = 'left' | 'right' | 'both';
|
|
103
|
-
export type XScaleOptions = ScaleOptions & {
|
|
104
|
-
/**
|
|
105
|
-
* Activate the implicit GridX mark. For more control over the grid styling
|
|
106
|
-
* and layering, add an explicit GridX mark to your plot instead of using the
|
|
107
|
-
* implicit grids.
|
|
108
|
-
*/
|
|
109
|
-
grid: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Controls the position of the implicit AxisX mark, or set to false to disable
|
|
112
|
-
* the implicit AxisX mark. For more control over the axis styling and layering
|
|
113
|
-
* add an explicit AxisX mark to your plot instead of using the implicit axes.
|
|
114
|
-
*/
|
|
115
|
-
axis: AxisXAnchor | false;
|
|
116
|
-
/**
|
|
117
|
-
* rotate the axis ticks
|
|
118
|
-
*/
|
|
119
|
-
tickRotate: number;
|
|
120
|
-
labelAnchor: 'auto' | 'left' | 'center' | 'right';
|
|
121
|
-
tickFormat: false | Intl.NumberFormatOptions | ((d: RawValue) => string);
|
|
122
|
-
};
|
|
123
|
-
export type YScaleOptions = ScaleOptions & {
|
|
124
|
-
/**
|
|
125
|
-
* Activate the implicit GridY mark. For more control over the grid styling
|
|
126
|
-
* and layering, add an explicit GridY mark to your plot instead of using the
|
|
127
|
-
* implicit grids.
|
|
128
|
-
*/
|
|
129
|
-
grid: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Controls the position of the implicit AxisY mark, or set to false to disable
|
|
132
|
-
* the implicit AxisY mark. For more control over the axis styling and layering
|
|
133
|
-
* add an explicit AxisY mark to your plot instead of using the implicit axes.
|
|
134
|
-
*/
|
|
135
|
-
axis: AxisYAnchor | false;
|
|
136
|
-
tickFormat: false | Intl.NumberFormatOptions | ((d: RawValue) => string);
|
|
137
|
-
/**
|
|
138
|
-
* rotate the axis ticks
|
|
139
|
-
*/
|
|
140
|
-
tickRotate: number;
|
|
141
|
-
labelAnchor: 'auto' | 'bottom' | 'middle' | 'top';
|
|
142
|
-
};
|
|
143
|
-
export type LegendScaleOptions = ScaleOptions & {
|
|
144
|
-
legend: boolean;
|
|
145
|
-
};
|
|
146
|
-
export type PlotOptions = {
|
|
147
|
-
/**
|
|
148
|
-
* The plot title, rendered as H2 tag above the SVG element. Instead of
|
|
149
|
-
* using the title, you can also pass a "header" snippet and render your
|
|
150
|
-
* own custom title markup.
|
|
151
|
-
*/
|
|
152
|
-
title: string;
|
|
153
|
-
/**
|
|
154
|
-
* The plot subtitle, rendered as H3 tag above the SVG element. Instead of
|
|
155
|
-
* using the subtitle, you can also pass a "header" snippet and render your
|
|
156
|
-
* own custom title markup.
|
|
157
|
-
*/
|
|
158
|
-
subtitle: string;
|
|
159
|
-
/**
|
|
160
|
-
* The plot caption, rendered as FIGCAPTION tag below the SVG element. Instead of
|
|
161
|
-
* using the caption, you can also pass a "footer" snippet and render your
|
|
162
|
-
* own custom title markup.
|
|
163
|
-
*/
|
|
164
|
-
caption: string;
|
|
165
|
-
/**
|
|
166
|
-
* By default, the plot will extend to fit 100% of the parent container width. By
|
|
167
|
-
* setting the maxWidth style property you can limit the width of your plot.
|
|
168
|
-
*/
|
|
169
|
-
maxWidth?: string;
|
|
170
|
-
/**
|
|
171
|
-
* force the plot into a fixed width
|
|
172
|
-
*/
|
|
173
|
-
width?: number;
|
|
174
|
-
/**
|
|
175
|
-
* force the plot into a fixed height
|
|
176
|
-
*/
|
|
177
|
-
height: 'auto' | number | ((d: number) => number);
|
|
178
|
-
/**
|
|
179
|
-
* Convenience option for setting all four margins at once, in px.
|
|
180
|
-
*/
|
|
181
|
-
margin: number | {
|
|
182
|
-
top?: number;
|
|
183
|
-
right?: number;
|
|
184
|
-
bottom?: number;
|
|
185
|
-
left?: number;
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Left margin of the plot, in px.
|
|
189
|
-
*/
|
|
190
|
-
marginLeft: number;
|
|
191
|
-
/**
|
|
192
|
-
* Right margin of the plot, in px.
|
|
193
|
-
*/
|
|
194
|
-
marginRight: number;
|
|
195
|
-
/**
|
|
196
|
-
* Top margin of the plot, in px.
|
|
197
|
-
*/
|
|
198
|
-
marginTop: number;
|
|
199
|
-
/**
|
|
200
|
-
* Bottom margin of the plot, in px.
|
|
201
|
-
*/
|
|
202
|
-
marginBottom: number;
|
|
203
|
-
/**
|
|
204
|
-
* Activates the implicit GridX and GridY marks.
|
|
205
|
-
*/
|
|
206
|
-
grid: boolean;
|
|
207
|
-
/**
|
|
208
|
-
* Activates the implicit AxisX and AxisY marks.
|
|
209
|
-
*/
|
|
210
|
-
axes: boolean;
|
|
211
|
-
/**
|
|
212
|
-
* Activates the implicit frame marks
|
|
213
|
-
*/
|
|
214
|
-
frame: boolean;
|
|
215
|
-
/**
|
|
216
|
-
* Convenience shortcut for setting both the x and y scale insets.
|
|
217
|
-
*/
|
|
218
|
-
inset: number;
|
|
219
|
-
/**
|
|
220
|
-
* Convenience shortcut for setting both the x and y scale paddings
|
|
221
|
-
*/
|
|
222
|
-
padding: number;
|
|
223
|
-
/**
|
|
224
|
-
* Geo-projection
|
|
225
|
-
*/
|
|
226
|
-
projection: string | null | {
|
|
227
|
-
type?: string;
|
|
228
|
-
rotate?: [number, number] | [number, number, number];
|
|
229
|
-
domain?: object;
|
|
230
|
-
inset?: number;
|
|
231
|
-
clip?: Clip;
|
|
232
|
-
} | {
|
|
233
|
-
type: (d: {
|
|
234
|
-
width: number;
|
|
235
|
-
height: number;
|
|
236
|
-
}) => GeoProjection;
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* if not null, computes a default height such that a variation of one
|
|
240
|
-
* unit in the x dimension is represented by the corresponding number
|
|
241
|
-
* of pixels as a variation in the y dimension of one unit.
|
|
242
|
-
*/
|
|
243
|
-
aspectRatio: number | null;
|
|
244
|
-
/**
|
|
245
|
-
* Top-level faceting options
|
|
246
|
-
*/
|
|
247
|
-
facet: Partial<{
|
|
248
|
-
/**
|
|
249
|
-
* The data to facet by. Turns on automatic faceting for all marks that
|
|
250
|
-
* use the exact same data (===)
|
|
251
|
-
*/
|
|
252
|
-
data: DataRecord<any>[];
|
|
253
|
-
x: ChannelAccessor;
|
|
254
|
-
y: ChannelAccessor;
|
|
255
|
-
}>;
|
|
256
|
-
/**
|
|
257
|
-
* Options for the shared x scale.
|
|
258
|
-
*/
|
|
259
|
-
x: Partial<XScaleOptions>;
|
|
260
|
-
/**
|
|
261
|
-
* Options for the shared y scale
|
|
262
|
-
*/
|
|
263
|
-
y: Partial<YScaleOptions>;
|
|
264
|
-
/**
|
|
265
|
-
* Options for the shared radius scale
|
|
266
|
-
*/
|
|
267
|
-
r: Partial<ScaleOptions>;
|
|
268
|
-
color: Partial<ColorScaleOptions>;
|
|
269
|
-
opacity: Partial<ScaleOptions>;
|
|
270
|
-
symbol: Partial<LegendScaleOptions>;
|
|
271
|
-
length: Partial<ScaleOptions>;
|
|
272
|
-
fx: Partial<ScaleOptions>;
|
|
273
|
-
fy: Partial<ScaleOptions>;
|
|
274
|
-
children: Snippet<[
|
|
275
|
-
{
|
|
276
|
-
width: number;
|
|
277
|
-
height: number;
|
|
278
|
-
options: PlotOptions;
|
|
279
|
-
scales: PlotScales;
|
|
280
|
-
}
|
|
281
|
-
]>;
|
|
282
|
-
/**
|
|
283
|
-
* You can use the header snippet to render a custom title and subtitle for
|
|
284
|
-
* your plot, or place a legend above the visualization.
|
|
285
|
-
*/
|
|
286
|
-
header: Snippet;
|
|
287
|
-
footer: Snippet;
|
|
288
|
-
/**
|
|
289
|
-
* The underlay snippet is useful for adding a layer of custom HTML markup
|
|
290
|
-
* behind the SVG body of your plot, e.g. for a watermark or background image.
|
|
291
|
-
*/
|
|
292
|
-
underlay: Snippet<[PlotOptions]>;
|
|
293
|
-
/**
|
|
294
|
-
* The overlay snippet is useful for adding a layer of custom HTML markup
|
|
295
|
-
* in front of the SVG body of your plot, e.g. for HTML tooltips.
|
|
296
|
-
*/
|
|
297
|
-
overlay: Snippet;
|
|
298
|
-
facetAxes: Snippet;
|
|
299
|
-
/**
|
|
300
|
-
* if you set testid, the plot container will get a data-testid attribute which
|
|
301
|
-
* can be useful for automatic testing
|
|
302
|
-
*/
|
|
303
|
-
testid: string;
|
|
304
|
-
/**
|
|
305
|
-
* in case you want to give your Plot element an extra CSS class
|
|
306
|
-
*/
|
|
307
|
-
class: string | null;
|
|
308
|
-
/**
|
|
309
|
-
* if set to true, the plot will use the implicit scales
|
|
310
|
-
*/
|
|
311
|
-
implicitScales: boolean;
|
|
312
|
-
/**
|
|
313
|
-
* locale used for automatic axis ticks
|
|
314
|
-
*/
|
|
315
|
-
locale: string;
|
|
316
|
-
/**
|
|
317
|
-
* pass a @emotion/css function to style plot using dynamic classes
|
|
318
|
-
*/
|
|
319
|
-
css: (d: string) => string | undefined;
|
|
320
|
-
};
|
|
321
|
-
export type GenericMarkOptions = Record<string | symbol, any>;
|
|
322
|
-
export type DataRecord<T = Record<string | symbol, RawValue>> = T & {
|
|
323
|
-
___orig___?: RawValue | [RawValue, RawValue];
|
|
324
|
-
};
|
|
325
|
-
export type ResolvedDataRecord<T = Record<string | symbol, RawValue>> = Partial<Record<ScaledChannelName, any>> & {
|
|
326
|
-
datum: DataRecord<T>;
|
|
327
|
-
};
|
|
328
|
-
export type ScaledDataRecord<T = Record<string | symbol, RawValue>> = Partial<Record<ScaledChannelName, number | string | boolean | undefined>> & {
|
|
329
|
-
datum: DataRecord<T>;
|
|
330
|
-
valid: Boolean;
|
|
331
|
-
};
|
|
332
|
-
export type DataRow<T = Record<string | symbol, RawValue>> = DataRecord<T> | RawValue | [number, number] | null;
|
|
333
|
-
export type PlotScale = {
|
|
334
|
-
type: ScaleType;
|
|
335
|
-
domain: RawValue[];
|
|
336
|
-
range: RawValue[];
|
|
337
|
-
autoTitle?: string;
|
|
338
|
-
/**
|
|
339
|
-
* The number of marks that are using this scale.
|
|
340
|
-
*/
|
|
341
|
-
manualActiveMarks: number;
|
|
342
|
-
/**
|
|
343
|
-
* Set of accessors used in channels that are bound to this scale.
|
|
344
|
-
*/
|
|
345
|
-
uniqueScaleProps: Set<ChannelAccessor>;
|
|
346
|
-
skip: Map<ScaledChannelName, Set<symbol>>;
|
|
347
|
-
fn: ScaleLinear<RawValue, number> & ScaleBand<RawValue> & ScaleOrdinal<string | Date, number> & ScaleOrdinal<string | Date, string>;
|
|
348
|
-
};
|
|
349
|
-
export type CurveName = 'basis' | 'basis-closed' | 'basis-open' | 'bundle' | 'bump-x' | 'bump-y' | 'cardinal' | 'cardinal-closed' | 'cardinal-open' | 'catmull-rom' | 'catmull-rom-closed' | 'catmull-rom-open' | 'linear' | 'linear-closed' | 'monotone-x' | 'monotone-y' | 'natural' | 'step' | 'step-after' | 'step-before';
|
|
350
|
-
export type MarkerOptions = {
|
|
351
|
-
/**
|
|
352
|
-
* the marker for the starting point of a line segment
|
|
353
|
-
*/
|
|
354
|
-
markerStart?: boolean | MarkerShape | Snippet;
|
|
355
|
-
/**
|
|
356
|
-
* the marker for any intermediate point of a line segment
|
|
357
|
-
*/
|
|
358
|
-
markerMid?: boolean | MarkerShape | Snippet;
|
|
359
|
-
/**
|
|
360
|
-
* the marker for the end point of a line segment
|
|
361
|
-
*/
|
|
362
|
-
markerEnd?: boolean | MarkerShape | Snippet;
|
|
363
|
-
/**
|
|
364
|
-
* shorthand for setting the marker on all points
|
|
365
|
-
*/
|
|
366
|
-
marker?: boolean | MarkerShape | Snippet;
|
|
367
|
-
};
|
|
368
|
-
export type PlotScales = Record<ScaleName, PlotScale>;
|
|
369
|
-
export type ChannelAccessor<T = Record<string | symbol, RawValue>> = ChannelValue<T> | {
|
|
370
|
-
/** the channel value */
|
|
371
|
-
value: ChannelValue<T>;
|
|
372
|
-
/** you can bypass the scale by passing null */
|
|
373
|
-
scale: boolean | null;
|
|
374
|
-
};
|
|
375
|
-
export type ChannelValue<T = Record<string | symbol, RawValue>> = RawValue | keyof T | ((d: T) => RawValue) | null | undefined;
|
|
376
|
-
export type ConstantAccessor<T, D = Record<string | symbol, RawValue>> = T | ((d: D) => T) | null | undefined;
|
|
377
|
-
export type PlotState = {
|
|
378
|
-
width: number;
|
|
379
|
-
height: number;
|
|
380
|
-
options: PlotOptions;
|
|
381
|
-
facetWidth: number;
|
|
382
|
-
facetHeight: number;
|
|
383
|
-
plotWidth: number;
|
|
384
|
-
plotHeight: number;
|
|
385
|
-
scales: PlotScales;
|
|
386
|
-
body: HTMLDivElement;
|
|
387
|
-
/**
|
|
388
|
-
* True if there's a color scale and a symbol scale and both are bound to the same
|
|
389
|
-
* single channel accessor.
|
|
390
|
-
*/
|
|
391
|
-
colorSymbolRedundant: boolean;
|
|
392
|
-
/**
|
|
393
|
-
* True if the plot is using filled dot marks.
|
|
394
|
-
*/
|
|
395
|
-
hasFilledDotMarks: boolean;
|
|
396
|
-
css: ((d: string) => string) | null;
|
|
397
|
-
};
|
|
398
|
-
export type PlotContext = {
|
|
399
|
-
/**
|
|
400
|
-
* Registers a mark with the Plot component along with its
|
|
401
|
-
* data and the channel mappings.
|
|
402
|
-
*/
|
|
403
|
-
addMark: (mark: Mark<GenericMarkOptions>) => Mark<GenericMarkOptions>;
|
|
404
|
-
/**
|
|
405
|
-
* Updates a mark after either the data or the channel mappings
|
|
406
|
-
* have been updated.
|
|
407
|
-
*/
|
|
408
|
-
updateMark: (mark: Mark<GenericMarkOptions>) => void;
|
|
409
|
-
/**
|
|
410
|
-
* Unregister a mark from the Plot component after the mark
|
|
411
|
-
* component has been destroyed.
|
|
412
|
-
*/
|
|
413
|
-
removeMark: (mark: Mark<GenericMarkOptions>) => void;
|
|
414
|
-
getPlotState: () => PlotState;
|
|
415
|
-
getTopLevelFacet: () => PlotOptions['facet'];
|
|
416
|
-
/**
|
|
417
|
-
* Updates the plots internal facetWidth and facetHeight dimensions
|
|
418
|
-
* which are used as range for the positional scales x and y.
|
|
419
|
-
*/
|
|
420
|
-
updateDimensions: (width: number, height: number) => void;
|
|
421
|
-
};
|
|
422
|
-
type FacetState = {
|
|
423
|
-
fx: RawValue;
|
|
424
|
-
fy: RawValue;
|
|
425
|
-
/**
|
|
426
|
-
* True, if the facet is the leftmost in its row
|
|
427
|
-
*/
|
|
428
|
-
left: boolean;
|
|
429
|
-
/**
|
|
430
|
-
* True, if the facet is the topmost in its column
|
|
431
|
-
*/
|
|
432
|
-
top: boolean;
|
|
433
|
-
/**
|
|
434
|
-
* True, if the facet is the rightmost in its row
|
|
435
|
-
*/
|
|
436
|
-
right: boolean;
|
|
437
|
-
/**
|
|
438
|
-
* True, if the facet is the bottommost in its column
|
|
439
|
-
*/
|
|
440
|
-
bottom: boolean;
|
|
441
|
-
/**
|
|
442
|
-
* True, if the adjacent facet to the top is empty
|
|
443
|
-
*/
|
|
444
|
-
topEmpty: boolean;
|
|
445
|
-
/**
|
|
446
|
-
* True, if the adjacent facet to the bottom is empty
|
|
447
|
-
*/
|
|
448
|
-
bottomEmpty: boolean;
|
|
449
|
-
/**
|
|
450
|
-
* True, if the adjacent facet to the left is empty
|
|
451
|
-
*/
|
|
452
|
-
leftEmpty: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* True, if the adjacent facet to the right is empty
|
|
455
|
-
*/
|
|
456
|
-
rightEmpty: boolean;
|
|
457
|
-
};
|
|
458
|
-
/**
|
|
459
|
-
* Test if the given data record is visible in the current facet.
|
|
460
|
-
*/
|
|
461
|
-
type TestFacetFunction = (datum: DataRecord<any>, channels: Record<ChannelName, ChannelAccessor>) => boolean;
|
|
462
|
-
export type FacetContext = {
|
|
463
|
-
/**
|
|
464
|
-
* Returns a stateful function that tests whether a specific data
|
|
465
|
-
* record is visible in the current facet or not.
|
|
466
|
-
*/
|
|
467
|
-
getTestFacet: () => TestFacetFunction;
|
|
468
|
-
getFacetState: () => FacetState;
|
|
469
|
-
};
|
|
470
|
-
export type LinkableMarkProps<T> = {
|
|
471
|
-
/**
|
|
472
|
-
* if set, the mark element will be wrapped in a <a> link element
|
|
473
|
-
*/
|
|
474
|
-
href?: ConstantAccessor<string, T>;
|
|
475
|
-
/**
|
|
476
|
-
* the relationship of the target object to the link object (e.g. "noopener")
|
|
477
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#rel
|
|
478
|
-
*/
|
|
479
|
-
rel?: ConstantAccessor<string, T>;
|
|
480
|
-
/**
|
|
481
|
-
* the link target mime type, e.g. "text/csv"
|
|
482
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#type
|
|
483
|
-
*/
|
|
484
|
-
type?: ConstantAccessor<string, T>;
|
|
485
|
-
/**
|
|
486
|
-
* the target of the link, e.g. "_blank" or "_self"
|
|
487
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target
|
|
488
|
-
*/
|
|
489
|
-
target?: ConstantAccessor<'_self' | '_blank' | '_parent' | '_top' | string, T>;
|
|
490
|
-
/**
|
|
491
|
-
* if set to true, the link will be downloaded instead of navigating to it
|
|
492
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download
|
|
493
|
-
*/
|
|
494
|
-
download?: ConstantAccessor<boolean, T>;
|
|
495
|
-
[key: `data-sveltekit-${string}`]: string | boolean | undefined;
|
|
496
|
-
};
|
|
497
|
-
export type BaseMarkProps<T> = Partial<{
|
|
498
|
-
/**
|
|
499
|
-
* Filter the data without modifying the inferred scales
|
|
500
|
-
*/
|
|
501
|
-
filter?: ConstantAccessor<boolean, T>;
|
|
502
|
-
facet?: 'auto' | 'include' | 'exclude';
|
|
503
|
-
fx: ChannelAccessor<T>;
|
|
504
|
-
fy: ChannelAccessor<T>;
|
|
505
|
-
dx: ConstantAccessor<number, T>;
|
|
506
|
-
dy: ConstantAccessor<number, T>;
|
|
507
|
-
fill: ChannelAccessor<T>;
|
|
508
|
-
fillOpacity: ConstantAccessor<number, T>;
|
|
509
|
-
sort: string | ConstantAccessor<RawValue, T> | ((a: RawValue, b: RawValue) => number) | {
|
|
510
|
-
/** sort data using an already defined channel */
|
|
511
|
-
channel: string;
|
|
512
|
-
/** sort order */
|
|
513
|
-
order?: 'ascending' | 'descending';
|
|
514
|
-
};
|
|
515
|
-
stroke: ChannelAccessor<T>;
|
|
516
|
-
strokeWidth: ConstantAccessor<number, T>;
|
|
517
|
-
strokeOpacity: ConstantAccessor<number, T>;
|
|
518
|
-
strokeLinejoin: ConstantAccessor<CSS.Property.StrokeLinejoin, T>;
|
|
519
|
-
strokeLinecap: ConstantAccessor<CSS.Property.StrokeLinecap, T>;
|
|
520
|
-
strokeMiterlimit: ConstantAccessor<number, T>;
|
|
521
|
-
opacity: ChannelAccessor<T>;
|
|
522
|
-
strokeDasharray: ConstantAccessor<string, T>;
|
|
523
|
-
strokeDashoffset: ConstantAccessor<number, T>;
|
|
524
|
-
mixBlendMode: ConstantAccessor<CSS.Property.MixBlendMode, T>;
|
|
525
|
-
clipPath: string;
|
|
526
|
-
imageFilter: ConstantAccessor<string, T>;
|
|
527
|
-
shapeRendering: ConstantAccessor<CSS.Property.ShapeRendering, T>;
|
|
528
|
-
paintOrder: ConstantAccessor<string, T>;
|
|
529
|
-
onclick?: MouseEventHandler<SVGPathElement>;
|
|
530
|
-
ondblclick?: MouseEventHandler<SVGPathElement>;
|
|
531
|
-
onmouseup?: MouseEventHandler<SVGPathElement>;
|
|
532
|
-
onmousedown?: MouseEventHandler<SVGPathElement>;
|
|
533
|
-
onmouseenter?: MouseEventHandler<SVGPathElement>;
|
|
534
|
-
onmousemove?: MouseEventHandler<SVGPathElement>;
|
|
535
|
-
onmouseleave?: MouseEventHandler<SVGPathElement>;
|
|
536
|
-
onmouseout?: MouseEventHandler<SVGPathElement>;
|
|
537
|
-
onmouseover?: MouseEventHandler<SVGPathElement>;
|
|
538
|
-
onpointercancel?: MouseEventHandler<SVGPathElement>;
|
|
539
|
-
onpointerdown?: MouseEventHandler<SVGPathElement>;
|
|
540
|
-
onpointerup?: MouseEventHandler<SVGPathElement>;
|
|
541
|
-
onpointerenter?: MouseEventHandler<SVGPathElement>;
|
|
542
|
-
onpointerleave?: MouseEventHandler<SVGPathElement>;
|
|
543
|
-
onpointermove?: MouseEventHandler<SVGPathElement>;
|
|
544
|
-
onpointerover?: MouseEventHandler<SVGPathElement>;
|
|
545
|
-
onpointerout?: MouseEventHandler<SVGPathElement>;
|
|
546
|
-
ondrag?: MouseEventHandler<SVGPathElement>;
|
|
547
|
-
ondrop?: MouseEventHandler<SVGPathElement>;
|
|
548
|
-
ondragstart?: MouseEventHandler<SVGPathElement>;
|
|
549
|
-
ondragenter?: MouseEventHandler<SVGPathElement>;
|
|
550
|
-
ondragleave?: MouseEventHandler<SVGPathElement>;
|
|
551
|
-
ondragover?: MouseEventHandler<SVGPathElement>;
|
|
552
|
-
ondragend?: MouseEventHandler<SVGPathElement>;
|
|
553
|
-
ontouchstart?: MouseEventHandler<SVGPathElement>;
|
|
554
|
-
ontouchmove?: MouseEventHandler<SVGPathElement>;
|
|
555
|
-
ontouchend?: MouseEventHandler<SVGPathElement>;
|
|
556
|
-
ontouchcancel?: MouseEventHandler<SVGPathElement>;
|
|
557
|
-
oncontextmenu?: MouseEventHandler<SVGPathElement>;
|
|
558
|
-
onwheel?: MouseEventHandler<SVGPathElement>;
|
|
559
|
-
/**
|
|
560
|
-
* if you want to give your mark element an extra CSS class
|
|
561
|
-
*/
|
|
562
|
-
class: string | null;
|
|
563
|
-
cursor: ConstantAccessor<CSS.Property.Cursor, T>;
|
|
564
|
-
}>;
|
|
565
|
-
export type BorderRadius = number | {
|
|
566
|
-
topLeft?: number;
|
|
567
|
-
topRight?: number;
|
|
568
|
-
bottomRight?: number;
|
|
569
|
-
bottomLeft?: number;
|
|
570
|
-
};
|
|
571
|
-
export type BaseRectMarkProps<T> = {
|
|
572
|
-
inset?: ConstantAccessor<number, T>;
|
|
573
|
-
insetLeft?: ConstantAccessor<number, T>;
|
|
574
|
-
insetTop?: ConstantAccessor<number, T>;
|
|
575
|
-
insetRight?: ConstantAccessor<number, T>;
|
|
576
|
-
insetBottom?: ConstantAccessor<number, T>;
|
|
577
|
-
borderRadius?: BorderRadius;
|
|
578
|
-
};
|
|
579
|
-
export type Channels<T> = Record<string, ChannelAccessor<T> | ConstantAccessor<string | number | boolean | symbol, T>>;
|
|
580
|
-
export type TransformArg<T> = Channels<T> & BaseMarkProps<T> & {
|
|
581
|
-
data: T[];
|
|
582
|
-
};
|
|
583
|
-
export type MapArg<T> = Channels<T> & {
|
|
584
|
-
data: T[];
|
|
585
|
-
};
|
|
586
|
-
export type TransformArgsRow = Partial<Channels> & {
|
|
587
|
-
data: DataRow[];
|
|
588
|
-
};
|
|
589
|
-
export type TransformArgsRecord = Partial<Channels> & {
|
|
590
|
-
data: DataRecord[];
|
|
591
|
-
};
|
|
592
|
-
export type ColorScheme = 'brbg' | 'prgn' | 'piyg' | 'puor' | 'rdbu' | 'rdgy' | 'rdylbu' | 'rdylgn' | 'spectral' | 'burd' | 'buylrd' | 'blues' | 'greens' | 'grays' | 'greys' | 'oranges' | 'purples' | 'reds' | 'turbo' | 'viridis' | 'magma' | 'inferno' | 'plasma' | 'cividis' | 'cubehelix' | 'warm' | 'cool' | 'bugn' | 'bupu' | 'gnbu' | 'orrd' | 'pubu' | 'pubugn' | 'purd' | 'rdpu' | 'ylgn' | 'ylgnbu' | 'ylorbr' | 'ylorrd' | 'rainbow' | 'sinebow' | 'accent' | 'category10' | 'dark2' | 'paired' | 'pastel1' | 'pastel2' | 'set1' | 'set2' | 'set3' | 'tableau10' | 'observable10';
|
|
593
|
-
export type MarkStyleProps = 'strokeDasharray' | 'strokeLinejoin' | 'strokeLinecap' | 'opacity' | 'cursor' | 'pointerEvents' | 'blend' | 'fill' | 'fillOpacity' | 'fontWeight' | 'fontVariant' | 'fontSize' | 'fontStyle' | 'stroke' | 'strokeWidth' | 'strokeOpacity' | 'x' | 'y' | 'clipPath' | 'mask' | 'filter' | 'angle' | 'radius' | 'symbol' | 'textAnchor' | 'width';
|
|
594
|
-
export type AutoMarginStores = {
|
|
595
|
-
autoMarginTop: Writable<Map<string, number>>;
|
|
596
|
-
autoMarginLeft: Writable<Map<string, number>>;
|
|
597
|
-
autoMarginRight: Writable<Map<string, number>>;
|
|
598
|
-
autoMarginBottom: Writable<Map<string, number>>;
|
|
599
|
-
};
|
|
600
|
-
type IgnoreDefaults = 'data' | 'facet' | ChannelName | 'title' | 'automatic' | 'children';
|
|
601
|
-
/**
|
|
602
|
-
* these are the default options for the plot marks that can be set using
|
|
603
|
-
* the 'svelteplot/defaults' context.
|
|
604
|
-
*/
|
|
605
|
-
export type PlotDefaults = {
|
|
606
|
-
/**
|
|
607
|
-
* default plot height
|
|
608
|
-
*/
|
|
609
|
-
height: number;
|
|
610
|
-
/**
|
|
611
|
-
* default plot inset
|
|
612
|
-
*/
|
|
613
|
-
inset: number;
|
|
614
|
-
/**
|
|
615
|
-
* default color scheme
|
|
616
|
-
*/
|
|
617
|
-
colorScheme: ColorScheme;
|
|
618
|
-
categoricalColorScheme: ColorScheme | string[];
|
|
619
|
-
/**
|
|
620
|
-
* fallback color to be used for null/NA
|
|
621
|
-
*/
|
|
622
|
-
unknown: string;
|
|
623
|
-
/**
|
|
624
|
-
* optional @emotion/css function to style the plot
|
|
625
|
-
*/
|
|
626
|
-
css: (d: string) => string | undefined;
|
|
627
|
-
/**
|
|
628
|
-
* for computing the automatic height based on the number of
|
|
629
|
-
* domain items in a point scale
|
|
630
|
-
*/
|
|
631
|
-
pointScaleHeight: number;
|
|
632
|
-
/**
|
|
633
|
-
* for computing the automatic height based on the number of
|
|
634
|
-
* domain items in a band scale
|
|
635
|
-
*/
|
|
636
|
-
bandScaleHeight: number;
|
|
637
|
-
/**
|
|
638
|
-
* initial width of the plot before measuring the actual width
|
|
639
|
-
*/
|
|
640
|
-
initialWidth: number;
|
|
641
|
-
/**
|
|
642
|
-
* locale, used for automatic axis ticks
|
|
643
|
-
*/
|
|
644
|
-
locale: string;
|
|
645
|
-
/**
|
|
646
|
-
* default number format for axis ticks
|
|
647
|
-
*/
|
|
648
|
-
numberFormat: Intl.NumberFormatOptions;
|
|
649
|
-
/**
|
|
650
|
-
* default dot radius for line markers, used in dot, circle, and circle-stroke markers
|
|
651
|
-
*/
|
|
652
|
-
markerDotRadius: number;
|
|
653
|
-
/**
|
|
654
|
-
* default props for area marks, applied to area, areaX, and areaY marks
|
|
655
|
-
*/
|
|
656
|
-
area: Partial<Omit<ComponentProps<typeof Area>, IgnoreDefaults>>;
|
|
657
|
-
/**
|
|
658
|
-
* default props for areaX marks
|
|
659
|
-
*/
|
|
660
|
-
areaX: Partial<Omit<ComponentProps<typeof AreaX>, IgnoreDefaults>>;
|
|
661
|
-
/**
|
|
662
|
-
* default props for areaY marks
|
|
663
|
-
*/
|
|
664
|
-
areaY: Partial<Omit<ComponentProps<typeof AreaY>, IgnoreDefaults>>;
|
|
665
|
-
/**
|
|
666
|
-
* default props for arrow marks
|
|
667
|
-
*/
|
|
668
|
-
arrow: Partial<Omit<ComponentProps<typeof Arrow>, IgnoreDefaults>>;
|
|
669
|
-
/**
|
|
670
|
-
* default props for axis marks, applied to both axisX and axisY marks
|
|
671
|
-
*/
|
|
672
|
-
axis: Partial<Omit<ComponentProps<typeof AxisX>, 'data' | 'facet' | ChannelName | 'facetAnchor' | 'labelAnchor' | 'anchor'> & {
|
|
673
|
-
implicit: boolean;
|
|
674
|
-
}>;
|
|
675
|
-
/**
|
|
676
|
-
* default props for axisX marks
|
|
677
|
-
*/
|
|
678
|
-
axisX: Partial<Omit<ComponentProps<typeof AxisX>, IgnoreDefaults> & {
|
|
679
|
-
implicit: boolean;
|
|
680
|
-
}>;
|
|
681
|
-
/**
|
|
682
|
-
* default props for axisY marks
|
|
683
|
-
*/
|
|
684
|
-
axisY: Partial<Omit<ComponentProps<typeof AxisY>, IgnoreDefaults> & {
|
|
685
|
-
implicit: boolean;
|
|
686
|
-
}>;
|
|
687
|
-
/**
|
|
688
|
-
* default props for bar marks, applied to both barX and barY marks
|
|
689
|
-
*/
|
|
690
|
-
bar: Partial<Omit<ComponentProps<typeof BarX>, IgnoreDefaults>>;
|
|
691
|
-
/**
|
|
692
|
-
* default props for barX marks
|
|
693
|
-
*/
|
|
694
|
-
barX: Partial<Omit<ComponentProps<typeof BarX>, IgnoreDefaults>>;
|
|
695
|
-
/**
|
|
696
|
-
* default props for barY marks
|
|
697
|
-
*/
|
|
698
|
-
barY: Partial<Omit<ComponentProps<typeof BarY>, IgnoreDefaults>>;
|
|
699
|
-
/**
|
|
700
|
-
* default props for box marks, applied to boxX and boxY marks
|
|
701
|
-
*/
|
|
702
|
-
box: Partial<Omit<ComponentProps<typeof BoxX>, IgnoreDefaults>>;
|
|
703
|
-
/**
|
|
704
|
-
* default props for boxX marks
|
|
705
|
-
*/
|
|
706
|
-
boxX: Partial<Omit<ComponentProps<typeof BoxX>, IgnoreDefaults>>;
|
|
707
|
-
/**
|
|
708
|
-
* default props for boxY marks
|
|
709
|
-
*/
|
|
710
|
-
boxY: Partial<Omit<ComponentProps<typeof BoxY>, IgnoreDefaults>>;
|
|
711
|
-
/**
|
|
712
|
-
* default props for brush marks, applied to brush, brushX and brushY marks
|
|
713
|
-
*/
|
|
714
|
-
brush: Partial<Omit<ComponentProps<typeof Brush>, IgnoreDefaults | 'limitDimension'>>;
|
|
715
|
-
/**
|
|
716
|
-
* default props for brushX marks
|
|
717
|
-
*/
|
|
718
|
-
brushX: Partial<Omit<ComponentProps<typeof BrushX>, IgnoreDefaults>>;
|
|
719
|
-
/**
|
|
720
|
-
* default props for brushY marks
|
|
721
|
-
*/
|
|
722
|
-
brushY: Partial<Omit<ComponentProps<typeof BrushY>, IgnoreDefaults>>;
|
|
723
|
-
/**
|
|
724
|
-
* default props for cell marks
|
|
725
|
-
*/
|
|
726
|
-
cell: Partial<Omit<ComponentProps<typeof Cell>, IgnoreDefaults>>;
|
|
727
|
-
/**
|
|
728
|
-
* default props for dot marks
|
|
729
|
-
*/
|
|
730
|
-
dot: Partial<Omit<ComponentProps<typeof Dot>, IgnoreDefaults>>;
|
|
731
|
-
/**
|
|
732
|
-
* default props for frame marks
|
|
733
|
-
*/
|
|
734
|
-
frame: Partial<ComponentProps<typeof Frame> & {
|
|
735
|
-
implicit: boolean;
|
|
736
|
-
}>;
|
|
737
|
-
/**
|
|
738
|
-
* default props for geo marks
|
|
739
|
-
*/
|
|
740
|
-
geo: Partial<Omit<ComponentProps<typeof Geo>, IgnoreDefaults>>;
|
|
741
|
-
/**
|
|
742
|
-
* default props for graticule marks
|
|
743
|
-
*/
|
|
744
|
-
graticule: Partial<Omit<ComponentProps<typeof Graticule>, IgnoreDefaults>>;
|
|
745
|
-
/**
|
|
746
|
-
* default props for grid marks, applied to both gridX and gridY marks
|
|
747
|
-
*/
|
|
748
|
-
grid: Partial<Omit<ComponentProps<typeof GridX>, IgnoreDefaults> & {
|
|
749
|
-
implicit: boolean;
|
|
750
|
-
}>;
|
|
751
|
-
/**
|
|
752
|
-
* default props for gridX marks
|
|
753
|
-
*/
|
|
754
|
-
gridX: Partial<Omit<ComponentProps<typeof GridX>, IgnoreDefaults> & {
|
|
755
|
-
implicit: boolean;
|
|
756
|
-
}>;
|
|
757
|
-
/**
|
|
758
|
-
* default props for gridY marks
|
|
759
|
-
*/
|
|
760
|
-
gridY: Partial<Omit<ComponentProps<typeof GridY>, IgnoreDefaults> & {
|
|
761
|
-
implicit: boolean;
|
|
762
|
-
}>;
|
|
763
|
-
/**
|
|
764
|
-
* default props for line marks
|
|
765
|
-
*/
|
|
766
|
-
line: Partial<Omit<ComponentProps<typeof Line>, IgnoreDefaults>>;
|
|
767
|
-
/**
|
|
768
|
-
* default props for link marks
|
|
769
|
-
*/
|
|
770
|
-
link: Partial<Omit<ComponentProps<typeof Link>, IgnoreDefaults>>;
|
|
771
|
-
/**
|
|
772
|
-
* default props for pointer marks
|
|
773
|
-
*/
|
|
774
|
-
pointer: Partial<Omit<ComponentProps<typeof Pointer>, IgnoreDefaults>>;
|
|
775
|
-
/**
|
|
776
|
-
* default props for rect marks, applied to rect and rectX marks
|
|
777
|
-
*/
|
|
778
|
-
rect: Partial<Omit<ComponentProps<typeof Rect>, IgnoreDefaults>>;
|
|
779
|
-
/**
|
|
780
|
-
* default props for rectX marks
|
|
781
|
-
*/
|
|
782
|
-
rectX: Partial<Omit<ComponentProps<typeof RectX>, IgnoreDefaults>>;
|
|
783
|
-
/**
|
|
784
|
-
* default props for rectY marks
|
|
785
|
-
*/
|
|
786
|
-
rectY: Partial<Omit<ComponentProps<typeof RectY>, IgnoreDefaults>>;
|
|
787
|
-
/**
|
|
788
|
-
* default props for rule marks
|
|
789
|
-
*/
|
|
790
|
-
rule: Partial<Omit<ComponentProps<typeof RuleX>, IgnoreDefaults>>;
|
|
791
|
-
/**
|
|
792
|
-
* default props for rule marks
|
|
793
|
-
*/
|
|
794
|
-
ruleX: Partial<Omit<ComponentProps<typeof RuleX>, IgnoreDefaults>>;
|
|
795
|
-
/**
|
|
796
|
-
* default props for rule marks
|
|
797
|
-
*/
|
|
798
|
-
ruleY: Partial<Omit<ComponentProps<typeof RuleY>, IgnoreDefaults>>;
|
|
799
|
-
/**
|
|
800
|
-
* default props for sphere marks
|
|
801
|
-
*/
|
|
802
|
-
sphere: Partial<ComponentProps<typeof Sphere>>;
|
|
803
|
-
/**
|
|
804
|
-
* default props for spike marks
|
|
805
|
-
*/
|
|
806
|
-
spike: Partial<Omit<ComponentProps<typeof Spike>, IgnoreDefaults>>;
|
|
807
|
-
/**
|
|
808
|
-
* default props for text marks
|
|
809
|
-
*/
|
|
810
|
-
text: Partial<Omit<ComponentProps<typeof Text>, IgnoreDefaults>>;
|
|
811
|
-
/**
|
|
812
|
-
* default props for tick marks, applied to tickX and tickY marks
|
|
813
|
-
*/
|
|
814
|
-
tick: Partial<Omit<ComponentProps<typeof TickX>, IgnoreDefaults>>;
|
|
815
|
-
/**
|
|
816
|
-
* default props for tickX marks
|
|
817
|
-
*/
|
|
818
|
-
tickX: Partial<Omit<ComponentProps<typeof TickX>, IgnoreDefaults>>;
|
|
819
|
-
/**
|
|
820
|
-
* default props for tickY marks
|
|
821
|
-
*/
|
|
822
|
-
tickY: Partial<Omit<ComponentProps<typeof TickY>, IgnoreDefaults>>;
|
|
823
|
-
/**
|
|
824
|
-
* default props for vector marks
|
|
825
|
-
*/
|
|
826
|
-
vector: Partial<Omit<ComponentProps<typeof Vector>, IgnoreDefaults>>;
|
|
827
|
-
};
|
|
828
|
-
export type MapIndexObject = {
|
|
829
|
-
mapIndex: (I: number[], S: RawValue[], T: RawValue[]) => void;
|
|
830
|
-
};
|
|
831
|
-
export type MapMethod = 'cumsum' | 'rank' | 'quantile' | ((I: number[], S: number[]) => number[]) | MapIndexObject;
|
|
832
|
-
export type MapOptions = Partial<Record<ScaledChannelName, MapMethod>>;
|
|
833
|
-
export type UsedScales = Record<ScaledChannelName, boolean>;
|
|
834
|
-
export {};
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|