svelteplot 0.4.10 → 0.5.0-pr-233.1
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/Mark.svelte +87 -73
- package/dist/Mark.svelte.d.ts +39 -36
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/index.d.ts +4 -2
- package/dist/helpers/index.js +11 -0
- package/dist/helpers/scales.d.ts +1 -1
- package/dist/helpers/typeChecks.d.ts +4 -4
- package/dist/marks/Area.svelte.d.ts +39 -36
- package/dist/marks/AreaX.svelte.d.ts +40 -37
- package/dist/marks/Arrow.svelte.d.ts +39 -36
- package/dist/marks/AxisX.svelte +6 -1
- package/dist/marks/AxisX.svelte.d.ts +40 -37
- package/dist/marks/AxisY.svelte +6 -1
- package/dist/marks/AxisY.svelte.d.ts +40 -37
- package/dist/marks/BarX.svelte.d.ts +39 -36
- package/dist/marks/BarY.svelte.d.ts +39 -36
- package/dist/marks/BollingerX.svelte.d.ts +2 -74
- package/dist/marks/BollingerY.svelte.d.ts +2 -74
- package/dist/marks/BoxY.svelte.d.ts +6 -66
- package/dist/marks/Cell.svelte.d.ts +39 -36
- package/dist/marks/CustomMark.svelte.d.ts +2 -81
- package/dist/marks/CustomMarkHTML.svelte.d.ts +1 -1
- package/dist/marks/DifferenceY.svelte.d.ts +7 -67
- package/dist/marks/Dot.svelte +1 -1
- package/dist/marks/Dot.svelte.d.ts +39 -36
- package/dist/marks/DotX.svelte.d.ts +40 -37
- package/dist/marks/DotY.svelte.d.ts +40 -37
- package/dist/marks/Geo.svelte.d.ts +39 -36
- package/dist/marks/GridX.svelte +9 -2
- package/dist/marks/GridX.svelte.d.ts +39 -36
- package/dist/marks/GridY.svelte +10 -2
- package/dist/marks/GridY.svelte.d.ts +39 -36
- package/dist/marks/Line.svelte.d.ts +40 -37
- package/dist/marks/LineX.svelte.d.ts +41 -38
- package/dist/marks/LineY.svelte.d.ts +41 -38
- package/dist/marks/Link.svelte.d.ts +39 -36
- package/dist/marks/Rect.svelte.d.ts +39 -36
- package/dist/marks/RuleX.svelte.d.ts +39 -36
- package/dist/marks/RuleY.svelte.d.ts +39 -36
- package/dist/marks/Spike.svelte.d.ts +40 -37
- package/dist/marks/Text.svelte.d.ts +41 -38
- package/dist/marks/TickX.svelte.d.ts +39 -36
- package/dist/marks/TickY.svelte.d.ts +39 -36
- package/dist/marks/Vector.svelte.d.ts +39 -36
- package/dist/marks/helpers/BaseAxisX.svelte +15 -4
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +3 -1
- package/dist/marks/helpers/BaseAxisY.svelte +15 -6
- package/dist/marks/helpers/BaseAxisY.svelte.d.ts +3 -1
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +2 -160
- package/dist/marks/helpers/RectPath.svelte.d.ts +3 -63
- package/dist/transforms/bollinger.d.ts +1 -67
- package/dist/transforms/dodge.d.ts +17 -0
- package/dist/transforms/dodge.js +128 -0
- package/dist/transforms/group.d.ts +4 -12
- package/dist/transforms/interval.d.ts +2 -124
- package/dist/transforms/recordize.d.ts +1 -4
- package/dist/transforms/select.d.ts +7 -434
- package/dist/transforms/sort.d.ts +3 -246
- package/dist/transforms/stack.d.ts +3 -23
- package/dist/transforms/window.d.ts +2 -130
- package/dist/types/index.d.ts +7 -0
- package/dist/types/mark.d.ts +37 -34
- package/dist/ui/ExamplesPageList.svelte +63 -0
- package/dist/ui/ExamplesPageList.svelte.d.ts +12 -0
- package/package.json +129 -127
package/dist/Mark.svelte
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
import { testFilter, isValid } from './helpers/index.js';
|
|
42
42
|
import { resolveChannel, resolveProp } from './helpers/resolve.js';
|
|
43
43
|
import { RENAME } from './transforms/rename.js';
|
|
44
|
+
import { dodgeX, dodgeY } from './transforms/dodge.js';
|
|
44
45
|
|
|
45
46
|
let {
|
|
46
47
|
data = [],
|
|
@@ -207,85 +208,98 @@
|
|
|
207
208
|
* elements to the scales
|
|
208
209
|
*/
|
|
209
210
|
const scaledData = $derived(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
out.valid
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
211
|
+
dodge(
|
|
212
|
+
resolvedData.flatMap((row) => {
|
|
213
|
+
const out: ScaledDataRecord<Datum> = {
|
|
214
|
+
datum: row.datum,
|
|
215
|
+
index: row[INDEX],
|
|
216
|
+
valid: true
|
|
217
|
+
};
|
|
218
|
+
// compute dx/dy
|
|
219
|
+
out.dx = Number(resolveProp<number>(options.dx, out.datum, 0));
|
|
220
|
+
out.dy = Number(resolveProp<number>(options.dy, out.datum, 0));
|
|
221
|
+
|
|
222
|
+
// special handling if there's a projection, e.g. a line mark
|
|
223
|
+
if (plot.scales.projection && mark.type !== 'geo') {
|
|
224
|
+
for (const suffix of ['', '1', '2']) {
|
|
225
|
+
if (
|
|
226
|
+
options?.[`x${suffix}`] !== undefined &&
|
|
227
|
+
options?.[`y${suffix}`] !== undefined
|
|
228
|
+
) {
|
|
229
|
+
// we have two-dimensional accessors
|
|
230
|
+
// for the x and y channels
|
|
231
|
+
const [x, y] =
|
|
232
|
+
mark.type === 'line'
|
|
233
|
+
? [row.x, row.y] // line paths are projected later
|
|
234
|
+
: projectXY(
|
|
235
|
+
plot.scales,
|
|
236
|
+
row.x,
|
|
237
|
+
row.y,
|
|
238
|
+
usedScales.x,
|
|
239
|
+
usedScales.y,
|
|
240
|
+
suffix
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
out[`x${suffix}`] = x;
|
|
244
|
+
out[`y${suffix}`] = y;
|
|
245
|
+
out.valid =
|
|
246
|
+
out.valid &&
|
|
247
|
+
isValid(row.x) &&
|
|
248
|
+
isValid(row.y) &&
|
|
249
|
+
isValid(x) &&
|
|
250
|
+
isValid(y);
|
|
251
|
+
}
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
|
-
}
|
|
252
254
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
255
|
+
// iterate over all scaled channels
|
|
256
|
+
for (const [channel, scale] of Object.entries(CHANNEL_SCALE) as [
|
|
257
|
+
ScaledChannelName,
|
|
258
|
+
ScaleName
|
|
259
|
+
][]) {
|
|
260
|
+
// check if the mark has defined an accessor for this channel
|
|
261
|
+
if (options?.[channel] != null && out[channel] === undefined) {
|
|
262
|
+
// resolve value
|
|
263
|
+
const value = row[channel];
|
|
264
|
+
// if this channel was renamed, use the original channel for scaling
|
|
265
|
+
const origChannel = options?.[RENAME]?.[channel] || channel;
|
|
266
|
+
const scaled = usedScales[channel]
|
|
267
|
+
? scale === 'x'
|
|
268
|
+
? projectX(origChannel as 'x' | 'x1' | 'x2', plot.scales, value)
|
|
269
|
+
: scale === 'y'
|
|
270
|
+
? projectY(origChannel as 'y' | 'y1' | 'y2', plot.scales, value)
|
|
271
|
+
: scale === 'color' && !isValid(value)
|
|
272
|
+
? plot.options.color.unknown
|
|
273
|
+
: plot.scales[scale].fn(value)
|
|
274
|
+
: value;
|
|
275
|
+
|
|
276
|
+
out.valid = out.valid && (scale === 'color' || isValid(value));
|
|
277
|
+
|
|
278
|
+
// apply dx/dy transform
|
|
279
|
+
out[channel] =
|
|
280
|
+
Number.isFinite(scaled) && (scale === 'x' || scale === 'y')
|
|
281
|
+
? scaled + (scale === 'x' ? out.dx : out.dy)
|
|
282
|
+
: scaled;
|
|
283
|
+
} else if (defaults[channel]) {
|
|
284
|
+
out[channel] = defaults[channel];
|
|
285
|
+
}
|
|
283
286
|
}
|
|
284
|
-
}
|
|
285
287
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
return [out];
|
|
289
|
+
}),
|
|
290
|
+
options
|
|
291
|
+
)
|
|
288
292
|
);
|
|
293
|
+
|
|
294
|
+
function dodge<T>(data: ScaledDataRecord<Datum>[], options: BaseMarkProps<T>) {
|
|
295
|
+
if (options.dodgeX) {
|
|
296
|
+
return dodgeX({ data, ...options }, plot);
|
|
297
|
+
}
|
|
298
|
+
if (options.dodgeY) {
|
|
299
|
+
return dodgeY({ data, ...options }, plot);
|
|
300
|
+
}
|
|
301
|
+
return data;
|
|
302
|
+
}
|
|
289
303
|
</script>
|
|
290
304
|
|
|
291
305
|
{#if errors.length}
|
package/dist/Mark.svelte.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
|
+
import { CHANNEL_SCALE } from './constants.js';
|
|
2
3
|
import type { ScaledChannelName, MarkType, DataRecord, ChannelAccessor, ScaleName, RawValue, ScaledDataRecord, ScaleType } from './types/index.js';
|
|
3
4
|
import { getUsedScales } from './helpers/scales.js';
|
|
4
5
|
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
5
6
|
props(): Partial<Partial<{
|
|
6
|
-
filter
|
|
7
|
-
facet
|
|
7
|
+
filter: import("./types/index.js").ConstantAccessor<boolean, Datum>;
|
|
8
|
+
facet: "auto" | "include" | "exclude";
|
|
8
9
|
fx: ChannelAccessor<Datum>;
|
|
9
10
|
fy: ChannelAccessor<Datum>;
|
|
10
11
|
dx: import("./types/index.js").ConstantAccessor<number, Datum>;
|
|
11
12
|
dy: import("./types/index.js").ConstantAccessor<number, Datum>;
|
|
13
|
+
dodgeX: CHANNEL_SCALE;
|
|
14
|
+
dodgeY: CHANNEL_SCALE;
|
|
12
15
|
fill: ChannelAccessor<Datum>;
|
|
13
16
|
fillOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
|
|
14
|
-
sort:
|
|
17
|
+
sort: {
|
|
15
18
|
channel: string;
|
|
16
19
|
order?: "ascending" | "descending";
|
|
17
|
-
} | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
|
|
20
|
+
} | ((a: RawValue, b: RawValue) => number) | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
|
|
18
21
|
stroke: ChannelAccessor<Datum>;
|
|
19
22
|
strokeWidth: import("./types/index.js").ConstantAccessor<number, Datum>;
|
|
20
23
|
strokeOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
|
|
@@ -29,38 +32,38 @@ declare class __sveltets_Render<Datum extends DataRecord> {
|
|
|
29
32
|
imageFilter: import("./types/index.js").ConstantAccessor<string, Datum>;
|
|
30
33
|
shapeRendering: import("./types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
31
34
|
paintOrder: import("./types/index.js").ConstantAccessor<string, Datum>;
|
|
32
|
-
onclick
|
|
33
|
-
ondblclick
|
|
34
|
-
onmouseup
|
|
35
|
-
onmousedown
|
|
36
|
-
onmouseenter
|
|
37
|
-
onmousemove
|
|
38
|
-
onmouseleave
|
|
39
|
-
onmouseout
|
|
40
|
-
onmouseover
|
|
41
|
-
onpointercancel
|
|
42
|
-
onpointerdown
|
|
43
|
-
onpointerup
|
|
44
|
-
onpointerenter
|
|
45
|
-
onpointerleave
|
|
46
|
-
onpointermove
|
|
47
|
-
onpointerover
|
|
48
|
-
onpointerout
|
|
49
|
-
ondrag
|
|
50
|
-
ondrop
|
|
51
|
-
ondragstart
|
|
52
|
-
ondragenter
|
|
53
|
-
ondragleave
|
|
54
|
-
ondragover
|
|
55
|
-
ondragend
|
|
56
|
-
ontouchstart
|
|
57
|
-
ontouchmove
|
|
58
|
-
ontouchend
|
|
59
|
-
ontouchcancel
|
|
60
|
-
oncontextmenu
|
|
61
|
-
onwheel
|
|
62
|
-
class
|
|
63
|
-
style
|
|
35
|
+
onclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
ondblclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmousedown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onmouseenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onmousemove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onmouseleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onmouseout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onmouseover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointercancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointerdown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
onpointerenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
onpointerleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
onpointermove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
onpointerover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
onpointerout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondrag: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondrop: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ondragstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ondragenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ondragleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ondragover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
ondragend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
ontouchstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
ontouchmove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
61
|
+
ontouchend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
62
|
+
ontouchcancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
63
|
+
oncontextmenu: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
64
|
+
onwheel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
65
|
+
class: string;
|
|
66
|
+
style: string;
|
|
64
67
|
cursor: import("./types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
65
68
|
}>> & {
|
|
66
69
|
data?: Datum[] | undefined;
|
package/dist/helpers/colors.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ type SchemeGetter = (n: number) => readonly string[];
|
|
|
6
6
|
export declare function isOrdinalScheme(scheme: ColorScheme): boolean;
|
|
7
7
|
export declare function ordinalScheme(scheme: string): SchemeGetter | undefined;
|
|
8
8
|
export declare function ordinalRange(scheme: string, length: number): readonly string[] | undefined;
|
|
9
|
-
export declare function maybeBooleanRange(domain: boolean[], scheme?: string):
|
|
9
|
+
export declare function maybeBooleanRange(domain: boolean[], scheme?: string): any[] | undefined;
|
|
10
10
|
export declare function isQuantitativeScheme(scheme: string): boolean;
|
|
11
11
|
export declare function quantitativeScheme(scheme: string): typeof interpolateBrBG | undefined;
|
|
12
12
|
export declare function isDivergingScheme(scheme: string): boolean;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ChannelName, Channels, RawValue } from '../types/index.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { TransitionConfig } from 'svelte/transition';
|
|
3
4
|
/**
|
|
4
5
|
* Returns first argument that is not null or undefined
|
|
5
6
|
*/
|
|
6
|
-
export declare function coalesce(...args: (RawValue | undefined | null)[]):
|
|
7
|
-
export declare function testFilter<T>(datum: T, options: Channels<T>):
|
|
7
|
+
export declare function coalesce(...args: (RawValue | undefined | null)[]): any;
|
|
8
|
+
export declare function testFilter<T>(datum: T, options: Channels<T>): any;
|
|
8
9
|
export declare function randomId(): string;
|
|
9
10
|
export declare function isSnippet(value: unknown): value is Snippet;
|
|
10
11
|
export declare function isValid(value: RawValue | undefined): value is number | Date | string;
|
|
@@ -16,3 +17,4 @@ export declare function parseInset(inset: number | string, width: number): numbe
|
|
|
16
17
|
export declare function omit<T extends {}, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K>;
|
|
17
18
|
export declare function identity<T>(x: T): T;
|
|
18
19
|
export declare const GEOJSON_PREFER_STROKE: Set<string>;
|
|
20
|
+
export declare function noTransition(node: Element): TransitionConfig;
|
package/dist/helpers/index.js
CHANGED
|
@@ -61,3 +61,14 @@ export function identity(x) {
|
|
|
61
61
|
return x;
|
|
62
62
|
}
|
|
63
63
|
export const GEOJSON_PREFER_STROKE = new Set(['MultiLineString', 'LineString']);
|
|
64
|
+
export function noTransition(node) {
|
|
65
|
+
node.dispatchEvent(new CustomEvent('introstart'));
|
|
66
|
+
node.dispatchEvent(new CustomEvent('introend'));
|
|
67
|
+
node.dispatchEvent(new CustomEvent('outrostart'));
|
|
68
|
+
node.dispatchEvent(new CustomEvent('outroend'));
|
|
69
|
+
return {
|
|
70
|
+
duration: 0,
|
|
71
|
+
delay: 0,
|
|
72
|
+
css: () => ''
|
|
73
|
+
};
|
|
74
|
+
}
|
package/dist/helpers/scales.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare function createScale<T extends ScaleOptions>(name: ScaleName, sca
|
|
|
15
15
|
autoTitle?: undefined;
|
|
16
16
|
} | {
|
|
17
17
|
type: ScaleType;
|
|
18
|
-
domain:
|
|
18
|
+
domain: any;
|
|
19
19
|
range: any;
|
|
20
20
|
fn: any;
|
|
21
21
|
skip: Map<ScaledChannelName, Set<symbol>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RawValue } from '../types/index.js';
|
|
2
|
-
export declare function isBooleanOrNull(v: RawValue):
|
|
2
|
+
export declare function isBooleanOrNull(v: RawValue): boolean;
|
|
3
3
|
export declare function isDate(v: RawValue): v is Date;
|
|
4
|
-
export declare function isDateOrNull(v: RawValue | null | undefined):
|
|
4
|
+
export declare function isDateOrNull(v: RawValue | null | undefined): boolean;
|
|
5
5
|
export declare function isNumberOrNull(v: RawValue | null | undefined): boolean;
|
|
6
6
|
export declare function isNumberOrNullOrNaN(v: RawValue | null | undefined): boolean;
|
|
7
|
-
export declare function isStringOrNull(v: RawValue | null | undefined):
|
|
7
|
+
export declare function isStringOrNull(v: RawValue | null | undefined): boolean;
|
|
8
8
|
export declare function isSymbolOrNull(v: RawValue | null | undefined): boolean;
|
|
9
|
-
export declare function isColorOrNull(v: RawValue | null | undefined):
|
|
9
|
+
export declare function isColorOrNull(v: RawValue | null | undefined): any;
|
|
10
10
|
export declare function isOpacityOrNull(v: RawValue): boolean;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { type CurveFactory } from 'd3-shape';
|
|
2
|
+
import callWithProps from '../helpers/callWithProps.js';
|
|
2
3
|
import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
|
|
3
4
|
import type { StackOptions } from '../transforms/stack.js';
|
|
4
5
|
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
5
6
|
props(): Partial<{
|
|
6
|
-
filter
|
|
7
|
-
facet
|
|
7
|
+
filter: ConstantAccessor<boolean, Datum>;
|
|
8
|
+
facet: "auto" | "include" | "exclude";
|
|
8
9
|
fx: ChannelAccessor<Datum>;
|
|
9
10
|
fy: ChannelAccessor<Datum>;
|
|
10
11
|
dx: ConstantAccessor<number, Datum>;
|
|
11
12
|
dy: ConstantAccessor<number, Datum>;
|
|
13
|
+
dodgeX: callWithProps;
|
|
14
|
+
dodgeY: callWithProps;
|
|
12
15
|
fill: ChannelAccessor<Datum>;
|
|
13
16
|
fillOpacity: ConstantAccessor<number, Datum>;
|
|
14
|
-
sort:
|
|
17
|
+
sort: {
|
|
15
18
|
channel: string;
|
|
16
19
|
order?: "ascending" | "descending";
|
|
17
|
-
} | ConstantAccessor<RawValue, Datum>;
|
|
20
|
+
} | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
|
|
18
21
|
stroke: ChannelAccessor<Datum>;
|
|
19
22
|
strokeWidth: ConstantAccessor<number, Datum>;
|
|
20
23
|
strokeOpacity: ConstantAccessor<number, Datum>;
|
|
@@ -29,38 +32,38 @@ declare class __sveltets_Render<Datum extends DataRecord> {
|
|
|
29
32
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
30
33
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
31
34
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
32
|
-
onclick
|
|
33
|
-
ondblclick
|
|
34
|
-
onmouseup
|
|
35
|
-
onmousedown
|
|
36
|
-
onmouseenter
|
|
37
|
-
onmousemove
|
|
38
|
-
onmouseleave
|
|
39
|
-
onmouseout
|
|
40
|
-
onmouseover
|
|
41
|
-
onpointercancel
|
|
42
|
-
onpointerdown
|
|
43
|
-
onpointerup
|
|
44
|
-
onpointerenter
|
|
45
|
-
onpointerleave
|
|
46
|
-
onpointermove
|
|
47
|
-
onpointerover
|
|
48
|
-
onpointerout
|
|
49
|
-
ondrag
|
|
50
|
-
ondrop
|
|
51
|
-
ondragstart
|
|
52
|
-
ondragenter
|
|
53
|
-
ondragleave
|
|
54
|
-
ondragover
|
|
55
|
-
ondragend
|
|
56
|
-
ontouchstart
|
|
57
|
-
ontouchmove
|
|
58
|
-
ontouchend
|
|
59
|
-
ontouchcancel
|
|
60
|
-
oncontextmenu
|
|
61
|
-
onwheel
|
|
62
|
-
class
|
|
63
|
-
style
|
|
35
|
+
onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
+
ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
62
|
+
ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
63
|
+
oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
64
|
+
onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
65
|
+
class: string;
|
|
66
|
+
style: string;
|
|
64
67
|
cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
65
68
|
}> & LinkableMarkProps<Datum> & {
|
|
66
69
|
data: Datum[];
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import { renameChannels } from '../transforms/rename.js';
|
|
1
2
|
import type { ChannelAccessor, DataRow } from '../types/index.js';
|
|
2
3
|
declare class __sveltets_Render<Datum extends DataRow> {
|
|
3
4
|
props(): Omit<Partial<{
|
|
4
|
-
filter
|
|
5
|
-
facet
|
|
5
|
+
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
|
|
6
|
+
facet: "auto" | "include" | "exclude";
|
|
6
7
|
fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
7
8
|
fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
8
9
|
dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
9
10
|
dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
11
|
+
dodgeX: renameChannels;
|
|
12
|
+
dodgeY: renameChannels;
|
|
10
13
|
fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
11
14
|
fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
12
|
-
sort:
|
|
15
|
+
sort: {
|
|
13
16
|
channel: string;
|
|
14
17
|
order?: "ascending" | "descending";
|
|
15
|
-
} | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
|
|
18
|
+
} | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
|
|
16
19
|
stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
17
20
|
strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
18
21
|
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
@@ -27,38 +30,38 @@ declare class __sveltets_Render<Datum extends DataRow> {
|
|
|
27
30
|
imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
28
31
|
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data").RawValue>>;
|
|
29
32
|
paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
30
|
-
onclick
|
|
31
|
-
ondblclick
|
|
32
|
-
onmouseup
|
|
33
|
-
onmousedown
|
|
34
|
-
onmouseenter
|
|
35
|
-
onmousemove
|
|
36
|
-
onmouseleave
|
|
37
|
-
onmouseout
|
|
38
|
-
onmouseover
|
|
39
|
-
onpointercancel
|
|
40
|
-
onpointerdown
|
|
41
|
-
onpointerup
|
|
42
|
-
onpointerenter
|
|
43
|
-
onpointerleave
|
|
44
|
-
onpointermove
|
|
45
|
-
onpointerover
|
|
46
|
-
onpointerout
|
|
47
|
-
ondrag
|
|
48
|
-
ondrop
|
|
49
|
-
ondragstart
|
|
50
|
-
ondragenter
|
|
51
|
-
ondragleave
|
|
52
|
-
ondragover
|
|
53
|
-
ondragend
|
|
54
|
-
ontouchstart
|
|
55
|
-
ontouchmove
|
|
56
|
-
ontouchend
|
|
57
|
-
ontouchcancel
|
|
58
|
-
oncontextmenu
|
|
59
|
-
onwheel
|
|
60
|
-
class
|
|
61
|
-
style
|
|
33
|
+
onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
+
ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
+
onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
+
oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
62
|
+
onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
63
|
+
class: string;
|
|
64
|
+
style: string;
|
|
62
65
|
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data").RawValue>>;
|
|
63
66
|
}> & import("../types/mark").LinkableMarkProps<Record<string | symbol, import("../types/data").RawValue>> & {
|
|
64
67
|
data: Record<string | symbol, import("../types/data").RawValue>[];
|
|
@@ -72,7 +75,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
|
|
|
72
75
|
sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
|
|
73
76
|
channel: "stroke" | "fill";
|
|
74
77
|
};
|
|
75
|
-
stack?: Partial<
|
|
78
|
+
stack?: Partial<renameChannels>;
|
|
76
79
|
canvas?: boolean;
|
|
77
80
|
}, "y1" | "y2"> & {
|
|
78
81
|
x?: ChannelAccessor<Datum>;
|