svelteplot 0.2.9 → 0.2.10
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/README.md +1 -1
- package/dist/Mark.svelte +5 -4
- package/dist/Plot.svelte +1 -1
- package/dist/core/Plot.svelte +2 -2
- package/dist/helpers/scales.js +9 -1
- package/dist/marks/Area.svelte +18 -26
- package/dist/marks/AxisX.svelte +5 -1
- package/dist/marks/AxisX.svelte.d.ts +2 -0
- package/dist/marks/AxisY.svelte +4 -0
- package/dist/marks/AxisY.svelte.d.ts +2 -0
- package/dist/marks/BarX.svelte +3 -1
- package/dist/marks/BarX.svelte.d.ts +2 -2
- package/dist/marks/BarY.svelte +1 -0
- package/dist/marks/BarY.svelte.d.ts +2 -2
- package/dist/marks/BrushX.svelte +1 -1
- package/dist/marks/BrushY.svelte +1 -1
- package/dist/marks/Cell.svelte +1 -0
- package/dist/marks/Cell.svelte.d.ts +2 -2
- package/dist/marks/ColorLegend.svelte +1 -0
- package/dist/marks/Dot.svelte +20 -19
- package/dist/marks/Dot.svelte.d.ts +2 -2
- package/dist/marks/Frame.svelte +2 -1
- package/dist/marks/Frame.svelte.d.ts +2 -2
- package/dist/marks/Geo.svelte +27 -33
- package/dist/marks/Geo.svelte.d.ts +4 -2
- package/dist/marks/Rect.svelte +1 -0
- package/dist/marks/Rect.svelte.d.ts +2 -2
- package/dist/marks/Sphere.svelte +2 -2
- package/dist/marks/Sphere.svelte.d.ts +3 -58
- package/dist/marks/helpers/Anchor.svelte +37 -0
- package/dist/marks/helpers/Anchor.svelte.d.ts +15 -0
- package/dist/marks/helpers/BaseAxisX.svelte +59 -53
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +1 -0
- package/dist/marks/helpers/BaseAxisY.svelte +24 -18
- package/dist/marks/helpers/BaseAxisY.svelte.d.ts +1 -0
- package/dist/marks/helpers/RectPath.svelte +33 -30
- package/dist/marks/helpers/Regression.svelte +1 -1
- package/dist/transforms/bollinger.d.ts +58 -0
- package/dist/transforms/centroid.d.ts +58 -0
- package/dist/transforms/interval.d.ts +116 -0
- package/dist/transforms/map.d.ts +174 -0
- package/dist/transforms/normalize.d.ts +117 -1
- package/dist/transforms/select.d.ts +406 -0
- package/dist/transforms/sort.d.ts +228 -1
- package/dist/transforms/sort.js +23 -13
- package/dist/transforms/window.d.ts +116 -0
- package/dist/types.d.ts +29 -8
- package/package.json +121 -120
|
@@ -1,61 +1,6 @@
|
|
|
1
|
-
import { type BaseMarkProps } from '../types.js';
|
|
2
|
-
export type SphereMarkProps = BaseMarkProps;
|
|
1
|
+
import { type BaseMarkProps, type LinkableMarkProps } from '../types.js';
|
|
2
|
+
export type SphereMarkProps = BaseMarkProps & LinkableMarkProps;
|
|
3
3
|
/** Geo mark with Sphere geometry object */
|
|
4
|
-
declare const Sphere: import("svelte").Component<
|
|
5
|
-
filter?: import("../types.js").ConstantAccessor<boolean>;
|
|
6
|
-
facet?: "auto" | "include" | "exclude";
|
|
7
|
-
fx: import("../types.js").ChannelAccessor;
|
|
8
|
-
fy: import("../types.js").ChannelAccessor;
|
|
9
|
-
dx: import("../types.js").ConstantAccessor<number>;
|
|
10
|
-
dy: import("../types.js").ConstantAccessor<number>;
|
|
11
|
-
fill: import("../types.js").ConstantAccessor<string>;
|
|
12
|
-
fillOpacity: import("../types.js").ConstantAccessor<number>;
|
|
13
|
-
stroke: import("../types.js").ConstantAccessor<string>;
|
|
14
|
-
strokeWidth: import("../types.js").ConstantAccessor<number>;
|
|
15
|
-
strokeOpacity: import("../types.js").ConstantAccessor<number>;
|
|
16
|
-
strokeLinejoin: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin>;
|
|
17
|
-
strokeLinecap: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinecap>;
|
|
18
|
-
strokeMiterlimit: import("../types.js").ConstantAccessor<number>;
|
|
19
|
-
opacity: import("../types.js").ConstantAccessor<number>;
|
|
20
|
-
strokeDasharray: import("../types.js").ConstantAccessor<string>;
|
|
21
|
-
strokeDashoffset: import("../types.js").ConstantAccessor<number>;
|
|
22
|
-
mixBlendMode: import("../types.js").ConstantAccessor<import("csstype").Property.MixBlendMode>;
|
|
23
|
-
clipPath: string;
|
|
24
|
-
imageFilter: import("../types.js").ConstantAccessor<string>;
|
|
25
|
-
shapeRendering: import("../types.js").ConstantAccessor<import("csstype").Property.ShapeRendering>;
|
|
26
|
-
paintOrder: import("../types.js").ConstantAccessor<string>;
|
|
27
|
-
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
28
|
-
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
29
|
-
onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
30
|
-
onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
31
|
-
onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
32
|
-
onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
33
|
-
onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
-
onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
-
onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
-
onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
-
onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
-
onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
-
onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
-
onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
-
onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
-
onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
-
onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
-
ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
-
ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
-
ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
-
ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
-
ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
-
ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
-
ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
-
ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
-
ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
-
ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
-
ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
-
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
-
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
-
class: string | null;
|
|
58
|
-
cursor: import("../types.js").ConstantAccessor<import("csstype").Property.Cursor>;
|
|
59
|
-
}>, {}, "">;
|
|
4
|
+
declare const Sphere: import("svelte").Component<SphereMarkProps, {}, "">;
|
|
60
5
|
type Sphere = ReturnType<typeof Sphere>;
|
|
61
6
|
export default Sphere;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { resolveProp } from '../../helpers/resolve';
|
|
3
|
+
|
|
4
|
+
let { datum = {}, options = {}, children } = $props();
|
|
5
|
+
|
|
6
|
+
const href = $derived(resolveProp(options.href, datum, null));
|
|
7
|
+
const target = $derived(resolveProp(options.target, datum, null));
|
|
8
|
+
const rel = $derived(resolveProp(options.rel, datum, null));
|
|
9
|
+
const type = $derived(resolveProp(options.type, datum, null));
|
|
10
|
+
const download = $derived(resolveProp(options.download, datum, null));
|
|
11
|
+
|
|
12
|
+
// filter data attributes from options
|
|
13
|
+
const dataAttributes = $derived(
|
|
14
|
+
Object.fromEntries(
|
|
15
|
+
Object.entries(options).filter(([key]) => key.startsWith('data-sveltekit-'))
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
{#if href}
|
|
21
|
+
<!-- we can't use <a> directly here because Svelte confuses it with the
|
|
22
|
+
HTMLAElement which breaks the rendering -->
|
|
23
|
+
<svelte:element
|
|
24
|
+
this={'a'}
|
|
25
|
+
{href}
|
|
26
|
+
{target}
|
|
27
|
+
{rel}
|
|
28
|
+
{type}
|
|
29
|
+
{download}
|
|
30
|
+
{...dataAttributes}
|
|
31
|
+
aria-label="link"
|
|
32
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
33
|
+
{@render children?.()}
|
|
34
|
+
</svelte:element>
|
|
35
|
+
{:else}
|
|
36
|
+
{@render children?.()}
|
|
37
|
+
{/if}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default Anchor;
|
|
2
|
+
type Anchor = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Anchor: import("svelte").Component<{
|
|
7
|
+
datum?: Record<string, any>;
|
|
8
|
+
options?: Record<string, any>;
|
|
9
|
+
children: any;
|
|
10
|
+
}, {}, "">;
|
|
11
|
+
type $$ComponentProps = {
|
|
12
|
+
datum?: Record<string, any>;
|
|
13
|
+
options?: Record<string, any>;
|
|
14
|
+
children: any;
|
|
15
|
+
};
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
dy: ConstantAccessor<number>;
|
|
34
34
|
filter: ChannelAccessor;
|
|
35
35
|
};
|
|
36
|
+
text: boolean;
|
|
36
37
|
plot: PlotState;
|
|
37
38
|
};
|
|
38
39
|
|
|
@@ -50,7 +51,8 @@
|
|
|
50
51
|
height,
|
|
51
52
|
options,
|
|
52
53
|
plot,
|
|
53
|
-
title
|
|
54
|
+
title,
|
|
55
|
+
text = true
|
|
54
56
|
}: BaseAxisXProps = $props();
|
|
55
57
|
|
|
56
58
|
function splitTick(tick: string | string[]) {
|
|
@@ -86,15 +88,17 @@
|
|
|
86
88
|
})
|
|
87
89
|
);
|
|
88
90
|
const T = tickObjects.length;
|
|
89
|
-
|
|
90
|
-
let
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
if (text) {
|
|
92
|
+
for (let i = 0; i < T; i++) {
|
|
93
|
+
let j = i;
|
|
94
|
+
// find the preceding tick that was not hidden
|
|
95
|
+
do {
|
|
96
|
+
j--;
|
|
97
|
+
} while (j >= 0 && tickObjects[j].hidden);
|
|
98
|
+
if (j >= 0) {
|
|
99
|
+
const tickLabelSpace = Math.abs(tickObjects[i].x - tickObjects[j].x);
|
|
100
|
+
tickObjects[i].hidden = tickLabelSpace < 15;
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
return tickObjects;
|
|
@@ -102,6 +106,7 @@
|
|
|
102
106
|
|
|
103
107
|
$effect(() => {
|
|
104
108
|
untrack(() => [$autoMarginTop, $autoMarginBottom]);
|
|
109
|
+
if (!text) return;
|
|
105
110
|
const outsideTextAnchor = anchor === 'top' ? 'end' : 'start';
|
|
106
111
|
// measure tick label heights
|
|
107
112
|
const maxLabelHeight =
|
|
@@ -144,26 +149,7 @@
|
|
|
144
149
|
<g class="axis-x">
|
|
145
150
|
{#each positionedTicks as tick, t (t)}
|
|
146
151
|
{#if testFilter(tick.value, options) && !tick.hidden}
|
|
147
|
-
{@const textLines = tick.text}
|
|
148
|
-
{@const prevTextLines = t && positionedTicks[t - 1].text}
|
|
149
|
-
{@const fontSize = resolveProp(tickFontSize, tick)}
|
|
150
152
|
{@const tickClass_ = resolveProp(tickClass, tick.value)}
|
|
151
|
-
{@const estLabelWidth = max(textLines.map((t) => t.length)) * fontSize * 0.2}
|
|
152
|
-
{@const moveDown =
|
|
153
|
-
(tickSize + tickPadding + (tickRotate !== 0 ? tickFontSize * 0.35 : 0)) *
|
|
154
|
-
(anchor === 'bottom' ? 1 : -1)}
|
|
155
|
-
{@const [textStyle, textClass] = resolveStyles(
|
|
156
|
-
plot,
|
|
157
|
-
tick,
|
|
158
|
-
{
|
|
159
|
-
fontVariant: isQuantitative ? 'tabular-nums' : 'normal',
|
|
160
|
-
...options,
|
|
161
|
-
fontSize: tickFontSize,
|
|
162
|
-
stroke: null
|
|
163
|
-
},
|
|
164
|
-
'fill',
|
|
165
|
-
{ x: true }
|
|
166
|
-
)}
|
|
167
153
|
<g
|
|
168
154
|
class="tick {tickClass_ || ''}"
|
|
169
155
|
transform="translate({tick.x + tick.dx}, {tickY + tick.dy})"
|
|
@@ -182,31 +168,51 @@
|
|
|
182
168
|
y2={anchor === 'bottom' ? tickSize : -tickSize} />
|
|
183
169
|
{/if}
|
|
184
170
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
171
|
+
{#if text}
|
|
172
|
+
{@const textLines = tick.text}
|
|
173
|
+
{@const prevTextLines = t && positionedTicks[t - 1].text}
|
|
174
|
+
|
|
175
|
+
{@const moveDown =
|
|
176
|
+
(tickSize + tickPadding + (tickRotate !== 0 ? tickFontSize * 0.35 : 0)) *
|
|
177
|
+
(anchor === 'bottom' ? 1 : -1)}
|
|
178
|
+
{@const [textStyle, textClass] = resolveStyles(
|
|
179
|
+
plot,
|
|
180
|
+
tick,
|
|
181
|
+
{
|
|
182
|
+
fontVariant: isQuantitative ? 'tabular-nums' : 'normal',
|
|
183
|
+
...options,
|
|
184
|
+
fontSize: tickFontSize,
|
|
185
|
+
stroke: null
|
|
186
|
+
},
|
|
187
|
+
'fill',
|
|
188
|
+
{ x: true }
|
|
189
|
+
)}
|
|
190
|
+
<text
|
|
191
|
+
bind:this={tickTextElements[t]}
|
|
192
|
+
transform="translate(0, {moveDown}) rotate({tickRotate})"
|
|
193
|
+
style={textStyle}
|
|
194
|
+
class={textClass}
|
|
195
|
+
x={0}
|
|
196
|
+
y={0}
|
|
197
|
+
dominant-baseline={tickRotate !== 0
|
|
198
|
+
? 'central'
|
|
199
|
+
: anchor === 'bottom'
|
|
200
|
+
? 'hanging'
|
|
201
|
+
: 'auto'}>
|
|
202
|
+
{#if ticks.length > 0 || t === 0 || t === ticks.length - 1}
|
|
203
|
+
{#if textLines.length === 1}
|
|
204
|
+
{textLines[0]}
|
|
205
|
+
{:else}
|
|
206
|
+
{#each textLines as line, i (i)}
|
|
207
|
+
<tspan x="0" dy={i ? 12 : 0}
|
|
208
|
+
>{!prevTextLines || prevTextLines[i] !== line
|
|
209
|
+
? line
|
|
210
|
+
: ''}</tspan>
|
|
211
|
+
{/each}
|
|
212
|
+
{/if}
|
|
207
213
|
{/if}
|
|
208
|
-
|
|
209
|
-
|
|
214
|
+
</text>
|
|
215
|
+
{/if}
|
|
210
216
|
</g>
|
|
211
217
|
{/if}
|
|
212
218
|
{/each}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
dy: ConstantAccessor<number>;
|
|
30
30
|
};
|
|
31
31
|
plot: PlotState;
|
|
32
|
+
text: boolean | null;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
let {
|
|
@@ -46,7 +47,8 @@
|
|
|
46
47
|
width,
|
|
47
48
|
title,
|
|
48
49
|
plot,
|
|
49
|
-
options
|
|
50
|
+
options,
|
|
51
|
+
text = true
|
|
50
52
|
}: BaseAxisYProps = $props();
|
|
51
53
|
|
|
52
54
|
const LINE_ANCHOR = {
|
|
@@ -67,16 +69,18 @@
|
|
|
67
69
|
element: null as SVGTextElement | null
|
|
68
70
|
};
|
|
69
71
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
if (text) {
|
|
73
|
+
const T = tickObjects.length;
|
|
74
|
+
for (let i = 0; i < T; i++) {
|
|
75
|
+
let j = i;
|
|
76
|
+
// find the preceding tick that was not hidden
|
|
77
|
+
do {
|
|
78
|
+
j--;
|
|
79
|
+
} while (j >= 0 && tickObjects[j].hidden);
|
|
80
|
+
if (j >= 0) {
|
|
81
|
+
const tickLabelSpace = Math.abs(tickObjects[i].y - tickObjects[j].y);
|
|
82
|
+
tickObjects[i].hidden = tickLabelSpace < 15;
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
return tickObjects;
|
|
@@ -176,13 +180,15 @@
|
|
|
176
180
|
class={tickLineClass}
|
|
177
181
|
x2={anchor === 'left' ? -tickSize : tickSize} />
|
|
178
182
|
{/if}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
{#if text}
|
|
184
|
+
<text
|
|
185
|
+
bind:this={tickTexts[t]}
|
|
186
|
+
class={[textClass, { 'is-left': anchor === 'left' }]}
|
|
187
|
+
style={textStyle}
|
|
188
|
+
x={(tickSize + tickPadding) * (anchor === 'left' ? -1 : 1)}
|
|
189
|
+
dominant-baseline={LINE_ANCHOR[lineAnchor]}
|
|
190
|
+
>{Array.isArray(tick.text) ? tick.text.join(' ') : tick.text}</text>
|
|
191
|
+
{/if}
|
|
186
192
|
</g>
|
|
187
193
|
{/if}
|
|
188
194
|
{/each}
|
|
@@ -14,6 +14,7 @@ Helper component for rendering rectangular marks in SVG
|
|
|
14
14
|
} from '../../types';
|
|
15
15
|
import { addEventHandlers } from './events';
|
|
16
16
|
import { getContext } from 'svelte';
|
|
17
|
+
import Anchor from './Anchor.svelte';
|
|
17
18
|
|
|
18
19
|
let {
|
|
19
20
|
datum,
|
|
@@ -101,33 +102,35 @@ Helper component for rendering rectangular marks in SVG
|
|
|
101
102
|
);
|
|
102
103
|
</script>
|
|
103
104
|
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
105
|
+
<Anchor {options} datum={datum?.datum}>
|
|
106
|
+
{#if hasBorderRadius}
|
|
107
|
+
<path
|
|
108
|
+
transform="translate({x + dx + insetLeft},{y + insetBottom + dy})"
|
|
109
|
+
d={roundedRect(
|
|
110
|
+
0,
|
|
111
|
+
0,
|
|
112
|
+
width - insetLeft - insetRight,
|
|
113
|
+
height - insetTop - insetBottom,
|
|
114
|
+
borderRadius
|
|
115
|
+
)}
|
|
116
|
+
class={[styleClass, className]}
|
|
117
|
+
{style}
|
|
118
|
+
use:addEventHandlers={{
|
|
119
|
+
getPlotState,
|
|
120
|
+
options,
|
|
121
|
+
datum: datum?.datum
|
|
122
|
+
}} />
|
|
123
|
+
{:else}
|
|
124
|
+
<rect
|
|
125
|
+
transform="translate({x + dx + insetLeft},{y + insetBottom + dy})"
|
|
126
|
+
width={width - insetLeft - insetRight}
|
|
127
|
+
height={height - insetTop - insetBottom}
|
|
128
|
+
class={[styleClass, className]}
|
|
129
|
+
{style}
|
|
130
|
+
use:addEventHandlers={{
|
|
131
|
+
getPlotState,
|
|
132
|
+
options,
|
|
133
|
+
datum: datum?.datum
|
|
134
|
+
}} />
|
|
135
|
+
{/if}
|
|
136
|
+
</Anchor>
|
|
@@ -12,6 +12,64 @@ export type BollingerOptions = {
|
|
|
12
12
|
export declare function bollingerX(args: TransformArg<DataRecord>, options?: BollingerOptions): TransformArg<DataRecord>;
|
|
13
13
|
export declare function bollingerY(args: TransformArg<DataRecord>, options?: BollingerOptions): TransformArg<DataRecord>;
|
|
14
14
|
export declare function bollingerDim(dim: 'x' | 'y', { data, ...channels }: TransformArg<DataRecord>, options?: BollingerOptions): {
|
|
15
|
+
filter?: import("../types.js").ConstantAccessor<boolean>;
|
|
16
|
+
facet?: "auto" | "include" | "exclude" | undefined;
|
|
17
|
+
fx?: import("../types.js").ChannelAccessor;
|
|
18
|
+
fy?: import("../types.js").ChannelAccessor;
|
|
19
|
+
dx?: import("../types.js").ConstantAccessor<number>;
|
|
20
|
+
dy?: import("../types.js").ConstantAccessor<number>;
|
|
21
|
+
fill?: import("../types.js").ConstantAccessor<string>;
|
|
22
|
+
fillOpacity?: import("../types.js").ConstantAccessor<number>;
|
|
23
|
+
sort?: string | import("../types.js").ConstantAccessor<import("../types.js").RawValue> | ((a: import("../types.js").RawValue, b: import("../types.js").RawValue) => number) | {
|
|
24
|
+
channel: string;
|
|
25
|
+
order?: "ascending" | "descending";
|
|
26
|
+
};
|
|
27
|
+
stroke?: import("../types.js").ConstantAccessor<string>;
|
|
28
|
+
strokeWidth?: import("../types.js").ConstantAccessor<number>;
|
|
29
|
+
strokeOpacity?: import("../types.js").ConstantAccessor<number>;
|
|
30
|
+
strokeLinejoin?: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin>;
|
|
31
|
+
strokeLinecap?: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinecap>;
|
|
32
|
+
strokeMiterlimit?: import("../types.js").ConstantAccessor<number>;
|
|
33
|
+
opacity?: import("../types.js").ConstantAccessor<number>;
|
|
34
|
+
strokeDasharray?: import("../types.js").ConstantAccessor<string>;
|
|
35
|
+
strokeDashoffset?: import("../types.js").ConstantAccessor<number>;
|
|
36
|
+
mixBlendMode?: import("../types.js").ConstantAccessor<import("csstype").Property.MixBlendMode>;
|
|
37
|
+
clipPath?: string | undefined;
|
|
38
|
+
imageFilter?: import("../types.js").ConstantAccessor<string>;
|
|
39
|
+
shapeRendering?: import("../types.js").ConstantAccessor<import("csstype").Property.ShapeRendering>;
|
|
40
|
+
paintOrder?: import("../types.js").ConstantAccessor<string>;
|
|
41
|
+
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
42
|
+
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
43
|
+
onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
44
|
+
onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
45
|
+
onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
46
|
+
onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
47
|
+
onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
48
|
+
onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
49
|
+
onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
50
|
+
onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
51
|
+
onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
52
|
+
onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
53
|
+
onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
54
|
+
onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
55
|
+
onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
56
|
+
onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
57
|
+
onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
58
|
+
ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
59
|
+
ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
60
|
+
ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
61
|
+
ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
62
|
+
ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
63
|
+
ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
64
|
+
ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
65
|
+
ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
66
|
+
ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
67
|
+
ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
68
|
+
ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
69
|
+
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
70
|
+
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
71
|
+
class?: string | null | undefined;
|
|
72
|
+
cursor?: import("../types.js").ConstantAccessor<import("csstype").Property.Cursor>;
|
|
15
73
|
data: {
|
|
16
74
|
__x: import("../types.js").RawValue;
|
|
17
75
|
__lo: number;
|
|
@@ -2,6 +2,64 @@ import type { DataRecord, TransformArg } from '../types.js';
|
|
|
2
2
|
export declare function geoCentroid({ data, ...options }: TransformArg<DataRecord>): {
|
|
3
3
|
x: (d: any) => any;
|
|
4
4
|
y: (d: any) => any;
|
|
5
|
+
filter?: import("../types.js").ConstantAccessor<boolean>;
|
|
6
|
+
facet?: "auto" | "include" | "exclude" | undefined;
|
|
7
|
+
fx?: import("../types.js").ChannelAccessor;
|
|
8
|
+
fy?: import("../types.js").ChannelAccessor;
|
|
9
|
+
dx?: import("../types.js").ConstantAccessor<number>;
|
|
10
|
+
dy?: import("../types.js").ConstantAccessor<number>;
|
|
11
|
+
fill?: import("../types.js").ConstantAccessor<string>;
|
|
12
|
+
fillOpacity?: import("../types.js").ConstantAccessor<number>;
|
|
13
|
+
sort?: string | import("../types.js").ConstantAccessor<import("../types.js").RawValue> | ((a: import("../types.js").RawValue, b: import("../types.js").RawValue) => number) | {
|
|
14
|
+
channel: string;
|
|
15
|
+
order?: "ascending" | "descending";
|
|
16
|
+
};
|
|
17
|
+
stroke?: import("../types.js").ConstantAccessor<string>;
|
|
18
|
+
strokeWidth?: import("../types.js").ConstantAccessor<number>;
|
|
19
|
+
strokeOpacity?: import("../types.js").ConstantAccessor<number>;
|
|
20
|
+
strokeLinejoin?: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin>;
|
|
21
|
+
strokeLinecap?: import("../types.js").ConstantAccessor<import("csstype").Property.StrokeLinecap>;
|
|
22
|
+
strokeMiterlimit?: import("../types.js").ConstantAccessor<number>;
|
|
23
|
+
opacity?: import("../types.js").ConstantAccessor<number>;
|
|
24
|
+
strokeDasharray?: import("../types.js").ConstantAccessor<string>;
|
|
25
|
+
strokeDashoffset?: import("../types.js").ConstantAccessor<number>;
|
|
26
|
+
mixBlendMode?: import("../types.js").ConstantAccessor<import("csstype").Property.MixBlendMode>;
|
|
27
|
+
clipPath?: string | undefined;
|
|
28
|
+
imageFilter?: import("../types.js").ConstantAccessor<string>;
|
|
29
|
+
shapeRendering?: import("../types.js").ConstantAccessor<import("csstype").Property.ShapeRendering>;
|
|
30
|
+
paintOrder?: import("../types.js").ConstantAccessor<string>;
|
|
31
|
+
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
32
|
+
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
33
|
+
onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
34
|
+
onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
35
|
+
onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
36
|
+
onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
37
|
+
onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
38
|
+
onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
39
|
+
onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
40
|
+
onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
41
|
+
onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
42
|
+
onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
43
|
+
onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
44
|
+
onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
45
|
+
onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
46
|
+
onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
47
|
+
onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
48
|
+
ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
49
|
+
ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
50
|
+
ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
51
|
+
ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
52
|
+
ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
53
|
+
ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
54
|
+
ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
55
|
+
ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
56
|
+
ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
57
|
+
ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
58
|
+
ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
59
|
+
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
60
|
+
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
|
|
61
|
+
class?: string | null | undefined;
|
|
62
|
+
cursor?: import("../types.js").ConstantAccessor<import("csstype").Property.Cursor>;
|
|
5
63
|
data: {
|
|
6
64
|
__centroid__: [number, number];
|
|
7
65
|
___orig___?: import("../types.js").RawValue | [import("../types.js").RawValue, import("../types.js").RawValue];
|