svelteplot 0.3.4 → 0.3.5-pr-121.0
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 +25 -27
- package/dist/Mark.svelte.d.ts +87 -17
- package/dist/Plot.svelte +1 -2
- package/dist/Plot.svelte.d.ts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/core/Facet.svelte +1 -1
- package/dist/core/Facet.svelte.d.ts +1 -1
- package/dist/core/FacetAxes.svelte +3 -1
- package/dist/core/FacetGrid.svelte +1 -1
- package/dist/core/FacetGrid.svelte.d.ts +1 -1
- package/dist/core/Plot.svelte +1 -1
- package/dist/core/Plot.svelte.d.ts +1 -1
- package/dist/helpers/autoScales.d.ts +1 -1
- package/dist/helpers/autoTicks.d.ts +1 -1
- package/dist/helpers/autoTicks.js +1 -1
- package/dist/helpers/callWithProps.d.ts +1 -1
- package/dist/helpers/colors.d.ts +2 -2
- package/dist/helpers/curves.d.ts +1 -1
- package/dist/helpers/facets.d.ts +1 -1
- package/dist/helpers/getBaseStyles.d.ts +2 -2
- package/dist/helpers/group.d.ts +1 -1
- package/dist/helpers/index.d.ts +3 -3
- package/dist/helpers/isDataRecord.d.ts +1 -1
- package/dist/helpers/isRawValue.d.ts +1 -1
- package/dist/helpers/projection.d.ts +1 -1
- package/dist/helpers/reduce.d.ts +1 -1
- package/dist/helpers/regressionLoess.d.ts +1 -1
- package/dist/helpers/resolve.d.ts +3 -3
- package/dist/helpers/scales.d.ts +2 -2
- package/dist/helpers/typeChecks.d.ts +5 -5
- package/dist/marks/Area.svelte +14 -17
- package/dist/marks/Area.svelte.d.ts +91 -19
- package/dist/marks/AreaX.svelte +15 -12
- package/dist/marks/AreaX.svelte.d.ts +94 -3
- package/dist/marks/AreaY.svelte +15 -15
- package/dist/marks/AreaY.svelte.d.ts +94 -3
- package/dist/marks/Arrow.svelte +16 -19
- package/dist/marks/Arrow.svelte.d.ts +110 -38
- package/dist/marks/AxisX.svelte +60 -56
- package/dist/marks/AxisX.svelte.d.ts +98 -25
- package/dist/marks/AxisY.svelte +73 -54
- package/dist/marks/AxisY.svelte.d.ts +100 -27
- package/dist/marks/BarX.svelte +28 -30
- package/dist/marks/BarX.svelte.d.ts +89 -17
- package/dist/marks/BarY.svelte +27 -27
- package/dist/marks/BarY.svelte.d.ts +88 -16
- package/dist/marks/BollingerX.svelte +21 -16
- package/dist/marks/BollingerX.svelte.d.ts +17 -16
- package/dist/marks/BollingerY.svelte +21 -16
- package/dist/marks/BollingerY.svelte.d.ts +17 -16
- package/dist/marks/BoxX.svelte +5 -7
- package/dist/marks/BoxX.svelte.d.ts +5 -3
- package/dist/marks/BoxY.svelte +13 -16
- package/dist/marks/BoxY.svelte.d.ts +41 -28
- package/dist/marks/Brush.svelte +27 -30
- package/dist/marks/Brush.svelte.d.ts +20 -15
- package/dist/marks/BrushX.svelte +9 -7
- package/dist/marks/BrushX.svelte.d.ts +5 -2
- package/dist/marks/BrushY.svelte +9 -7
- package/dist/marks/BrushY.svelte.d.ts +5 -2
- package/dist/marks/Cell.svelte +17 -18
- package/dist/marks/Cell.svelte.d.ts +80 -8
- package/dist/marks/CellX.svelte +12 -8
- package/dist/marks/CellX.svelte.d.ts +5 -2
- package/dist/marks/CellY.svelte +12 -8
- package/dist/marks/CellY.svelte.d.ts +5 -2
- package/dist/marks/ColorLegend.svelte +5 -8
- package/dist/marks/ColorLegend.svelte.d.ts +2 -2
- package/dist/marks/CustomMark.svelte +23 -16
- package/dist/marks/CustomMark.svelte.d.ts +17 -14
- package/dist/marks/CustomMarkHTML.svelte +20 -18
- package/dist/marks/CustomMarkHTML.svelte.d.ts +29 -15
- package/dist/marks/DifferenceY.svelte +54 -18
- package/dist/marks/DifferenceY.svelte.d.ts +59 -28
- package/dist/marks/Dot.svelte +13 -14
- package/dist/marks/Dot.svelte.d.ts +84 -12
- package/dist/marks/DotX.svelte +9 -9
- package/dist/marks/DotX.svelte.d.ts +86 -4
- package/dist/marks/DotY.svelte +10 -9
- package/dist/marks/DotY.svelte.d.ts +87 -5
- package/dist/marks/Frame.svelte +20 -27
- package/dist/marks/Frame.svelte.d.ts +24 -10
- package/dist/marks/Geo.svelte +22 -15
- package/dist/marks/Geo.svelte.d.ts +97 -13
- package/dist/marks/Graticule.svelte +16 -19
- package/dist/marks/Graticule.svelte.d.ts +3 -3
- package/dist/marks/GridX.svelte +5 -8
- package/dist/marks/GridX.svelte.d.ts +79 -7
- package/dist/marks/GridY.svelte +5 -8
- package/dist/marks/GridY.svelte.d.ts +79 -7
- package/dist/marks/HTMLTooltip.svelte +9 -14
- package/dist/marks/HTMLTooltip.svelte.d.ts +25 -12
- package/dist/marks/Line.svelte +24 -29
- package/dist/marks/Line.svelte.d.ts +97 -25
- package/dist/marks/LineX.svelte +9 -4
- package/dist/marks/LineX.svelte.d.ts +99 -3
- package/dist/marks/LineY.svelte +11 -5
- package/dist/marks/LineY.svelte.d.ts +100 -4
- package/dist/marks/Link.svelte +35 -19
- package/dist/marks/Link.svelte.d.ts +107 -18
- package/dist/marks/Pointer.svelte +13 -18
- package/dist/marks/Pointer.svelte.d.ts +34 -21
- package/dist/marks/Rect.svelte +19 -19
- package/dist/marks/Rect.svelte.d.ts +86 -13
- package/dist/marks/RectX.svelte +10 -9
- package/dist/marks/RectX.svelte.d.ts +22 -6
- package/dist/marks/RectY.svelte +9 -10
- package/dist/marks/RectY.svelte.d.ts +22 -6
- package/dist/marks/RegressionX.svelte +1 -1
- package/dist/marks/RegressionX.svelte.d.ts +1 -1
- package/dist/marks/RegressionY.svelte +1 -1
- package/dist/marks/RegressionY.svelte.d.ts +1 -1
- package/dist/marks/RuleX.svelte +14 -16
- package/dist/marks/RuleX.svelte.d.ts +84 -12
- package/dist/marks/RuleY.svelte +12 -15
- package/dist/marks/RuleY.svelte.d.ts +84 -12
- package/dist/marks/Sphere.svelte +6 -7
- package/dist/marks/Sphere.svelte.d.ts +3 -2
- package/dist/marks/Spike.svelte +17 -9
- package/dist/marks/Spike.svelte.d.ts +94 -4
- package/dist/marks/SymbolLegend.svelte +1 -1
- package/dist/marks/Text.svelte +25 -23
- package/dist/marks/Text.svelte.d.ts +101 -25
- package/dist/marks/TickX.svelte +12 -13
- package/dist/marks/TickX.svelte.d.ts +92 -20
- package/dist/marks/TickY.svelte +11 -14
- package/dist/marks/TickY.svelte.d.ts +92 -20
- package/dist/marks/Vector.svelte +19 -23
- package/dist/marks/Vector.svelte.d.ts +93 -21
- package/dist/marks/helpers/AreaCanvas.svelte +1 -1
- package/dist/marks/helpers/AreaCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/BaseAxisX.svelte +5 -3
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +1 -1
- package/dist/marks/helpers/BaseAxisY.svelte +10 -8
- package/dist/marks/helpers/BaseAxisY.svelte.d.ts +3 -1
- package/dist/marks/helpers/CanvasLayer.svelte +1 -1
- package/dist/marks/helpers/DotCanvas.svelte +1 -1
- package/dist/marks/helpers/DotCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/GeoCanvas.svelte +1 -1
- package/dist/marks/helpers/GeoCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/LineCanvas.svelte +1 -1
- package/dist/marks/helpers/LineCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/LinearGradientX.svelte +1 -1
- package/dist/marks/helpers/LinearGradientX.svelte.d.ts +1 -1
- package/dist/marks/helpers/LinearGradientY.svelte +1 -1
- package/dist/marks/helpers/LinearGradientY.svelte.d.ts +1 -1
- package/dist/marks/helpers/MarkerPath.svelte +1 -1
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +1 -41
- package/dist/marks/helpers/MultilineText.svelte +1 -1
- package/dist/marks/helpers/MultilineText.svelte.d.ts +1 -1
- package/dist/marks/helpers/RectPath.svelte +29 -26
- package/dist/marks/helpers/RectPath.svelte.d.ts +39 -26
- package/dist/marks/helpers/Regression.svelte +7 -2
- package/dist/marks/helpers/Regression.svelte.d.ts +2 -5
- package/dist/marks/helpers/events.d.ts +1 -1
- package/dist/transforms/bin.d.ts +2 -2
- package/dist/transforms/bollinger.d.ts +2 -67
- package/dist/transforms/centroid.d.ts +8 -66
- package/dist/transforms/centroid.js +10 -7
- package/dist/transforms/filter.d.ts +1 -1
- package/dist/transforms/group.d.ts +5 -13
- package/dist/transforms/interval.d.ts +3 -123
- package/dist/transforms/jitter.d.ts +1 -1
- package/dist/transforms/map.d.ts +4 -184
- package/dist/transforms/normalize.d.ts +3 -123
- package/dist/transforms/recordize.d.ts +1 -1
- package/dist/transforms/rename.d.ts +2 -2
- package/dist/transforms/select.d.ts +8 -428
- package/dist/transforms/shift.d.ts +1 -1
- package/dist/transforms/sort.d.ts +4 -243
- package/dist/transforms/stack.d.ts +1 -1
- package/dist/transforms/window.d.ts +3 -131
- package/dist/types/channel.d.ts +11 -0
- package/dist/types/channel.js +1 -0
- package/dist/types/colorScheme.d.ts +1 -0
- package/dist/types/colorScheme.js +1 -0
- package/dist/types/data.d.ts +13 -0
- package/dist/types/data.js +1 -0
- package/dist/types/facet.d.ts +50 -0
- package/dist/types/facet.js +1 -0
- package/dist/types/index.d.ts +58 -0
- package/dist/types/index.js +7 -0
- package/dist/types/mark.d.ts +123 -0
- package/dist/types/mark.js +1 -0
- package/dist/types/plot.d.ts +459 -0
- package/dist/types/plot.js +1 -0
- package/dist/types/scale.d.ts +143 -0
- package/dist/types/scale.js +1 -0
- package/dist/types.d.ts +120 -127
- package/package.json +125 -120
package/dist/marks/LineY.svelte
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<!-- @component
|
|
2
|
-
Creates a
|
|
2
|
+
Creates a horizontal line chart with x values and index positions for y
|
|
3
3
|
-->
|
|
4
|
-
<script lang="ts">
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<script lang="ts" generics="Datum extends DataRow">
|
|
5
|
+
interface LineYMarkProps extends Omit<ComponentProps<typeof Line>, 'x' | 'data'> {
|
|
6
|
+
data: Datum[];
|
|
7
|
+
}
|
|
8
|
+
import Line from './Line.svelte';
|
|
9
|
+
import { recordizeY } from '..';
|
|
10
|
+
import type { ComponentProps } from 'svelte';
|
|
11
|
+
import type { DataRow } from '..';
|
|
12
|
+
|
|
13
|
+
let { data = [{} as Datum], ...rest }: LineYMarkProps = $props();
|
|
7
14
|
|
|
8
|
-
let { data = [{}], ...rest }: Omit<LineMarkProps, 'x'> = $props();
|
|
9
15
|
let args = $derived(recordizeY({ data, ...rest }));
|
|
10
16
|
</script>
|
|
11
17
|
|
|
@@ -1,5 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
|
|
1
|
+
import { recordizeY } from '..';
|
|
2
|
+
import type { DataRow } from '..';
|
|
3
|
+
declare class __sveltets_Render<Datum extends DataRow> {
|
|
4
|
+
props(): Omit<import("../types").MarkerOptions & Partial<{
|
|
5
|
+
filter?: import("../types").ConstantAccessor<boolean, import("../types").DataRecord>;
|
|
6
|
+
facet?: "auto" | "include" | "exclude";
|
|
7
|
+
fx: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
8
|
+
fy: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
9
|
+
dx: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
10
|
+
dy: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
11
|
+
fill: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
12
|
+
fillOpacity: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
13
|
+
sort: {
|
|
14
|
+
channel: string;
|
|
15
|
+
order?: "ascending" | "descending";
|
|
16
|
+
} | ((a: import("../types").RawValue, b: import("../types").RawValue) => number) | import("../types").ConstantAccessor<import("../types").RawValue, import("../types").DataRecord>;
|
|
17
|
+
stroke: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
18
|
+
strokeWidth: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
19
|
+
strokeOpacity: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
20
|
+
strokeLinejoin: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinejoin, import("../types").DataRecord>;
|
|
21
|
+
strokeLinecap: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinecap, import("../types").DataRecord>;
|
|
22
|
+
strokeMiterlimit: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
23
|
+
opacity: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
24
|
+
strokeDasharray: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
25
|
+
strokeDashoffset: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
26
|
+
mixBlendMode: import("../types").ConstantAccessor<import("csstype").Property.MixBlendMode, import("../types").DataRecord>;
|
|
27
|
+
clipPath: string;
|
|
28
|
+
imageFilter: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
29
|
+
shapeRendering: import("../types").ConstantAccessor<import("csstype").Property.ShapeRendering, import("../types").DataRecord>;
|
|
30
|
+
paintOrder: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
31
|
+
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
32
|
+
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
33
|
+
onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
+
onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
+
onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
+
class: string | null;
|
|
62
|
+
cursor: import("../types").ConstantAccessor<import("csstype").Property.Cursor, import("../types").DataRecord>;
|
|
63
|
+
}> & {
|
|
64
|
+
data?: import("../types").DataRecord[] | undefined;
|
|
65
|
+
x?: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
66
|
+
y?: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
67
|
+
z?: import("../types").ChannelAccessor<import("../types").DataRecord>;
|
|
68
|
+
outlineStroke?: string;
|
|
69
|
+
outlineStrokeWidth?: number;
|
|
70
|
+
outlineStrokeOpacity?: number;
|
|
71
|
+
curve?: import("../types").CurveName | import("d3-shape").CurveFactory | "auto";
|
|
72
|
+
tension?: number;
|
|
73
|
+
sort?: import("../types").ConstantAccessor<recordizeY, Datum_1> | {
|
|
74
|
+
channel: "stroke" | "fill";
|
|
75
|
+
};
|
|
76
|
+
text?: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
77
|
+
textFill?: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
78
|
+
textStroke?: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
79
|
+
textStartOffset?: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
80
|
+
textStrokeWidth?: import("../types").ConstantAccessor<number, import("../types").DataRecord>;
|
|
81
|
+
lineClass?: import("../types").ConstantAccessor<string, import("../types").DataRecord>;
|
|
82
|
+
canvas?: boolean;
|
|
83
|
+
}, "x" | "data"> & {
|
|
84
|
+
data: Datum[];
|
|
85
|
+
};
|
|
86
|
+
events(): {};
|
|
87
|
+
slots(): {};
|
|
88
|
+
bindings(): "";
|
|
89
|
+
exports(): {};
|
|
90
|
+
}
|
|
91
|
+
interface $$IsomorphicComponent {
|
|
92
|
+
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']>> & {
|
|
93
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
94
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
95
|
+
<Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
96
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
97
|
+
}
|
|
98
|
+
/** Creates a horizontal line chart with x values and index positions for y */
|
|
99
|
+
declare const LineY: $$IsomorphicComponent;
|
|
100
|
+
type LineY<Datum extends DataRow> = InstanceType<typeof LineY<Datum>>;
|
|
5
101
|
export default LineY;
|
package/dist/marks/Link.svelte
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
<!-- @component
|
|
2
2
|
Creates connections between pairs of points with optional curve styling and markers
|
|
3
3
|
-->
|
|
4
|
-
<script lang="ts" module>
|
|
5
|
-
export type LinkMarkProps = BaseMarkProps &
|
|
6
|
-
MarkerOptions & {
|
|
7
|
-
data: DataRecord[];
|
|
8
|
-
sort?: ConstantAccessor<RawValue> | { channel: 'stroke' | 'fill' };
|
|
9
|
-
x1: ChannelAccessor;
|
|
10
|
-
y1: ChannelAccessor;
|
|
11
|
-
x2: ChannelAccessor;
|
|
12
|
-
y2: ChannelAccessor;
|
|
13
|
-
curve?: 'auto' | CurveName | CurveFactory;
|
|
14
|
-
tension?: number;
|
|
15
|
-
text: ConstantAccessor<string>;
|
|
16
|
-
children?: Snippet;
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
19
4
|
|
|
20
|
-
<script lang="ts">
|
|
21
|
-
|
|
5
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
6
|
+
interface LinkMarkProps extends BaseMarkProps<Datum>, MarkerOptions {
|
|
7
|
+
data: Datum[];
|
|
8
|
+
sort?: ConstantAccessor<RawValue> | { channel: 'stroke' | 'fill' };
|
|
9
|
+
/**
|
|
10
|
+
* the x1 channel accessor for the start of the link
|
|
11
|
+
*/
|
|
12
|
+
x1: ChannelAccessor<Datum>;
|
|
13
|
+
/**
|
|
14
|
+
* the y1 channel accessor for the start of the link
|
|
15
|
+
*/
|
|
16
|
+
y1: ChannelAccessor<Datum>;
|
|
17
|
+
/**
|
|
18
|
+
* the x2 channel accessor for the end of the link
|
|
19
|
+
*/
|
|
20
|
+
x2: ChannelAccessor<Datum>;
|
|
21
|
+
|
|
22
|
+
y2: ChannelAccessor<Datum>;
|
|
23
|
+
/**
|
|
24
|
+
* the curve type, defaults to 'auto' which uses a linear curve for planar projections
|
|
25
|
+
* and a spherical line for geographic projections
|
|
26
|
+
*/
|
|
27
|
+
curve?: 'auto' | CurveName | CurveFactory;
|
|
28
|
+
/**
|
|
29
|
+
* the tension of the curve, defaults to 0
|
|
30
|
+
*/
|
|
31
|
+
tension?: number;
|
|
32
|
+
/**
|
|
33
|
+
* the text label for the link, can be a constant or a function
|
|
34
|
+
*/
|
|
35
|
+
text?: ConstantAccessor<string, Datum>;
|
|
36
|
+
}
|
|
37
|
+
import { getContext } from 'svelte';
|
|
22
38
|
import type {
|
|
23
39
|
PlotContext,
|
|
24
40
|
DataRecord,
|
|
@@ -30,7 +46,7 @@
|
|
|
30
46
|
RawValue,
|
|
31
47
|
ScaledDataRecord,
|
|
32
48
|
PlotDefaults
|
|
33
|
-
} from '../types.js';
|
|
49
|
+
} from '../types/index.js';
|
|
34
50
|
import { resolveChannel, resolveProp, resolveStyles } from '../helpers/resolve.js';
|
|
35
51
|
import { maybeData } from '../helpers/index.js';
|
|
36
52
|
import Mark from '../Mark.svelte';
|
|
@@ -47,7 +63,7 @@
|
|
|
47
63
|
...getContext<PlotDefaults>('svelteplot/_defaults').link
|
|
48
64
|
};
|
|
49
65
|
const {
|
|
50
|
-
data = [{}],
|
|
66
|
+
data = [{} as Datum],
|
|
51
67
|
curve = 'auto',
|
|
52
68
|
tension = 0,
|
|
53
69
|
text,
|
|
@@ -1,21 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
data: DataRecord[];
|
|
3
|
-
sort?: ConstantAccessor<RawValue> | {
|
|
4
|
-
channel: 'stroke' | 'fill';
|
|
5
|
-
};
|
|
6
|
-
x1: ChannelAccessor;
|
|
7
|
-
y1: ChannelAccessor;
|
|
8
|
-
x2: ChannelAccessor;
|
|
9
|
-
y2: ChannelAccessor;
|
|
10
|
-
curve?: 'auto' | CurveName | CurveFactory;
|
|
11
|
-
tension?: number;
|
|
12
|
-
text: ConstantAccessor<string>;
|
|
13
|
-
children?: Snippet;
|
|
14
|
-
};
|
|
15
|
-
import { type Snippet } from 'svelte';
|
|
16
|
-
import type { DataRecord, BaseMarkProps, ConstantAccessor, ChannelAccessor, CurveName, MarkerOptions, RawValue } from '../types.js';
|
|
1
|
+
import type { DataRecord, ConstantAccessor, ChannelAccessor, CurveName, MarkerOptions, RawValue } from '../types/index.js';
|
|
17
2
|
import { type CurveFactory } from 'd3-shape';
|
|
3
|
+
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
4
|
+
props(): Partial<{
|
|
5
|
+
filter?: ConstantAccessor<boolean, Datum>;
|
|
6
|
+
facet?: "auto" | "include" | "exclude";
|
|
7
|
+
fx: ChannelAccessor<Datum>;
|
|
8
|
+
fy: ChannelAccessor<Datum>;
|
|
9
|
+
dx: ConstantAccessor<number, Datum>;
|
|
10
|
+
dy: ConstantAccessor<number, Datum>;
|
|
11
|
+
fill: ChannelAccessor<Datum>;
|
|
12
|
+
fillOpacity: ConstantAccessor<number, Datum>;
|
|
13
|
+
sort: {
|
|
14
|
+
channel: string;
|
|
15
|
+
order?: "ascending" | "descending";
|
|
16
|
+
} | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
|
|
17
|
+
stroke: ChannelAccessor<Datum>;
|
|
18
|
+
strokeWidth: ConstantAccessor<number, Datum>;
|
|
19
|
+
strokeOpacity: ConstantAccessor<number, Datum>;
|
|
20
|
+
strokeLinejoin: ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
|
|
21
|
+
strokeLinecap: ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
|
|
22
|
+
strokeMiterlimit: ConstantAccessor<number, Datum>;
|
|
23
|
+
opacity: ChannelAccessor<Datum>;
|
|
24
|
+
strokeDasharray: ConstantAccessor<string, Datum>;
|
|
25
|
+
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
26
|
+
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
27
|
+
clipPath: string;
|
|
28
|
+
imageFilter: ConstantAccessor<string, Datum>;
|
|
29
|
+
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
30
|
+
paintOrder: ConstantAccessor<string, Datum>;
|
|
31
|
+
onclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
32
|
+
ondblclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
33
|
+
onmouseup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
34
|
+
onmousedown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
35
|
+
onmouseenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
onmousemove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmouseout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onmouseover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onpointercancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onpointerdown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onpointerup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onpointerenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointerleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointermove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
onpointerout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
ondrag?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
ondrop?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
ondragstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
ondragenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondragleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondragover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ondragend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ontouchstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ontouchmove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ontouchend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
ontouchcancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
oncontextmenu?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
onwheel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
61
|
+
class: string | null;
|
|
62
|
+
cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
63
|
+
}> & MarkerOptions & {
|
|
64
|
+
data: Datum[];
|
|
65
|
+
sort?: ConstantAccessor<RawValue> | {
|
|
66
|
+
channel: "stroke" | "fill";
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* the x1 channel accessor for the start of the link
|
|
70
|
+
*/
|
|
71
|
+
x1: ChannelAccessor<Datum>;
|
|
72
|
+
/**
|
|
73
|
+
* the y1 channel accessor for the start of the link
|
|
74
|
+
*/
|
|
75
|
+
y1: ChannelAccessor<Datum>;
|
|
76
|
+
/**
|
|
77
|
+
* the x2 channel accessor for the end of the link
|
|
78
|
+
*/
|
|
79
|
+
x2: ChannelAccessor<Datum>;
|
|
80
|
+
y2: ChannelAccessor<Datum>;
|
|
81
|
+
/**
|
|
82
|
+
* the curve type, defaults to 'auto' which uses a linear curve for planar projections
|
|
83
|
+
* and a spherical line for geographic projections
|
|
84
|
+
*/
|
|
85
|
+
curve?: "auto" | CurveName | CurveFactory;
|
|
86
|
+
/**
|
|
87
|
+
* the tension of the curve, defaults to 0
|
|
88
|
+
*/
|
|
89
|
+
tension?: number;
|
|
90
|
+
/**
|
|
91
|
+
* the text label for the link, can be a constant or a function
|
|
92
|
+
*/
|
|
93
|
+
text?: ConstantAccessor<string, Datum>;
|
|
94
|
+
};
|
|
95
|
+
events(): {};
|
|
96
|
+
slots(): {};
|
|
97
|
+
bindings(): "";
|
|
98
|
+
exports(): {};
|
|
99
|
+
}
|
|
100
|
+
interface $$IsomorphicComponent {
|
|
101
|
+
new <Datum extends DataRecord>(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']>> & {
|
|
102
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
103
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
104
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
105
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
106
|
+
}
|
|
18
107
|
/** Creates connections between pairs of points with optional curve styling and markers */
|
|
19
|
-
declare const Link:
|
|
20
|
-
type Link =
|
|
108
|
+
declare const Link: $$IsomorphicComponent;
|
|
109
|
+
type Link<Datum extends DataRecord> = InstanceType<typeof Link<Datum>>;
|
|
21
110
|
export default Link;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
y?: ChannelAccessor;
|
|
9
|
-
z?: ChannelAccessor;
|
|
1
|
+
<script lang="ts" generics="Datum extends DataRow">
|
|
2
|
+
interface PointerMarkProps {
|
|
3
|
+
data: Datum[];
|
|
4
|
+
children: Snippet<[{ data: Datum[] }]>;
|
|
5
|
+
x?: ChannelAccessor<Datum>;
|
|
6
|
+
y?: ChannelAccessor<Datum>;
|
|
7
|
+
z?: ChannelAccessor<Datum>;
|
|
10
8
|
/**
|
|
11
9
|
* maximum cursor distance to select data points
|
|
12
10
|
*/
|
|
@@ -15,24 +13,21 @@
|
|
|
15
13
|
* called whenever the selection changes
|
|
16
14
|
* @param data
|
|
17
15
|
*/
|
|
18
|
-
onupdate?: (data:
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
16
|
+
onupdate?: (data: Datum[]) => void;
|
|
17
|
+
}
|
|
21
18
|
|
|
22
|
-
<script lang="ts">
|
|
23
19
|
import { getContext, type Snippet } from 'svelte';
|
|
24
|
-
import type { PlotContext, PlotDefaults } from '../types.js';
|
|
20
|
+
import type { ChannelAccessor, DataRow, PlotContext, PlotDefaults } from '../types/index.js';
|
|
25
21
|
import { groups as d3Groups } from 'd3-array';
|
|
26
|
-
|
|
27
|
-
const { getPlotState } = getContext<PlotContext>('svelteplot');
|
|
28
|
-
const plot = $derived(getPlotState());
|
|
29
|
-
|
|
30
22
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
31
23
|
import { quadtree } from 'd3-quadtree';
|
|
32
24
|
import { projectXY } from '../helpers/scales.js';
|
|
33
25
|
import isDataRecord from '../helpers/isDataRecord.js';
|
|
34
26
|
import { RAW_VALUE } from '../transforms/recordize.js';
|
|
35
27
|
|
|
28
|
+
const { getPlotState } = getContext<PlotContext>('svelteplot');
|
|
29
|
+
const plot = $derived(getPlotState());
|
|
30
|
+
|
|
36
31
|
let markProps: PointerMarkProps = $props();
|
|
37
32
|
|
|
38
33
|
const DEFAULTS = {
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
import type { ChannelAccessor, DataRow } from '../types.js';
|
|
2
|
-
export type PointerMarkProps = {
|
|
3
|
-
data: DataRow[];
|
|
4
|
-
children: Snippet<[{
|
|
5
|
-
data: DataRow[];
|
|
6
|
-
}]>;
|
|
7
|
-
x?: ChannelAccessor;
|
|
8
|
-
y?: ChannelAccessor;
|
|
9
|
-
z?: ChannelAccessor;
|
|
10
|
-
/**
|
|
11
|
-
* maximum cursor distance to select data points
|
|
12
|
-
*/
|
|
13
|
-
maxDistance?: number;
|
|
14
|
-
/**
|
|
15
|
-
* called whenever the selection changes
|
|
16
|
-
* @param data
|
|
17
|
-
*/
|
|
18
|
-
onupdate?: (data: DataRow[]) => void;
|
|
19
|
-
};
|
|
20
1
|
import { type Snippet } from 'svelte';
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
import type { ChannelAccessor, DataRow } from '../types/index.js';
|
|
3
|
+
declare class __sveltets_Render<Datum extends DataRow> {
|
|
4
|
+
props(): {
|
|
5
|
+
data: Datum[];
|
|
6
|
+
children: Snippet<[{
|
|
7
|
+
data: Datum[];
|
|
8
|
+
}]>;
|
|
9
|
+
x?: ChannelAccessor<Datum>;
|
|
10
|
+
y?: ChannelAccessor<Datum>;
|
|
11
|
+
z?: ChannelAccessor<Datum>;
|
|
12
|
+
/**
|
|
13
|
+
* maximum cursor distance to select data points
|
|
14
|
+
*/
|
|
15
|
+
maxDistance?: number;
|
|
16
|
+
/**
|
|
17
|
+
* called whenever the selection changes
|
|
18
|
+
* @param data
|
|
19
|
+
*/
|
|
20
|
+
onupdate?: ((data: Datum[]) => void) | undefined;
|
|
21
|
+
};
|
|
22
|
+
events(): {};
|
|
23
|
+
slots(): {};
|
|
24
|
+
bindings(): "";
|
|
25
|
+
exports(): {};
|
|
26
|
+
}
|
|
27
|
+
interface $$IsomorphicComponent {
|
|
28
|
+
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']>> & {
|
|
29
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
30
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
31
|
+
<Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
32
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
33
|
+
}
|
|
34
|
+
declare const Pointer: $$IsomorphicComponent;
|
|
35
|
+
type Pointer<Datum extends DataRow> = InstanceType<typeof Pointer<Datum>>;
|
|
23
36
|
export default Pointer;
|
package/dist/marks/Rect.svelte
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
@component
|
|
3
3
|
For arbitrary rectangles, requires quantitative x and y scales
|
|
4
4
|
-->
|
|
5
|
-
<script
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
6
|
+
interface RectMarkProps
|
|
7
|
+
extends BaseMarkProps<Datum>,
|
|
8
|
+
LinkableMarkProps<Datum>,
|
|
9
|
+
BaseRectMarkProps<Datum> {
|
|
10
|
+
data: Datum[];
|
|
11
|
+
x?: ChannelAccessor<Datum>;
|
|
12
|
+
x1?: ChannelAccessor<Datum>;
|
|
13
|
+
x2?: ChannelAccessor<Datum>;
|
|
14
|
+
y?: ChannelAccessor<Datum>;
|
|
15
|
+
y1?: ChannelAccessor<Datum>;
|
|
16
|
+
y2?: ChannelAccessor<Datum>;
|
|
14
17
|
interval?: number | string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
BaseRectMarkProps;
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<script lang="ts">
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
21
20
|
import Mark from '../Mark.svelte';
|
|
22
21
|
import { getContext } from 'svelte';
|
|
23
|
-
import { intervalX, intervalY } from '
|
|
22
|
+
import { intervalX, intervalY } from '..';
|
|
24
23
|
import type {
|
|
25
24
|
PlotContext,
|
|
26
25
|
DataRecord,
|
|
27
26
|
BaseMarkProps,
|
|
28
27
|
BaseRectMarkProps,
|
|
29
28
|
ChannelAccessor,
|
|
30
|
-
PlotDefaults
|
|
31
|
-
|
|
29
|
+
PlotDefaults,
|
|
30
|
+
LinkableMarkProps
|
|
31
|
+
} from '../types/index.js';
|
|
32
32
|
import GroupMultiple from './helpers/GroupMultiple.svelte';
|
|
33
33
|
import RectPath from './helpers/RectPath.svelte';
|
|
34
34
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
const {
|
|
42
|
-
data = [{}],
|
|
42
|
+
data = [{} as Datum],
|
|
43
43
|
class: className = '',
|
|
44
44
|
...options
|
|
45
45
|
}: RectMarkProps = $derived({
|
|
@@ -1,15 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import
|
|
1
|
+
import type { DataRecord, BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
2
|
+
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
3
|
+
props(): Partial<{
|
|
4
|
+
filter?: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
5
|
+
facet?: "auto" | "include" | "exclude";
|
|
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
|
+
fill: ChannelAccessor<Datum>;
|
|
11
|
+
fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
12
|
+
sort: {
|
|
13
|
+
channel: string;
|
|
14
|
+
order?: "ascending" | "descending";
|
|
15
|
+
} | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
|
|
16
|
+
stroke: ChannelAccessor<Datum>;
|
|
17
|
+
strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
18
|
+
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
19
|
+
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
|
|
20
|
+
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
|
|
21
|
+
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
22
|
+
opacity: ChannelAccessor<Datum>;
|
|
23
|
+
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
24
|
+
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
25
|
+
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
26
|
+
clipPath: string;
|
|
27
|
+
imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
28
|
+
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
29
|
+
paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
30
|
+
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
31
|
+
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
32
|
+
onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
33
|
+
onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
+
onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
+
onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
+
class: string | null;
|
|
61
|
+
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
62
|
+
}> & LinkableMarkProps<Datum> & BaseRectMarkProps<Datum> & {
|
|
63
|
+
data: Datum[];
|
|
64
|
+
x?: ChannelAccessor<Datum>;
|
|
65
|
+
x1?: ChannelAccessor<Datum>;
|
|
66
|
+
x2?: ChannelAccessor<Datum>;
|
|
67
|
+
y?: ChannelAccessor<Datum>;
|
|
68
|
+
y1?: ChannelAccessor<Datum>;
|
|
69
|
+
y2?: ChannelAccessor<Datum>;
|
|
70
|
+
interval?: number | string;
|
|
71
|
+
className?: string;
|
|
72
|
+
};
|
|
73
|
+
events(): {};
|
|
74
|
+
slots(): {};
|
|
75
|
+
bindings(): "";
|
|
76
|
+
exports(): {};
|
|
77
|
+
}
|
|
78
|
+
interface $$IsomorphicComponent {
|
|
79
|
+
new <Datum extends DataRecord>(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']>> & {
|
|
80
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
81
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
82
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
83
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
84
|
+
}
|
|
12
85
|
/** For arbitrary rectangles, requires quantitative x and y scales */
|
|
13
|
-
declare const Rect:
|
|
14
|
-
type Rect =
|
|
86
|
+
declare const Rect: $$IsomorphicComponent;
|
|
87
|
+
type Rect<Datum extends DataRecord> = InstanceType<typeof Rect<Datum>>;
|
|
15
88
|
export default Rect;
|
package/dist/marks/RectX.svelte
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<!-- @component
|
|
2
2
|
Convenience wrapper for rectangles oriented along the x axis
|
|
3
3
|
-->
|
|
4
|
-
<script module lang="ts">
|
|
5
|
-
export type RectXMarkProps = Omit<RectMarkProps, 'y'> & { stack?: Partial<StackOptions> };
|
|
6
|
-
</script>
|
|
7
4
|
|
|
8
|
-
<script lang="ts">
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
6
|
+
interface RectXMarkProps extends Omit<ComponentProps<typeof Rect>, 'y'> {
|
|
7
|
+
stack?: Partial<StackOptions>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
import Rect from './Rect.svelte';
|
|
11
|
+
import { intervalY, stackX, recordizeX } from '..';
|
|
12
|
+
import type { DataRecord, PlotContext, PlotDefaults } from '../types/index.js';
|
|
13
|
+
import { getContext, type ComponentProps } from 'svelte';
|
|
13
14
|
import type { StackOptions } from '../transforms/stack';
|
|
14
15
|
|
|
15
16
|
let markProps: RectXMarkProps = $props();
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const {
|
|
23
|
-
data = [{}],
|
|
24
|
+
data = [{} as Datum],
|
|
24
25
|
stack,
|
|
25
26
|
...options
|
|
26
27
|
}: RectXMarkProps = $derived({
|