svelteplot 0.7.0 → 0.7.1-pr-278.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/LICENSE.md +19 -1
- package/README.md +1 -1
- package/dist/Mark.svelte.d.ts +48 -40
- package/dist/constants.d.ts +1 -1
- package/dist/helpers/colors.d.ts +9 -12
- package/dist/helpers/data.d.ts +1 -0
- package/dist/helpers/data.js +1 -1
- package/dist/helpers/facets.d.ts +1 -1
- package/dist/helpers/getBaseStyles.d.ts +2 -4
- package/dist/helpers/index.d.ts +3 -3
- package/dist/helpers/index.js +1 -2
- package/dist/helpers/reduce.d.ts +1 -1
- package/dist/helpers/scales.d.ts +7 -7
- package/dist/helpers/symbols.d.ts +2 -2
- package/dist/helpers/time.d.ts +3 -3
- package/dist/helpers/time.js +1 -1
- package/dist/helpers/typeChecks.d.ts +8 -8
- package/dist/marks/Area.svelte.d.ts +16 -8
- package/dist/marks/AreaX.svelte.d.ts +17 -9
- package/dist/marks/Arrow.svelte.d.ts +47 -39
- package/dist/marks/AxisX.svelte +14 -9
- package/dist/marks/AxisX.svelte.d.ts +21 -13
- package/dist/marks/AxisY.svelte +14 -9
- package/dist/marks/AxisY.svelte.d.ts +20 -12
- package/dist/marks/BarX.svelte +1 -3
- package/dist/marks/BarX.svelte.d.ts +16 -8
- package/dist/marks/BarY.svelte +1 -3
- package/dist/marks/BarY.svelte.d.ts +16 -8
- package/dist/marks/BollingerX.svelte.d.ts +11 -78
- package/dist/marks/BollingerY.svelte.d.ts +11 -78
- package/dist/marks/BoxY.svelte +4 -2
- package/dist/marks/BoxY.svelte.d.ts +13 -68
- package/dist/marks/Brush.svelte +12 -13
- package/dist/marks/Brush.svelte.d.ts +58 -31
- package/dist/marks/Cell.svelte +1 -3
- package/dist/marks/Cell.svelte.d.ts +46 -38
- package/dist/marks/CustomMark.svelte.d.ts +11 -86
- package/dist/marks/CustomMarkHTML.svelte.d.ts +15 -8
- package/dist/marks/DifferenceY.svelte.d.ts +11 -66
- package/dist/marks/Dot.svelte.d.ts +47 -39
- package/dist/marks/DotX.svelte.d.ts +17 -9
- package/dist/marks/DotY.svelte.d.ts +17 -9
- package/dist/marks/Frame.svelte +2 -1
- package/dist/marks/Frame.svelte.d.ts +85 -17
- package/dist/marks/Geo.svelte.d.ts +47 -39
- package/dist/marks/Graticule.svelte +4 -5
- package/dist/marks/GridX.svelte.d.ts +17 -9
- package/dist/marks/GridY.svelte.d.ts +17 -9
- package/dist/marks/HTMLTooltip.svelte.d.ts +14 -7
- package/dist/marks/Image.svelte.d.ts +11 -77
- package/dist/marks/Line.svelte +1 -1
- package/dist/marks/Line.svelte.d.ts +47 -39
- package/dist/marks/LineX.svelte.d.ts +18 -10
- package/dist/marks/LineY.svelte.d.ts +18 -10
- package/dist/marks/Link.svelte.d.ts +46 -38
- package/dist/marks/Pointer.svelte.d.ts +13 -6
- package/dist/marks/Rect.svelte +1 -3
- package/dist/marks/Rect.svelte.d.ts +16 -8
- package/dist/marks/RectX.svelte.d.ts +10 -3
- package/dist/marks/RectY.svelte.d.ts +10 -3
- package/dist/marks/RuleX.svelte.d.ts +17 -9
- package/dist/marks/RuleY.svelte.d.ts +17 -9
- package/dist/marks/Sphere.svelte +1 -2
- package/dist/marks/Spike.svelte +4 -5
- package/dist/marks/Spike.svelte.d.ts +17 -9
- package/dist/marks/Text.svelte.d.ts +23 -15
- package/dist/marks/TickX.svelte.d.ts +16 -8
- package/dist/marks/TickY.svelte.d.ts +16 -8
- package/dist/marks/Vector.svelte.d.ts +46 -38
- package/dist/marks/WaffleX.svelte +1 -3
- package/dist/marks/WaffleX.svelte.d.ts +11 -87
- package/dist/marks/WaffleY.svelte +1 -3
- package/dist/marks/WaffleY.svelte.d.ts +11 -85
- package/dist/marks/helpers/Anchor.svelte.d.ts +15 -8
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +11 -166
- package/dist/marks/helpers/RectPath.svelte.d.ts +13 -68
- package/dist/marks/helpers/canvas.js +1 -1
- package/dist/marks/helpers/waffle.d.ts +6 -0
- package/dist/marks/helpers/waffle.js +6 -38
- package/dist/transforms/bollinger.d.ts +1 -69
- package/dist/transforms/centroid.d.ts +1 -4
- package/dist/transforms/group.d.ts +4 -12
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.js +1 -1
- package/dist/transforms/interval.d.ts +2 -128
- package/dist/transforms/normalize.d.ts +18 -0
- package/dist/transforms/normalize.js +45 -0
- package/dist/transforms/recordize.d.ts +4 -7
- package/dist/transforms/select.d.ts +7 -448
- package/dist/transforms/sort.d.ts +5 -253
- package/dist/transforms/stack.d.ts +3 -23
- package/dist/transforms/window.d.ts +2 -134
- package/dist/ui/ExamplesGrid.svelte +19 -3
- package/dist/ui/ExamplesPagePreview.svelte +149 -0
- package/dist/ui/ExamplesPagePreview.svelte.d.ts +12 -0
- package/dist/ui/isDark.svelte.d.ts +6 -0
- package/dist/ui/isDark.svelte.js +10 -0
- package/package.json +140 -128
package/dist/marks/AxisX.svelte
CHANGED
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
import { resolveScaledStyles } from '../helpers/resolve.js';
|
|
20
20
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
21
21
|
|
|
22
|
-
interface AxisXMarkProps
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
> {
|
|
22
|
+
interface AxisXMarkProps extends Omit<
|
|
23
|
+
BaseMarkProps<Datum>,
|
|
24
|
+
'fillOpacity' | 'paintOrder' | 'title' | 'href' | 'target'
|
|
25
|
+
> {
|
|
27
26
|
data?: Datum[];
|
|
28
27
|
automatic?: boolean;
|
|
29
28
|
title?: string | false | null;
|
|
@@ -115,6 +114,14 @@
|
|
|
115
114
|
)
|
|
116
115
|
);
|
|
117
116
|
|
|
117
|
+
const useCompactNotation = $derived(
|
|
118
|
+
new Set(
|
|
119
|
+
ticks
|
|
120
|
+
.filter((tick): tick is number => typeof tick === 'number' && Number.isFinite(tick))
|
|
121
|
+
.map((tick) => (tick === 0 ? -Infinity : Math.floor(Math.log10(Math.abs(tick)))))
|
|
122
|
+
).size > 1
|
|
123
|
+
);
|
|
124
|
+
|
|
118
125
|
const tickFmt = $derived(tickFormat || plot.options.x.tickFormat);
|
|
119
126
|
|
|
120
127
|
const useTickFormat = $derived(
|
|
@@ -133,10 +140,8 @@
|
|
|
133
140
|
: // auto
|
|
134
141
|
(d: RawValue) =>
|
|
135
142
|
Intl.NumberFormat(plot.options.locale, {
|
|
136
|
-
// use compact notation if range covers
|
|
137
|
-
...(
|
|
138
|
-
? { notation: 'compact' }
|
|
139
|
-
: {}),
|
|
143
|
+
// use compact notation if range covers multiple magnitudes
|
|
144
|
+
...(useCompactNotation ? { notation: 'compact' } : {}),
|
|
140
145
|
...DEFAULTS.numberFormat,
|
|
141
146
|
style: plot.options.x.percent ? 'percent' : 'decimal'
|
|
142
147
|
}).format(d)
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { RawValue, ConstantAccessor } from '../types/index.js';
|
|
2
2
|
import type * as CSS from 'csstype';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import autoTimeFormat from '../helpers/autoTimeFormat.js';
|
|
4
|
+
declare function $$render<Datum extends RawValue>(): {
|
|
5
|
+
props: Omit<Partial<{
|
|
5
6
|
filter: ConstantAccessor<boolean, Datum>;
|
|
6
7
|
facet: "auto" | "include" | "exclude";
|
|
7
8
|
fx: import("../types/channel").ChannelAccessor<Datum>;
|
|
8
9
|
fy: import("../types/channel").ChannelAccessor<Datum>;
|
|
9
10
|
dx: ConstantAccessor<number, Datum>;
|
|
10
11
|
dy: ConstantAccessor<number, Datum>;
|
|
11
|
-
dodgeX:
|
|
12
|
-
dodgeY:
|
|
12
|
+
dodgeX: autoTimeFormat;
|
|
13
|
+
dodgeY: autoTimeFormat;
|
|
13
14
|
fill: import("../types/channel").ChannelAccessor<Datum>;
|
|
14
15
|
fillOpacity: ConstantAccessor<number, Datum>;
|
|
15
|
-
sort:
|
|
16
|
+
sort: {
|
|
16
17
|
channel: string;
|
|
17
18
|
order?: "ascending" | "descending";
|
|
18
|
-
} | ConstantAccessor<RawValue, Datum>;
|
|
19
|
+
} | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
|
|
19
20
|
stroke: import("../types/channel").ChannelAccessor<Datum>;
|
|
20
21
|
strokeWidth: ConstantAccessor<number, Datum>;
|
|
21
22
|
strokeOpacity: ConstantAccessor<number, Datum>;
|
|
@@ -63,8 +64,8 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
63
64
|
class: string;
|
|
64
65
|
style: string;
|
|
65
66
|
cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
|
|
66
|
-
}>, "fillOpacity" | "
|
|
67
|
-
data?: Datum[]
|
|
67
|
+
}>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
|
|
68
|
+
data?: Datum[];
|
|
68
69
|
automatic?: boolean;
|
|
69
70
|
title?: string | false | null;
|
|
70
71
|
anchor?: "top" | "bottom";
|
|
@@ -75,10 +76,10 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
75
76
|
tickFontSize?: ConstantAccessor<number, Datum>;
|
|
76
77
|
titleFontSize?: number;
|
|
77
78
|
tickPadding?: number;
|
|
78
|
-
tickFormat?: "auto" | Intl.
|
|
79
|
+
tickFormat?: "auto" | Intl.DateTimeFormatOptions | Intl.NumberFormatOptions | ((d: RawValue, i: number) => string);
|
|
79
80
|
tickClass?: ConstantAccessor<string, Datum>;
|
|
80
81
|
/** ticks is a shorthand for defining data, tickCount or interval */
|
|
81
|
-
ticks?:
|
|
82
|
+
ticks?: number | string | Datum[];
|
|
82
83
|
/** set to false or null to disable tick labels */
|
|
83
84
|
text?: boolean | null;
|
|
84
85
|
/** approximate number of ticks to be generated */
|
|
@@ -86,11 +87,18 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
86
87
|
/** approximate number of pixels between generated ticks */
|
|
87
88
|
tickSpacing?: number;
|
|
88
89
|
/** text anchor for axis labels */
|
|
89
|
-
textAnchor?: ConstantAccessor<
|
|
90
|
+
textAnchor?: ConstantAccessor<CSS.Property.TextAnchor | "auto", Datum>;
|
|
90
91
|
removeDuplicateTicks: boolean;
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
exports: {};
|
|
94
|
+
bindings: "";
|
|
95
|
+
slots: {};
|
|
96
|
+
events: {};
|
|
97
|
+
};
|
|
98
|
+
declare class __sveltets_Render<Datum extends RawValue> {
|
|
99
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
100
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
101
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
94
102
|
bindings(): "";
|
|
95
103
|
exports(): {};
|
|
96
104
|
}
|
package/dist/marks/AxisY.svelte
CHANGED
|
@@ -18,11 +18,10 @@
|
|
|
18
18
|
import { resolveScaledStyles } from '../helpers/resolve.js';
|
|
19
19
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
20
20
|
|
|
21
|
-
interface AxisYMarkProps
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
> {
|
|
21
|
+
interface AxisYMarkProps extends Omit<
|
|
22
|
+
BaseMarkProps<Datum>,
|
|
23
|
+
'fillOpacity' | 'paintOrder' | 'title' | 'href' | 'target'
|
|
24
|
+
> {
|
|
26
25
|
data?: Datum[];
|
|
27
26
|
automatic?: boolean;
|
|
28
27
|
title?: string | false | null;
|
|
@@ -113,6 +112,14 @@
|
|
|
113
112
|
)
|
|
114
113
|
);
|
|
115
114
|
|
|
115
|
+
const useCompactNotation = $derived(
|
|
116
|
+
new Set(
|
|
117
|
+
ticks
|
|
118
|
+
.filter((tick): tick is number => typeof tick === 'number' && Number.isFinite(tick))
|
|
119
|
+
.map((tick) => (tick === 0 ? -Infinity : Math.floor(Math.log10(Math.abs(tick)))))
|
|
120
|
+
).size > 1
|
|
121
|
+
);
|
|
122
|
+
|
|
116
123
|
const tickFmt = $derived(tickFormat || plot.options.y.tickFormat);
|
|
117
124
|
|
|
118
125
|
const useTickFormat = $derived(
|
|
@@ -131,10 +138,8 @@
|
|
|
131
138
|
: // auto
|
|
132
139
|
(d: RawValue) =>
|
|
133
140
|
Intl.NumberFormat(plot.options.locale, {
|
|
134
|
-
// use compact notation if range covers
|
|
135
|
-
...(
|
|
136
|
-
? { notation: 'compact' }
|
|
137
|
-
: {}),
|
|
141
|
+
// use compact notation if range covers multiple magnitudes
|
|
142
|
+
...(useCompactNotation ? { notation: 'compact' } : {}),
|
|
138
143
|
...DEFAULTS.numberFormat,
|
|
139
144
|
style: plot.options.y.percent ? 'percent' : 'decimal'
|
|
140
145
|
}).format(d)
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { RawValue, ConstantAccessor } from '../types/index.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import autoTimeFormat from '../helpers/autoTimeFormat.js';
|
|
3
|
+
declare function $$render<Datum extends RawValue>(): {
|
|
4
|
+
props: Omit<Partial<{
|
|
4
5
|
filter: ConstantAccessor<boolean, Datum>;
|
|
5
6
|
facet: "auto" | "include" | "exclude";
|
|
6
7
|
fx: import("../types/channel").ChannelAccessor<Datum>;
|
|
7
8
|
fy: import("../types/channel").ChannelAccessor<Datum>;
|
|
8
9
|
dx: ConstantAccessor<number, Datum>;
|
|
9
10
|
dy: ConstantAccessor<number, Datum>;
|
|
10
|
-
dodgeX:
|
|
11
|
-
dodgeY:
|
|
11
|
+
dodgeX: autoTimeFormat;
|
|
12
|
+
dodgeY: autoTimeFormat;
|
|
12
13
|
fill: import("../types/channel").ChannelAccessor<Datum>;
|
|
13
14
|
fillOpacity: ConstantAccessor<number, Datum>;
|
|
14
|
-
sort:
|
|
15
|
+
sort: {
|
|
15
16
|
channel: string;
|
|
16
17
|
order?: "ascending" | "descending";
|
|
17
|
-
} | ConstantAccessor<RawValue, Datum>;
|
|
18
|
+
} | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
|
|
18
19
|
stroke: import("../types/channel").ChannelAccessor<Datum>;
|
|
19
20
|
strokeWidth: ConstantAccessor<number, Datum>;
|
|
20
21
|
strokeOpacity: ConstantAccessor<number, Datum>;
|
|
@@ -62,8 +63,8 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
62
63
|
class: string;
|
|
63
64
|
style: string;
|
|
64
65
|
cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
65
|
-
}>, "fillOpacity" | "
|
|
66
|
-
data?: Datum[]
|
|
66
|
+
}>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
|
|
67
|
+
data?: Datum[];
|
|
67
68
|
automatic?: boolean;
|
|
68
69
|
title?: string | false | null;
|
|
69
70
|
anchor?: "left" | "right";
|
|
@@ -76,10 +77,10 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
76
77
|
tickFontSize?: ConstantAccessor<number, Datum>;
|
|
77
78
|
titleFontSize?: number;
|
|
78
79
|
tickPadding?: number;
|
|
79
|
-
tickFormat?: "auto" | Intl.
|
|
80
|
+
tickFormat?: "auto" | Intl.DateTimeFormatOptions | Intl.NumberFormatOptions | ((d: RawValue) => string);
|
|
80
81
|
tickClass?: ConstantAccessor<string, Datum>;
|
|
81
82
|
/** ticks is a shorthand for defining data, tickCount or interval */
|
|
82
|
-
ticks?:
|
|
83
|
+
ticks?: number | string | Datum[];
|
|
83
84
|
/** set to false or null to disable tick labels */
|
|
84
85
|
text?: boolean | null;
|
|
85
86
|
/** approximate number of ticks to be generated */
|
|
@@ -87,8 +88,15 @@ declare class __sveltets_Render<Datum extends RawValue> {
|
|
|
87
88
|
/** approximate number of pixels between generated ticks */
|
|
88
89
|
tickSpacing?: number;
|
|
89
90
|
};
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
exports: {};
|
|
92
|
+
bindings: "";
|
|
93
|
+
slots: {};
|
|
94
|
+
events: {};
|
|
95
|
+
};
|
|
96
|
+
declare class __sveltets_Render<Datum extends RawValue> {
|
|
97
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
98
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
99
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
92
100
|
bindings(): "";
|
|
93
101
|
exports(): {};
|
|
94
102
|
}
|
package/dist/marks/BarX.svelte
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
-->
|
|
5
5
|
<script lang="ts" generics="Datum extends DataRow">
|
|
6
6
|
interface BarXMarkProps
|
|
7
|
-
extends BaseMarkProps<Datum>,
|
|
8
|
-
LinkableMarkProps<Datum>,
|
|
9
|
-
BaseRectMarkProps<Datum> {
|
|
7
|
+
extends BaseMarkProps<Datum>, LinkableMarkProps<Datum>, BaseRectMarkProps<Datum> {
|
|
10
8
|
data: Datum[];
|
|
11
9
|
x?: ChannelAccessor<Datum>;
|
|
12
10
|
x1?: ChannelAccessor<Datum>;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import { stackX } from '../index.js';
|
|
1
2
|
import type { StackOptions } from '../transforms/stack.js';
|
|
2
3
|
import type { DataRow } from '../types/index.js';
|
|
3
4
|
import type { BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
4
|
-
declare
|
|
5
|
-
props
|
|
5
|
+
declare function $$render<Datum extends DataRow>(): {
|
|
6
|
+
props: Partial<{
|
|
6
7
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
7
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>;
|
|
12
|
-
dodgeX:
|
|
13
|
-
dodgeY:
|
|
13
|
+
dodgeX: stackX;
|
|
14
|
+
dodgeY: stackX;
|
|
14
15
|
fill: ChannelAccessor<Datum>;
|
|
15
16
|
fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
16
|
-
sort:
|
|
17
|
+
sort: {
|
|
17
18
|
channel: string;
|
|
18
19
|
order?: "ascending" | "descending";
|
|
19
|
-
} | import("../types/index.js").ConstantAccessor<import("../types/
|
|
20
|
+
} | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
|
|
20
21
|
stroke: ChannelAccessor<Datum>;
|
|
21
22
|
strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
22
23
|
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
@@ -77,8 +78,15 @@ declare class __sveltets_Render<Datum extends DataRow> {
|
|
|
77
78
|
*/
|
|
78
79
|
interval?: number | string;
|
|
79
80
|
};
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
exports: {};
|
|
82
|
+
bindings: "";
|
|
83
|
+
slots: {};
|
|
84
|
+
events: {};
|
|
85
|
+
};
|
|
86
|
+
declare class __sveltets_Render<Datum extends DataRow> {
|
|
87
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
88
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
89
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
82
90
|
bindings(): "";
|
|
83
91
|
exports(): {};
|
|
84
92
|
}
|
package/dist/marks/BarY.svelte
CHANGED
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<script lang="ts" generics="Datum extends DataRow">
|
|
7
7
|
interface BarYMarkProps
|
|
8
|
-
extends BaseMarkProps<Datum>,
|
|
9
|
-
LinkableMarkProps<Datum>,
|
|
10
|
-
BaseRectMarkProps<Datum> {
|
|
8
|
+
extends BaseMarkProps<Datum>, LinkableMarkProps<Datum>, BaseRectMarkProps<Datum> {
|
|
11
9
|
data: Datum[];
|
|
12
10
|
x?: ChannelAccessor<Datum>;
|
|
13
11
|
y?: ChannelAccessor<Datum>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import { intervalY } from '../index.js';
|
|
1
2
|
import type { StackOptions } from '../transforms/stack.js';
|
|
2
3
|
import type { BaseRectMarkProps, ChannelAccessor, DataRow, LinkableMarkProps } from '../types/index.js';
|
|
3
|
-
declare
|
|
4
|
-
props
|
|
4
|
+
declare function $$render<Datum extends DataRow>(): {
|
|
5
|
+
props: Partial<{
|
|
5
6
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
6
7
|
facet: "auto" | "include" | "exclude";
|
|
7
8
|
fx: ChannelAccessor<Datum>;
|
|
8
9
|
fy: ChannelAccessor<Datum>;
|
|
9
10
|
dx: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
10
11
|
dy: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
11
|
-
dodgeX:
|
|
12
|
-
dodgeY:
|
|
12
|
+
dodgeX: intervalY;
|
|
13
|
+
dodgeY: intervalY;
|
|
13
14
|
fill: ChannelAccessor<Datum>;
|
|
14
15
|
fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
15
|
-
sort:
|
|
16
|
+
sort: {
|
|
16
17
|
channel: string;
|
|
17
18
|
order?: "ascending" | "descending";
|
|
18
|
-
} | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
|
|
19
|
+
} | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
|
|
19
20
|
stroke: ChannelAccessor<Datum>;
|
|
20
21
|
strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
21
22
|
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
@@ -76,8 +77,15 @@ declare class __sveltets_Render<Datum extends DataRow> {
|
|
|
76
77
|
*/
|
|
77
78
|
interval?: number | string;
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
exports: {};
|
|
81
|
+
bindings: "";
|
|
82
|
+
slots: {};
|
|
83
|
+
events: {};
|
|
84
|
+
};
|
|
85
|
+
declare class __sveltets_Render<Datum extends DataRow> {
|
|
86
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
87
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
88
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
81
89
|
bindings(): "";
|
|
82
90
|
exports(): {};
|
|
83
91
|
}
|
|
@@ -1,82 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataRecord } from '../types/index.js';
|
|
2
|
+
declare function $$render<Datum extends DataRecord>(): {
|
|
3
|
+
props: any;
|
|
4
|
+
exports: {};
|
|
5
|
+
bindings: "";
|
|
6
|
+
slots: {};
|
|
7
|
+
events: {};
|
|
8
|
+
};
|
|
2
9
|
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
3
|
-
props():
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
fx: ChannelAccessor<Datum>;
|
|
7
|
-
fy: ChannelAccessor<Datum>;
|
|
8
|
-
dx: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
9
|
-
dy: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
10
|
-
dodgeX: import("../transforms/dodge").DodgeXOptions;
|
|
11
|
-
dodgeY: import("../transforms/dodge").DodgeYOptions;
|
|
12
|
-
fill: ChannelAccessor<Datum>;
|
|
13
|
-
fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
14
|
-
sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
|
|
15
|
-
channel: string;
|
|
16
|
-
order?: "ascending" | "descending";
|
|
17
|
-
} | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
|
|
18
|
-
stroke: ChannelAccessor<Datum>;
|
|
19
|
-
strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
20
|
-
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
21
|
-
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
|
|
22
|
-
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
|
|
23
|
-
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
24
|
-
opacity: ChannelAccessor<Datum>;
|
|
25
|
-
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
26
|
-
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
27
|
-
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
28
|
-
clipPath: string;
|
|
29
|
-
imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
30
|
-
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
31
|
-
paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
32
|
-
onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
33
|
-
ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
-
onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
-
onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
-
onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
-
onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
-
onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
-
onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
-
onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
-
onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
-
onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
-
onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
-
onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
-
onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
-
onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
-
onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
-
onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
-
ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
-
ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
-
ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
-
ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
-
ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
-
ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
-
ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
-
ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
-
ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
-
ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
-
ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
-
oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
-
onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
62
|
-
class: string;
|
|
63
|
-
style: string;
|
|
64
|
-
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
65
|
-
}> & {
|
|
66
|
-
data: Datum[];
|
|
67
|
-
x?: ChannelAccessor<Datum>;
|
|
68
|
-
y?: ChannelAccessor<Datum>;
|
|
69
|
-
/**
|
|
70
|
-
* the window size (the window transform's k option), an integer; defaults to 20
|
|
71
|
-
*/
|
|
72
|
-
n?: number;
|
|
73
|
-
/**
|
|
74
|
-
* the band radius, a number representing a multiple of standard deviations; defaults to 2
|
|
75
|
-
*/
|
|
76
|
-
k?: number;
|
|
77
|
-
};
|
|
78
|
-
events(): {};
|
|
79
|
-
slots(): {};
|
|
10
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
80
13
|
bindings(): "";
|
|
81
14
|
exports(): {};
|
|
82
15
|
}
|
|
@@ -1,82 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataRecord } from '../types/index.js';
|
|
2
|
+
declare function $$render<Datum extends DataRecord>(): {
|
|
3
|
+
props: any;
|
|
4
|
+
exports: {};
|
|
5
|
+
bindings: "";
|
|
6
|
+
slots: {};
|
|
7
|
+
events: {};
|
|
8
|
+
};
|
|
2
9
|
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
3
|
-
props():
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
fx: ChannelAccessor<Datum>;
|
|
7
|
-
fy: ChannelAccessor<Datum>;
|
|
8
|
-
dx: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
9
|
-
dy: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
10
|
-
dodgeX: import("../transforms/dodge").DodgeXOptions;
|
|
11
|
-
dodgeY: import("../transforms/dodge").DodgeYOptions;
|
|
12
|
-
fill: ChannelAccessor<Datum>;
|
|
13
|
-
fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
14
|
-
sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
|
|
15
|
-
channel: string;
|
|
16
|
-
order?: "ascending" | "descending";
|
|
17
|
-
} | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
|
|
18
|
-
stroke: ChannelAccessor<Datum>;
|
|
19
|
-
strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
20
|
-
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
21
|
-
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
|
|
22
|
-
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
|
|
23
|
-
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
24
|
-
opacity: ChannelAccessor<Datum>;
|
|
25
|
-
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
26
|
-
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
27
|
-
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
28
|
-
clipPath: string;
|
|
29
|
-
imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
30
|
-
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
31
|
-
paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
32
|
-
onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
33
|
-
ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
-
onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
-
onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
-
onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
-
onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
-
onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
-
onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
-
onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
-
onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
-
onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
-
onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
-
onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
-
onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
-
onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
-
onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
-
onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
-
ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
-
ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
-
ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
-
ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
-
ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
-
ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
-
ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
-
ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
-
ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
-
ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
-
ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
-
oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
-
onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
62
|
-
class: string;
|
|
63
|
-
style: string;
|
|
64
|
-
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
65
|
-
}> & {
|
|
66
|
-
data: Datum[];
|
|
67
|
-
x?: ChannelAccessor<Datum>;
|
|
68
|
-
y?: ChannelAccessor<Datum>;
|
|
69
|
-
/**
|
|
70
|
-
* the window size (the window transform's k option), an integer; defaults to 20
|
|
71
|
-
*/
|
|
72
|
-
n?: number;
|
|
73
|
-
/**
|
|
74
|
-
* the band radius, a number representing a multiple of standard deviations; defaults to 2
|
|
75
|
-
*/
|
|
76
|
-
k?: number;
|
|
77
|
-
};
|
|
78
|
-
events(): {};
|
|
79
|
-
slots(): {};
|
|
10
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
80
13
|
bindings(): "";
|
|
81
14
|
exports(): {};
|
|
82
15
|
}
|
package/dist/marks/BoxY.svelte
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Creates a vertical box plot for visualizing data distribution with quartiles and outliers
|
|
3
3
|
-->
|
|
4
4
|
<script lang="ts" generics="Datum extends DataRecord">
|
|
5
|
-
interface BoxYMarkProps
|
|
6
|
-
|
|
5
|
+
interface BoxYMarkProps extends Pick<
|
|
6
|
+
BaseMarkProps<Datum>,
|
|
7
|
+
'class' | 'fill' | 'stroke' | 'fx' | 'fy'
|
|
8
|
+
> {
|
|
7
9
|
data: Datum[];
|
|
8
10
|
x: ChannelAccessor;
|
|
9
11
|
y: ChannelAccessor;
|