svelteplot 0.10.1-pr-357.2 → 0.10.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.d.ts +4 -4
- package/dist/constants.d.ts +1 -1
- package/dist/helpers/colors.d.ts +11 -8
- package/dist/helpers/curves.d.ts +2 -2
- package/dist/helpers/facets.d.ts +1 -1
- package/dist/helpers/getBaseStyles.d.ts +4 -2
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/reduce.d.ts +1 -1
- package/dist/helpers/scales.d.ts +7 -7
- package/dist/helpers/symbols.d.ts +1 -1
- package/dist/helpers/time.d.ts +3 -3
- package/dist/helpers/typeChecks.d.ts +4 -4
- package/dist/marks/Area.svelte.d.ts +4 -5
- package/dist/marks/AreaX.svelte.d.ts +4 -4
- package/dist/marks/AreaY.svelte +0 -1
- package/dist/marks/Arrow.svelte.d.ts +4 -5
- package/dist/marks/AxisX.svelte.d.ts +5 -6
- package/dist/marks/AxisY.svelte.d.ts +5 -6
- package/dist/marks/BarX.svelte.d.ts +4 -4
- package/dist/marks/BarY.svelte.d.ts +4 -5
- package/dist/marks/BollingerX.svelte.d.ts +77 -2
- package/dist/marks/BollingerY.svelte.d.ts +77 -2
- package/dist/marks/BoxY.svelte.d.ts +64 -1
- package/dist/marks/Brush.svelte.d.ts +64 -1
- package/dist/marks/Cell.svelte.d.ts +4 -5
- package/dist/marks/CellX.svelte.d.ts +30 -30
- package/dist/marks/CellY.svelte.d.ts +30 -30
- package/dist/marks/CustomMark.svelte.d.ts +85 -2
- package/dist/marks/DifferenceY.svelte.d.ts +64 -1
- package/dist/marks/Dot.svelte.d.ts +4 -5
- package/dist/marks/DotX.svelte.d.ts +5 -5
- package/dist/marks/DotY.svelte.d.ts +5 -5
- package/dist/marks/Frame.svelte.d.ts +5 -6
- package/dist/marks/Geo.svelte.d.ts +4 -5
- package/dist/marks/GridX.svelte.d.ts +4 -5
- package/dist/marks/GridY.svelte.d.ts +4 -5
- package/dist/marks/Image.svelte.d.ts +4 -5
- package/dist/marks/Line.svelte.d.ts +4 -4
- package/dist/marks/LineX.svelte.d.ts +6 -6
- package/dist/marks/LineY.svelte.d.ts +6 -6
- package/dist/marks/Link.svelte.d.ts +4 -5
- package/dist/marks/Rect.svelte.d.ts +4 -5
- package/dist/marks/RuleX.svelte.d.ts +4 -5
- package/dist/marks/RuleY.svelte.d.ts +4 -5
- package/dist/marks/Spike.svelte.d.ts +5 -5
- package/dist/marks/Text.svelte.d.ts +8 -9
- package/dist/marks/TickX.svelte.d.ts +4 -5
- package/dist/marks/TickY.svelte.d.ts +4 -5
- package/dist/marks/Trail.svelte.d.ts +64 -1
- package/dist/marks/Vector.svelte.d.ts +4 -5
- package/dist/marks/WaffleX.svelte.d.ts +86 -2
- package/dist/marks/WaffleY.svelte.d.ts +4 -5
- package/dist/marks/helpers/Box.svelte.d.ts +64 -1
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +107 -2
- package/dist/transforms/centroid.d.ts +4 -1
- package/dist/transforms/interval.d.ts +18 -18
- package/dist/transforms/recordize.d.ts +7 -4
- package/dist/transforms/rename.d.ts +1 -1
- package/dist/transforms/select.d.ts +182 -182
- package/dist/transforms/sort.d.ts +39 -34
- package/dist/transforms/stack.d.ts +12 -12
- package/dist/transforms/window.d.ts +136 -2
- package/dist/ui/Checkbox.svelte +14 -0
- package/dist/ui/Checkbox.svelte.d.ts +13 -0
- package/dist/ui/ExamplesGrid.svelte +81 -0
- package/dist/ui/ExamplesGrid.svelte.d.ts +11 -0
- package/dist/ui/ExamplesPageList.svelte +63 -0
- package/dist/ui/ExamplesPageList.svelte.d.ts +12 -0
- package/dist/ui/ExamplesPagePreview.svelte +145 -0
- package/dist/ui/ExamplesPagePreview.svelte.d.ts +12 -0
- package/dist/ui/RadioInput.svelte +27 -0
- package/dist/ui/RadioInput.svelte.d.ts +9 -0
- package/dist/ui/Select.svelte +27 -0
- package/dist/ui/Select.svelte.d.ts +9 -0
- package/dist/ui/Slider.svelte +47 -0
- package/dist/ui/Slider.svelte.d.ts +11 -0
- package/dist/ui/Spiral.svelte +35 -0
- package/dist/ui/Spiral.svelte.d.ts +15 -0
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.js +4 -0
- package/dist/ui/isDark.svelte.d.ts +6 -0
- package/dist/ui/isDark.svelte.js +10 -0
- package/package.json +1 -1
- package/dist/marks/AreaY.svelte.d.ts +0 -110
- package/dist/transforms/normalize.d.ts +0 -34
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { resolve } from '$app/paths';
|
|
3
|
+
import { useDark } from './isDark.svelte';
|
|
4
|
+
|
|
5
|
+
const exampleImages = import.meta.glob('../../snapshots/*/*.png', {
|
|
6
|
+
eager: true,
|
|
7
|
+
query: {
|
|
8
|
+
enhanced: true,
|
|
9
|
+
w: 440
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
paths,
|
|
15
|
+
pages
|
|
16
|
+
}: {
|
|
17
|
+
paths: Record<string, string[]>;
|
|
18
|
+
pages: Record<
|
|
19
|
+
string,
|
|
20
|
+
{
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
sortKey?: number;
|
|
24
|
+
transforms?: string[];
|
|
25
|
+
}
|
|
26
|
+
>;
|
|
27
|
+
} = $props();
|
|
28
|
+
|
|
29
|
+
const ds = useDark();
|
|
30
|
+
|
|
31
|
+
function sortPages(a: string, b: string) {
|
|
32
|
+
const sortA = pages[a].sortKey ?? 10;
|
|
33
|
+
const sortB = pages[b].sortKey ?? 10;
|
|
34
|
+
return sortA - sortB;
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div class="column-container">
|
|
39
|
+
{#each Object.entries(paths).sort( (a, b) => a[0].localeCompare(b[0]) ) as [group, groupPages] (group)}
|
|
40
|
+
<div>
|
|
41
|
+
<h2 id={group}>
|
|
42
|
+
<a href={resolve(`/examples/${group}`)}
|
|
43
|
+
>{pages[groupPages.find((p) => p.endsWith('/_index.svelte'))]?.title ??
|
|
44
|
+
group}</a>
|
|
45
|
+
</h2>
|
|
46
|
+
<div class="example-grid">
|
|
47
|
+
{#each groupPages
|
|
48
|
+
.sort(sortPages)
|
|
49
|
+
.filter((p) => !p.endsWith('/_index.svelte')) as page (page)}
|
|
50
|
+
{@const imageKey = `../../snapshots/${page
|
|
51
|
+
.replace('./', '')
|
|
52
|
+
.replace('.svelte', ds.isDark ? '.dark.png' : '.png')}`}
|
|
53
|
+
<a
|
|
54
|
+
animate:slide
|
|
55
|
+
href={resolve(page.replace('./', './examples/').replace('.svelte', ''))}
|
|
56
|
+
><div>
|
|
57
|
+
{#if exampleImages[imageKey]}
|
|
58
|
+
<enhanced:img
|
|
59
|
+
title={pages[page].title}
|
|
60
|
+
src={exampleImages[imageKey].default}
|
|
61
|
+
alt={pages[page].title} />
|
|
62
|
+
{/if}
|
|
63
|
+
<div class="title">{pages[page].title}</div>
|
|
64
|
+
</div></a>
|
|
65
|
+
{/each}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
{/each}
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
:global(.content) h2 {
|
|
73
|
+
margin-top: 1rem !important;
|
|
74
|
+
margin-bottom: 1rem;
|
|
75
|
+
text-transform: capitalize;
|
|
76
|
+
border: 0;
|
|
77
|
+
a {
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
color: inherit;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.column-container {
|
|
84
|
+
container-type: inline-size;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.example-grid {
|
|
88
|
+
--example-grid-columns: 5;
|
|
89
|
+
|
|
90
|
+
/* width: 100%; */
|
|
91
|
+
display: grid;
|
|
92
|
+
/* overflow-x: clip; */
|
|
93
|
+
grid-template-columns: repeat(var(--example-grid-columns), 1fr);
|
|
94
|
+
grid-auto-rows: 1fr;
|
|
95
|
+
gap: 1.25rem;
|
|
96
|
+
|
|
97
|
+
a {
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
color: inherit;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.title {
|
|
103
|
+
font-size: 0.75rem;
|
|
104
|
+
opacity: 0.8;
|
|
105
|
+
line-height: 1.2;
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@container (max-width: 800px) {
|
|
111
|
+
.example-grid {
|
|
112
|
+
--example-grid-columns: 4;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
@container (max-width: 600px) {
|
|
116
|
+
.example-grid {
|
|
117
|
+
--example-grid-columns: 3;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
@container (max-width: 500px) {
|
|
121
|
+
.example-grid {
|
|
122
|
+
--example-grid-columns: 2;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.example-grid :global(img) {
|
|
127
|
+
height: auto !important;
|
|
128
|
+
aspect-ratio: 4 / 3;
|
|
129
|
+
object-fit: cover;
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: auto;
|
|
132
|
+
|
|
133
|
+
position: relative;
|
|
134
|
+
transition: transform 0.05s ease-out;
|
|
135
|
+
&:hover {
|
|
136
|
+
transform: scale(1.5);
|
|
137
|
+
object-fit: contain;
|
|
138
|
+
z-index: 1;
|
|
139
|
+
|
|
140
|
+
background: fixed var(--svelteplot-bg);
|
|
141
|
+
|
|
142
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
paths: Record<string, string[]>;
|
|
3
|
+
pages: Record<string, {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
sortKey?: number;
|
|
7
|
+
transforms?: string[];
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
declare const ExamplesPagePreview: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type ExamplesPagePreview = ReturnType<typeof ExamplesPagePreview>;
|
|
12
|
+
export default ExamplesPagePreview;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
label = '',
|
|
4
|
+
value = $bindable(),
|
|
5
|
+
options,
|
|
6
|
+
format = (d) => d
|
|
7
|
+
}: {
|
|
8
|
+
label?: string;
|
|
9
|
+
value: string | number | undefined;
|
|
10
|
+
options: any[];
|
|
11
|
+
format?: (d: any) => string;
|
|
12
|
+
} = $props();
|
|
13
|
+
|
|
14
|
+
const randomId = (Math.random() * 1e7).toString(32);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div style="display:inline-block">
|
|
18
|
+
{#if label}
|
|
19
|
+
<label for={randomId}>{label}:</label>
|
|
20
|
+
{/if}
|
|
21
|
+
{#each options as p (p)}
|
|
22
|
+
<label>
|
|
23
|
+
<input type="radio" id={randomId} bind:group={value} value={p} />
|
|
24
|
+
{format(p)}
|
|
25
|
+
</label>
|
|
26
|
+
{/each}
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
value: string | number | undefined;
|
|
4
|
+
options: any[];
|
|
5
|
+
format?: (d: any) => string;
|
|
6
|
+
};
|
|
7
|
+
declare const RadioInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
+
type RadioInput = ReturnType<typeof RadioInput>;
|
|
9
|
+
export default RadioInput;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
label = '',
|
|
4
|
+
value = $bindable(),
|
|
5
|
+
options,
|
|
6
|
+
format = (d) => d
|
|
7
|
+
}: {
|
|
8
|
+
label?: string;
|
|
9
|
+
value: string | number | undefined;
|
|
10
|
+
options: any[];
|
|
11
|
+
format?: (d: any) => string;
|
|
12
|
+
} = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<label
|
|
16
|
+
>{label || ''}
|
|
17
|
+
<select bind:value>
|
|
18
|
+
{#each options as p (p)}
|
|
19
|
+
<option value={p}>{format(p)}</option>
|
|
20
|
+
{/each}
|
|
21
|
+
</select></label>
|
|
22
|
+
|
|
23
|
+
<style>
|
|
24
|
+
label {
|
|
25
|
+
margin-right: 1em;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
value: string | number | undefined;
|
|
4
|
+
options: any[];
|
|
5
|
+
format?: (d: any) => string;
|
|
6
|
+
};
|
|
7
|
+
declare const Select: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
+
type Select = ReturnType<typeof Select>;
|
|
9
|
+
export default Select;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
label,
|
|
4
|
+
value = $bindable(),
|
|
5
|
+
min = 0,
|
|
6
|
+
max = 100,
|
|
7
|
+
step = 1,
|
|
8
|
+
type = 'range'
|
|
9
|
+
}: {
|
|
10
|
+
label: string;
|
|
11
|
+
type?: 'range' | 'number';
|
|
12
|
+
value: number;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
step?: number;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<label>
|
|
20
|
+
<span>{label}:</span>
|
|
21
|
+
{#if type === 'range'}
|
|
22
|
+
<input type="range" bind:value {min} {max} {step} />
|
|
23
|
+
<span class="value">({value})</span>{:else}
|
|
24
|
+
<input
|
|
25
|
+
type="number"
|
|
26
|
+
style:width={`${`${Math.max(Math.abs(min), Math.abs(max))}`.length}rem`}
|
|
27
|
+
bind:value
|
|
28
|
+
{min}
|
|
29
|
+
{max}
|
|
30
|
+
{step} />
|
|
31
|
+
{/if}
|
|
32
|
+
</label>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
label {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
gap: 1ex;
|
|
38
|
+
margin-right: 1em;
|
|
39
|
+
}
|
|
40
|
+
.value {
|
|
41
|
+
opacity: 0.5;
|
|
42
|
+
}
|
|
43
|
+
input {
|
|
44
|
+
accent-color: var(--svp-accent);
|
|
45
|
+
width: 15ex;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
label: string;
|
|
3
|
+
type?: 'range' | 'number';
|
|
4
|
+
value: number;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const Slider: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
10
|
+
type Slider = ReturnType<typeof Slider>;
|
|
11
|
+
export default Slider;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte';
|
|
3
|
+
|
|
4
|
+
let { numTurns = 4, finalRadius = 10, duration = 2, ...restProps } = $props();
|
|
5
|
+
|
|
6
|
+
const plot = usePlot();
|
|
7
|
+
|
|
8
|
+
const pathD = $derived.by(() => {
|
|
9
|
+
const numPoints = 100;
|
|
10
|
+
const k = finalRadius / (2 * Math.PI * numTurns);
|
|
11
|
+
const angleStep = (2 * Math.PI * numTurns) / numPoints;
|
|
12
|
+
|
|
13
|
+
const points = [];
|
|
14
|
+
for (let i = 0; i <= numPoints; i++) {
|
|
15
|
+
const t = i * angleStep;
|
|
16
|
+
const r = k * t;
|
|
17
|
+
const x = r * Math.cos(t);
|
|
18
|
+
const y = r * Math.sin(t);
|
|
19
|
+
points.push([x, y]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let d = `M ${points[0][0].toFixed(2)},${points[0][1].toFixed(2)} `;
|
|
23
|
+
for (let i = 1; i < points.length; i++) {
|
|
24
|
+
d += `L ${points[i][0].toFixed(2)},${points[i][1].toFixed(2)} `;
|
|
25
|
+
}
|
|
26
|
+
return d.trim();
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<path
|
|
31
|
+
d={pathD}
|
|
32
|
+
style:animation-duration="{duration}s"
|
|
33
|
+
stroke="currentColor"
|
|
34
|
+
fill="none"
|
|
35
|
+
{...restProps} />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default Spiral;
|
|
2
|
+
type Spiral = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Spiral: import("svelte").Component<{
|
|
7
|
+
numTurns?: number;
|
|
8
|
+
finalRadius?: number;
|
|
9
|
+
duration?: number;
|
|
10
|
+
} & Record<string, any>, {}, "">;
|
|
11
|
+
type $$ComponentProps = {
|
|
12
|
+
numTurns?: number;
|
|
13
|
+
finalRadius?: number;
|
|
14
|
+
duration?: number;
|
|
15
|
+
} & Record<string, any>;
|
package/dist/ui/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { ChannelAccessor, DataRow } from '../types/index.js';
|
|
2
|
-
declare function $$render<Datum extends DataRow>(): {
|
|
3
|
-
props: Omit<Partial<{
|
|
4
|
-
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
|
|
5
|
-
facet: "auto" | "include" | "exclude";
|
|
6
|
-
fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
7
|
-
fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
8
|
-
dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
9
|
-
dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
10
|
-
dodgeX: DodgeXOptions;
|
|
11
|
-
dodgeY: DodgeYOptions;
|
|
12
|
-
fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
13
|
-
fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
14
|
-
sort: {
|
|
15
|
-
channel: string;
|
|
16
|
-
order?: "ascending" | "descending";
|
|
17
|
-
} | ((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>>;
|
|
18
|
-
stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
19
|
-
strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
20
|
-
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
21
|
-
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data").RawValue>>;
|
|
22
|
-
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data").RawValue>>;
|
|
23
|
-
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
24
|
-
opacity: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
25
|
-
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
26
|
-
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
27
|
-
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data").RawValue>>;
|
|
28
|
-
clipPath: string;
|
|
29
|
-
mask: string;
|
|
30
|
-
imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
31
|
-
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data").RawValue>>;
|
|
32
|
-
paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
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;
|
|
65
|
-
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data").RawValue>>;
|
|
66
|
-
}> & import("../types/mark").LinkableMarkProps<Record<string | symbol, import("../types/data").RawValue>> & {
|
|
67
|
-
data: Record<string | symbol, import("../types/data").RawValue>[];
|
|
68
|
-
x1?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
69
|
-
x2?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
70
|
-
y1?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
71
|
-
y2?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
72
|
-
z?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
73
|
-
curve?: import("../types/index.js").CurveName | import("d3-shape").CurveFactory;
|
|
74
|
-
tension?: number;
|
|
75
|
-
sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
|
|
76
|
-
channel: "stroke" | "fill";
|
|
77
|
-
};
|
|
78
|
-
stack?: Partial<import("../transforms/stack.js").StackOptions>;
|
|
79
|
-
canvas?: boolean;
|
|
80
|
-
areaClass?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
81
|
-
}, "x1" | "x2"> & {
|
|
82
|
-
x?: ChannelAccessor<Datum>;
|
|
83
|
-
y?: ChannelAccessor<Datum>;
|
|
84
|
-
};
|
|
85
|
-
exports: {};
|
|
86
|
-
bindings: "";
|
|
87
|
-
slots: {};
|
|
88
|
-
events: {};
|
|
89
|
-
};
|
|
90
|
-
declare class __sveltets_Render<Datum extends DataRow> {
|
|
91
|
-
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
92
|
-
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
93
|
-
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
94
|
-
bindings(): "";
|
|
95
|
-
exports(): {};
|
|
96
|
-
}
|
|
97
|
-
interface $$IsomorphicComponent {
|
|
98
|
-
new <Datum extends DataRow>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Datum>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Datum>['props']>, ReturnType<__sveltets_Render<Datum>['events']>, ReturnType<__sveltets_Render<Datum>['slots']>> & {
|
|
99
|
-
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
100
|
-
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
101
|
-
<Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
102
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Creates a vertical area chart with y value and baseline. Areas are implicitly
|
|
106
|
-
* stacked vertically if just the y channel is defined.
|
|
107
|
-
*/
|
|
108
|
-
declare const AreaY: $$IsomorphicComponent;
|
|
109
|
-
type AreaY<Datum extends DataRow> = InstanceType<typeof AreaY<Datum>>;
|
|
110
|
-
export default AreaY;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { TransformArg, RawValue, MapIndexObject } from '../types/index.js';
|
|
2
|
-
import { sort } from './sort.js';
|
|
3
|
-
type BasisFunction = (I: number[], S: RawValue[]) => number;
|
|
4
|
-
type NormalizeBasis = 'deviation' | 'first' | 'last' | 'min' | 'max' | 'mean' | 'median' | 'sum' | 'extent' | BasisFunction | MapIndexObject;
|
|
5
|
-
type NormalizeOptions = NormalizeBasis | {
|
|
6
|
-
basis: NormalizeBasis;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Normalizes the x values based on the specified basis. Uses mapX.
|
|
10
|
-
*/
|
|
11
|
-
export declare function normalizeX<T>(args: TransformArg<T>, options: NormalizeOptions): any;
|
|
12
|
-
/**
|
|
13
|
-
* Normalizes the y values based on the specified basis. Uses mapY.
|
|
14
|
-
*/
|
|
15
|
-
export declare function normalizeY<T>(args: TransformArg<T>, options: NormalizeOptions): any;
|
|
16
|
-
/**
|
|
17
|
-
* Convenience wrapper for normalizeY for parallel coordinates.
|
|
18
|
-
*
|
|
19
|
-
* Channels:
|
|
20
|
-
* - x: the categorical axis (e.g., 'Measurement')
|
|
21
|
-
* - y: the value to normalize (e.g., 'Value')
|
|
22
|
-
* - z: the grouping variable (e.g., 'Id')
|
|
23
|
-
*/
|
|
24
|
-
export declare function normalizeParallelY<T>(args: TransformArg<T>, basis: NormalizeBasis): ReturnType<typeof sort<T>>;
|
|
25
|
-
/**
|
|
26
|
-
* Convenience wrapper for normalizeY for parallel coordinates.
|
|
27
|
-
*
|
|
28
|
-
* Channels:
|
|
29
|
-
* - x: the categorical axis (e.g., 'Measurement')
|
|
30
|
-
* - y: the value to normalize (e.g., 'Value')
|
|
31
|
-
* - z: the grouping variable (e.g., 'Id')
|
|
32
|
-
*/
|
|
33
|
-
export declare function normalizeParallelX<T>(args: TransformArg<T>, basis: NormalizeBasis): ReturnType<typeof sort<T>>;
|
|
34
|
-
export {};
|