svelteplot 0.10.3 → 0.11.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 +42 -25
- package/dist/Mark.svelte.d.ts +111 -32
- package/dist/Plot.svelte +21 -15
- package/dist/core/Facet.svelte +1 -1
- package/dist/core/FacetAxes.svelte +13 -8
- package/dist/core/FacetGrid.svelte +4 -4
- package/dist/core/Plot.svelte +41 -35
- package/dist/helpers/autoScales.d.ts +3 -3
- package/dist/helpers/autoScales.js +28 -18
- package/dist/helpers/autoTicks.js +2 -0
- package/dist/helpers/callWithProps.d.ts +1 -2
- package/dist/helpers/facets.js +0 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/mergeDeep.d.ts +1 -3
- package/dist/helpers/mergeDeep.js +15 -16
- package/dist/helpers/projection.d.ts +4 -3
- package/dist/helpers/projection.js +17 -5
- package/dist/helpers/reduce.d.ts +4 -4
- package/dist/helpers/reduce.js +6 -4
- package/dist/helpers/regressionLoess.js +2 -1
- package/dist/helpers/resolve.d.ts +6 -3
- package/dist/helpers/resolve.js +25 -16
- package/dist/helpers/scales.d.ts +10 -10
- package/dist/helpers/scales.js +43 -13
- package/dist/helpers/time.d.ts +10 -3
- package/dist/helpers/time.js +2 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/plotDefaults.d.ts +3 -1
- package/dist/hooks/plotDefaults.js +33 -1
- package/dist/hooks/usePlot.svelte.d.ts +10 -25
- package/dist/hooks/usePlot.svelte.js +8 -7
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/dist/marks/Area.svelte +24 -13
- package/dist/marks/Area.svelte.d.ts +118 -34
- package/dist/marks/AreaX.svelte +42 -8
- package/dist/marks/AreaX.svelte.d.ts +154 -71
- package/dist/marks/AreaY.svelte +42 -8
- package/dist/marks/AreaY.svelte.d.ts +154 -71
- package/dist/marks/Arrow.svelte +42 -23
- package/dist/marks/Arrow.svelte.d.ts +114 -35
- package/dist/marks/AxisX.svelte +43 -28
- package/dist/marks/AxisX.svelte.d.ts +125 -40
- package/dist/marks/AxisY.svelte +43 -26
- package/dist/marks/AxisY.svelte.d.ts +127 -40
- package/dist/marks/BarX.svelte +12 -10
- package/dist/marks/BarX.svelte.d.ts +104 -32
- package/dist/marks/BarY.svelte +11 -10
- package/dist/marks/BarY.svelte.d.ts +106 -34
- package/dist/marks/BollingerX.svelte +4 -7
- package/dist/marks/BollingerX.svelte.d.ts +105 -30
- package/dist/marks/BollingerY.svelte +3 -0
- package/dist/marks/BollingerY.svelte.d.ts +105 -30
- package/dist/marks/BoxX.svelte +3 -3
- package/dist/marks/BoxY.svelte +12 -9
- package/dist/marks/BoxY.svelte.d.ts +128 -53
- package/dist/marks/Brush.svelte +26 -21
- package/dist/marks/Brush.svelte.d.ts +119 -60
- package/dist/marks/Cell.svelte +13 -9
- package/dist/marks/Cell.svelte.d.ts +105 -30
- package/dist/marks/CellX.svelte +2 -1
- package/dist/marks/CellX.svelte.d.ts +105 -32
- package/dist/marks/CellY.svelte +2 -1
- package/dist/marks/CellY.svelte.d.ts +105 -32
- package/dist/marks/ColorLegend.svelte +24 -13
- package/dist/marks/ColorLegend.svelte.d.ts +1 -0
- package/dist/marks/CustomMark.svelte +16 -10
- package/dist/marks/CustomMark.svelte.d.ts +112 -31
- package/dist/marks/CustomMarkHTML.svelte +8 -2
- package/dist/marks/CustomMarkHTML.svelte.d.ts +8 -2
- package/dist/marks/DifferenceY.svelte +31 -20
- package/dist/marks/DifferenceY.svelte.d.ts +134 -55
- package/dist/marks/Dot.svelte +21 -11
- package/dist/marks/Dot.svelte.d.ts +117 -38
- package/dist/marks/DotX.svelte +2 -0
- package/dist/marks/DotX.svelte.d.ts +136 -62
- package/dist/marks/DotY.svelte +1 -0
- package/dist/marks/DotY.svelte.d.ts +135 -62
- package/dist/marks/Frame.svelte +47 -9
- package/dist/marks/Frame.svelte.d.ts +124 -41
- package/dist/marks/Geo.svelte +21 -12
- package/dist/marks/Geo.svelte.d.ts +105 -30
- package/dist/marks/Graticule.svelte +3 -0
- package/dist/marks/Graticule.svelte.d.ts +3 -0
- package/dist/marks/GridX.svelte +31 -16
- package/dist/marks/GridX.svelte.d.ts +108 -32
- package/dist/marks/GridY.svelte +30 -15
- package/dist/marks/GridY.svelte.d.ts +108 -32
- package/dist/marks/HTMLTooltip.svelte +14 -7
- package/dist/marks/HTMLTooltip.svelte.d.ts +7 -0
- package/dist/marks/Image.svelte +50 -25
- package/dist/marks/Image.svelte.d.ts +117 -35
- package/dist/marks/Line.svelte +67 -44
- package/dist/marks/Line.svelte.d.ts +119 -30
- package/dist/marks/LineX.svelte +2 -1
- package/dist/marks/LineX.svelte.d.ts +142 -69
- package/dist/marks/LineY.svelte +2 -1
- package/dist/marks/LineY.svelte.d.ts +142 -69
- package/dist/marks/Link.svelte +70 -46
- package/dist/marks/Link.svelte.d.ts +126 -41
- package/dist/marks/Pointer.svelte +24 -15
- package/dist/marks/Pointer.svelte.d.ts +7 -0
- package/dist/marks/Rect.svelte +13 -5
- package/dist/marks/Rect.svelte.d.ts +116 -35
- package/dist/marks/RectX.svelte +6 -3
- package/dist/marks/RectX.svelte.d.ts +158 -12
- package/dist/marks/RectY.svelte +6 -3
- package/dist/marks/RectY.svelte.d.ts +158 -12
- package/dist/marks/RegressionX.svelte +13 -6
- package/dist/marks/RegressionX.svelte.d.ts +8 -3
- package/dist/marks/RegressionY.svelte +13 -6
- package/dist/marks/RegressionY.svelte.d.ts +8 -3
- package/dist/marks/RuleX.svelte +18 -11
- package/dist/marks/RuleX.svelte.d.ts +112 -32
- package/dist/marks/RuleY.svelte +19 -12
- package/dist/marks/RuleY.svelte.d.ts +114 -34
- package/dist/marks/Spike.svelte +11 -5
- package/dist/marks/Spike.svelte.d.ts +146 -68
- package/dist/marks/Text.svelte +24 -7
- package/dist/marks/Text.svelte.d.ts +253 -75
- package/dist/marks/TickX.svelte +56 -48
- package/dist/marks/TickX.svelte.d.ts +114 -40
- package/dist/marks/TickY.svelte +59 -51
- package/dist/marks/TickY.svelte.d.ts +117 -43
- package/dist/marks/Trail.svelte +25 -13
- package/dist/marks/Trail.svelte.d.ts +116 -33
- package/dist/marks/Vector.svelte +20 -11
- package/dist/marks/Vector.svelte.d.ts +116 -35
- package/dist/marks/WaffleX.svelte +18 -16
- package/dist/marks/WaffleX.svelte.d.ts +131 -57
- package/dist/marks/WaffleY.svelte +16 -15
- package/dist/marks/WaffleY.svelte.d.ts +129 -56
- package/dist/marks/helpers/Anchor.svelte +17 -2
- package/dist/marks/helpers/Anchor.svelte.d.ts +16 -1
- package/dist/marks/helpers/AreaCanvas.svelte +8 -8
- package/dist/marks/helpers/BaseAxisX.svelte +38 -41
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +11 -17
- package/dist/marks/helpers/BaseAxisY.svelte +35 -35
- package/dist/marks/helpers/BaseAxisY.svelte.d.ts +12 -15
- package/dist/marks/helpers/Box.svelte +35 -28
- package/dist/marks/helpers/Box.svelte.d.ts +122 -50
- package/dist/marks/helpers/DotCanvas.svelte +11 -9
- package/dist/marks/helpers/GeoCanvas.svelte +7 -6
- package/dist/marks/helpers/LineCanvas.svelte +7 -7
- package/dist/marks/helpers/LinearGradientX.svelte +2 -2
- package/dist/marks/helpers/LinearGradientX.svelte.d.ts +1 -1
- package/dist/marks/helpers/LinearGradientY.svelte +2 -2
- package/dist/marks/helpers/LinearGradientY.svelte.d.ts +1 -1
- package/dist/marks/helpers/Marker.svelte +2 -2
- package/dist/marks/helpers/MarkerPath.svelte +15 -12
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +105 -32
- package/dist/marks/helpers/MultilineText.svelte +24 -17
- package/dist/marks/helpers/MultilineText.svelte.d.ts +1 -1
- package/dist/marks/helpers/RectCanvas.svelte +31 -26
- package/dist/marks/helpers/RectPath.svelte +2 -2
- package/dist/marks/helpers/Regression.svelte +176 -86
- package/dist/marks/helpers/Regression.svelte.d.ts +20 -8
- package/dist/marks/helpers/RuleCanvas.svelte +9 -6
- package/dist/marks/helpers/TextCanvas.svelte +13 -9
- package/dist/marks/helpers/TextCanvas.svelte.d.ts +6 -6
- package/dist/marks/helpers/TickCanvas.svelte +6 -5
- package/dist/marks/helpers/TrailCanvas.svelte +16 -18
- package/dist/marks/helpers/TrailCanvas.svelte.d.ts +3 -5
- package/dist/marks/helpers/canvas.js +16 -9
- package/dist/marks/helpers/events.d.ts +2 -2
- package/dist/marks/helpers/events.js +14 -7
- package/dist/marks/helpers/waffle.d.ts +3 -3
- package/dist/marks/helpers/waffle.js +6 -4
- package/dist/regression/polynomial.d.ts +1 -1
- package/dist/regression/polynomial.js +5 -5
- package/dist/regression/utils/determination.d.ts +1 -1
- package/dist/regression/utils/determination.js +1 -1
- package/dist/regression/utils/geometry.d.ts +1 -1
- package/dist/regression/utils/interpose.d.ts +1 -1
- package/dist/regression/utils/interpose.js +1 -1
- package/dist/regression/utils/points.d.ts +1 -1
- package/dist/transforms/bin.d.ts +3 -3
- package/dist/transforms/bin.js +29 -20
- package/dist/transforms/bollinger.d.ts +8 -0
- package/dist/transforms/bollinger.js +9 -1
- package/dist/transforms/centroid.d.ts +4 -0
- package/dist/transforms/centroid.js +4 -0
- package/dist/transforms/density.d.ts +4 -4
- package/dist/transforms/density.js +20 -13
- package/dist/transforms/dodge.d.ts +12 -1
- package/dist/transforms/dodge.js +15 -6
- package/dist/transforms/group.d.ts +141 -4
- package/dist/transforms/group.js +4 -1
- package/dist/transforms/interval.d.ts +204 -60
- package/dist/transforms/jitter.d.ts +421 -4
- package/dist/transforms/jitter.js +10 -1
- package/dist/transforms/map.d.ts +412 -4
- package/dist/transforms/map.js +3 -3
- package/dist/transforms/normalize.d.ts +276 -5
- package/dist/transforms/normalize.js +5 -3
- package/dist/transforms/recordize.d.ts +17 -5
- package/dist/transforms/recordize.js +13 -9
- package/dist/transforms/rename.d.ts +11 -4
- package/dist/transforms/rename.js +7 -2
- package/dist/transforms/select.d.ts +722 -210
- package/dist/transforms/select.js +13 -1
- package/dist/transforms/shift.d.ts +8 -0
- package/dist/transforms/shift.js +20 -6
- package/dist/transforms/sort.d.ts +13 -258
- package/dist/transforms/sort.js +13 -10
- package/dist/transforms/stack.d.ts +58 -9
- package/dist/transforms/stack.js +27 -11
- package/dist/transforms/window.d.ts +221 -66
- package/dist/transforms/window.js +8 -2
- package/dist/types/axes.d.ts +43 -0
- package/dist/types/axes.js +1 -0
- package/dist/types/channel.d.ts +30 -2
- package/dist/types/data.d.ts +14 -1
- package/dist/types/facet.d.ts +5 -0
- package/dist/types/index.d.ts +33 -8
- package/dist/types/index.js +11 -7
- package/dist/types/mark.d.ts +124 -35
- package/dist/types/plot.d.ts +118 -16
- package/dist/types/scale.d.ts +125 -8
- package/package.json +178 -175
- package/dist/helpers/autoTicks.d.ts +0 -12
|
@@ -1,18 +1,164 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { DataRecord } from '../types/index.js';
|
|
3
|
-
import { type ComponentProps } from 'svelte';
|
|
1
|
+
import type { DataRow } from '../types/index.js';
|
|
4
2
|
import type { StackOptions } from '../transforms/stack.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
declare function $$render<Datum extends DataRow>(): {
|
|
4
|
+
props: Omit<Partial<{
|
|
5
|
+
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
6
|
+
facet: "auto" | "include" | "exclude";
|
|
7
|
+
fx: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
8
|
+
fy: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
9
|
+
dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
10
|
+
dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
11
|
+
dodgeX: import("../transforms/dodge.js").DodgeXOptions;
|
|
12
|
+
dodgeY: import("../transforms/dodge.js").DodgeYOptions;
|
|
13
|
+
fill: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
14
|
+
fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
15
|
+
fontFamily: import("../types/index.js").ConstantAccessor<import("csstype").Property.FontFamily, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
16
|
+
fontSize: import("../types/index.js").ConstantAccessor<number | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "math" | (string & {}) | "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large" | "larger" | "smaller", Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
17
|
+
fontStyle: import("../types/index.js").ConstantAccessor<import("csstype").Property.FontStyle, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
18
|
+
fontVariant: import("../types/index.js").ConstantAccessor<import("csstype").Property.FontVariant, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
19
|
+
fontWeight: import("../types/index.js").ConstantAccessor<import("csstype").Property.FontWeight, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
20
|
+
letterSpacing: import("../types/index.js").ConstantAccessor<import("csstype").Property.LetterSpacing<0 | (string & {})>, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
21
|
+
wordSpacing: import("../types/index.js").ConstantAccessor<import("csstype").Property.WordSpacing<0 | (string & {})>, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
22
|
+
textAnchor: import("../types/index.js").ConstantAccessor<import("csstype").Property.TextAnchor, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
23
|
+
textTransform: import("../types/index.js").ConstantAccessor<import("csstype").Property.TextTransform, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
24
|
+
textDecoration: import("../types/index.js").ConstantAccessor<import("csstype").Property.TextDecoration<0 | (string & {})>, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
25
|
+
sort: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
|
|
26
|
+
channel: string;
|
|
27
|
+
order?: "ascending" | "descending";
|
|
28
|
+
} | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
29
|
+
stroke: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
30
|
+
strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
31
|
+
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
32
|
+
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
33
|
+
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
34
|
+
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
35
|
+
opacity: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
36
|
+
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
37
|
+
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
38
|
+
blend: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
39
|
+
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
40
|
+
clipPath: string;
|
|
41
|
+
mask: string;
|
|
42
|
+
imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
43
|
+
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
44
|
+
paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
45
|
+
onclick: (event: Event & {
|
|
46
|
+
currentTarget: SVGPathElement;
|
|
47
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
48
|
+
ondblclick: (event: Event & {
|
|
49
|
+
currentTarget: SVGPathElement;
|
|
50
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
51
|
+
onmouseup: (event: Event & {
|
|
52
|
+
currentTarget: SVGPathElement;
|
|
53
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
54
|
+
onmousedown: (event: Event & {
|
|
55
|
+
currentTarget: SVGPathElement;
|
|
56
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
57
|
+
onmouseenter: (event: Event & {
|
|
58
|
+
currentTarget: SVGPathElement;
|
|
59
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
60
|
+
onmousemove: (event: Event & {
|
|
61
|
+
currentTarget: SVGPathElement;
|
|
62
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
63
|
+
onmouseleave: (event: Event & {
|
|
64
|
+
currentTarget: SVGPathElement;
|
|
65
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
66
|
+
onmouseout: (event: Event & {
|
|
67
|
+
currentTarget: SVGPathElement;
|
|
68
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
69
|
+
onmouseover: (event: Event & {
|
|
70
|
+
currentTarget: SVGPathElement;
|
|
71
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
72
|
+
onpointercancel: (event: Event & {
|
|
73
|
+
currentTarget: SVGPathElement;
|
|
74
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
75
|
+
onpointerdown: (event: Event & {
|
|
76
|
+
currentTarget: SVGPathElement;
|
|
77
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
78
|
+
onpointerup: (event: Event & {
|
|
79
|
+
currentTarget: SVGPathElement;
|
|
80
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
81
|
+
onpointerenter: (event: Event & {
|
|
82
|
+
currentTarget: SVGPathElement;
|
|
83
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
84
|
+
onpointerleave: (event: Event & {
|
|
85
|
+
currentTarget: SVGPathElement;
|
|
86
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
87
|
+
onpointermove: (event: Event & {
|
|
88
|
+
currentTarget: SVGPathElement;
|
|
89
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
90
|
+
onpointerover: (event: Event & {
|
|
91
|
+
currentTarget: SVGPathElement;
|
|
92
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
93
|
+
onpointerout: (event: Event & {
|
|
94
|
+
currentTarget: SVGPathElement;
|
|
95
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
96
|
+
ondrag: (event: Event & {
|
|
97
|
+
currentTarget: SVGPathElement;
|
|
98
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
99
|
+
ondrop: (event: Event & {
|
|
100
|
+
currentTarget: SVGPathElement;
|
|
101
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
102
|
+
ondragstart: (event: Event & {
|
|
103
|
+
currentTarget: SVGPathElement;
|
|
104
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
105
|
+
ondragenter: (event: Event & {
|
|
106
|
+
currentTarget: SVGPathElement;
|
|
107
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
108
|
+
ondragleave: (event: Event & {
|
|
109
|
+
currentTarget: SVGPathElement;
|
|
110
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
111
|
+
ondragover: (event: Event & {
|
|
112
|
+
currentTarget: SVGPathElement;
|
|
113
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
114
|
+
ondragend: (event: Event & {
|
|
115
|
+
currentTarget: SVGPathElement;
|
|
116
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
117
|
+
ontouchstart: (event: Event & {
|
|
118
|
+
currentTarget: SVGPathElement;
|
|
119
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
120
|
+
ontouchmove: (event: Event & {
|
|
121
|
+
currentTarget: SVGPathElement;
|
|
122
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
123
|
+
ontouchend: (event: Event & {
|
|
124
|
+
currentTarget: SVGPathElement;
|
|
125
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
126
|
+
ontouchcancel: (event: Event & {
|
|
127
|
+
currentTarget: SVGPathElement;
|
|
128
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
129
|
+
oncontextmenu: (event: Event & {
|
|
130
|
+
currentTarget: SVGPathElement;
|
|
131
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
132
|
+
onwheel: (event: Event & {
|
|
133
|
+
currentTarget: SVGPathElement;
|
|
134
|
+
}, datum: Record<string | symbol, import("../types/data.js").RawValue>, index: number) => void;
|
|
135
|
+
class: string;
|
|
136
|
+
style: string;
|
|
137
|
+
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
138
|
+
title: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
139
|
+
}> & import("../types/mark.js").LinkableMarkProps<Record<string | symbol, import("../types/data.js").RawValue>> & import("../types/mark.js").BaseRectMarkProps<Record<string | symbol, import("../types/data.js").RawValue>> & {
|
|
140
|
+
data?: Record<string | symbol, import("../types/data.js").RawValue>[] | undefined;
|
|
141
|
+
x?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
142
|
+
x1?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
143
|
+
x2?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
144
|
+
y?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
145
|
+
y1?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
146
|
+
y2?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
|
|
147
|
+
interval?: number | string;
|
|
148
|
+
class?: string;
|
|
149
|
+
canvas?: boolean;
|
|
150
|
+
}, "data" | "y"> & {
|
|
151
|
+
/** the input data array; each element becomes one rectangle */
|
|
152
|
+
data?: Datum[];
|
|
153
|
+
/** options for stacking rect data values */
|
|
154
|
+
stack?: Partial<StackOptions>;
|
|
155
|
+
};
|
|
10
156
|
exports: {};
|
|
11
157
|
bindings: "";
|
|
12
158
|
slots: {};
|
|
13
159
|
events: {};
|
|
14
160
|
};
|
|
15
|
-
declare class __sveltets_Render<Datum extends
|
|
161
|
+
declare class __sveltets_Render<Datum extends DataRow> {
|
|
16
162
|
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
17
163
|
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
18
164
|
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
@@ -20,13 +166,13 @@ declare class __sveltets_Render<Datum extends DataRecord> {
|
|
|
20
166
|
exports(): {};
|
|
21
167
|
}
|
|
22
168
|
interface $$IsomorphicComponent {
|
|
23
|
-
new <Datum extends
|
|
169
|
+
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']>> & {
|
|
24
170
|
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
25
171
|
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
26
|
-
<Datum extends
|
|
172
|
+
<Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
27
173
|
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
28
174
|
}
|
|
29
175
|
/** Convenience wrapper for rectangles oriented along the x axis */
|
|
30
176
|
declare const RectY: $$IsomorphicComponent;
|
|
31
|
-
type RectY<Datum extends
|
|
177
|
+
type RectY<Datum extends DataRow> = InstanceType<typeof RectY<Datum>>;
|
|
32
178
|
export default RectY;
|
|
@@ -3,24 +3,31 @@
|
|
|
3
3
|
-->
|
|
4
4
|
|
|
5
5
|
<script module lang="ts">
|
|
6
|
-
|
|
6
|
+
import type { ChannelAccessor } from '../types/index.js';
|
|
7
|
+
import type { RegressionOptions } from './helpers/Regression.svelte';
|
|
8
|
+
|
|
9
|
+
export type RegressionXMarkProps = RegressionOptions & {
|
|
10
|
+
data?: Record<string | symbol, any>[];
|
|
11
|
+
z?: ChannelAccessor;
|
|
12
|
+
canvas?: boolean;
|
|
13
|
+
};
|
|
7
14
|
</script>
|
|
8
15
|
|
|
9
16
|
<script lang="ts">
|
|
10
17
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
11
|
-
import type { ChannelName } from '../types/index.js';
|
|
18
|
+
import type { ChannelName, DataRecord } from '../types/index.js';
|
|
12
19
|
import Mark from '../Mark.svelte';
|
|
13
|
-
import Regression
|
|
20
|
+
import Regression from './helpers/Regression.svelte';
|
|
14
21
|
import { groups as d3Groups } from 'd3-array';
|
|
15
22
|
|
|
16
|
-
let { data = [{}], ...options }: RegressionXMarkProps = $props();
|
|
23
|
+
let { data = [{} as DataRecord], ...options }: RegressionXMarkProps = $props();
|
|
17
24
|
|
|
18
25
|
let groupBy: ChannelName | null =
|
|
19
26
|
options.stroke != null ? 'stroke' : options.z != null ? 'z' : null;
|
|
20
27
|
// separate groups
|
|
21
28
|
let groups = $derived(
|
|
22
29
|
groupBy !== null
|
|
23
|
-
? d3Groups(data, (d) => resolveChannel(groupBy as ChannelName, d, options)).map(
|
|
30
|
+
? d3Groups(data, (d) => resolveChannel(groupBy as ChannelName, d, options as any)).map(
|
|
24
31
|
(g) => g[1]
|
|
25
32
|
)
|
|
26
33
|
: [data]
|
|
@@ -29,6 +36,6 @@
|
|
|
29
36
|
|
|
30
37
|
<Mark type="regression">
|
|
31
38
|
{#each groups as group, g (g)}
|
|
32
|
-
<Regression data={group} dependent="x" {...options} />
|
|
39
|
+
<Regression data={group as any} dependent="x" {...options as any} />
|
|
33
40
|
{/each}
|
|
34
41
|
</Mark>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import type { ChannelAccessor } from '../types/index.js';
|
|
2
|
+
import type { RegressionOptions } from './helpers/Regression.svelte';
|
|
3
|
+
export type RegressionXMarkProps = RegressionOptions & {
|
|
4
|
+
data?: Record<string | symbol, any>[];
|
|
5
|
+
z?: ChannelAccessor;
|
|
6
|
+
canvas?: boolean;
|
|
7
|
+
};
|
|
3
8
|
/** Calculates and displays a regression line with x as the dependent variable */
|
|
4
|
-
declare const RegressionX: import("svelte").Component<
|
|
9
|
+
declare const RegressionX: import("svelte").Component<RegressionXMarkProps, {}, "">;
|
|
5
10
|
type RegressionX = ReturnType<typeof RegressionX>;
|
|
6
11
|
export default RegressionX;
|
|
@@ -2,24 +2,31 @@
|
|
|
2
2
|
Calculates and displays a regression line with y as the dependent variable
|
|
3
3
|
-->
|
|
4
4
|
<script module lang="ts">
|
|
5
|
-
|
|
5
|
+
import type { ChannelAccessor } from '../types/index.js';
|
|
6
|
+
import type { RegressionOptions } from './helpers/Regression.svelte';
|
|
7
|
+
|
|
8
|
+
export type RegressionYMarkProps = RegressionOptions & {
|
|
9
|
+
data?: Record<string | symbol, any>[];
|
|
10
|
+
z?: ChannelAccessor;
|
|
11
|
+
canvas?: boolean;
|
|
12
|
+
};
|
|
6
13
|
</script>
|
|
7
14
|
|
|
8
15
|
<script lang="ts">
|
|
9
16
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
10
|
-
import type { ChannelName } from '../types/index.js';
|
|
17
|
+
import type { ChannelName, DataRecord } from '../types/index.js';
|
|
11
18
|
import Mark from '../Mark.svelte';
|
|
12
|
-
import Regression
|
|
19
|
+
import Regression from './helpers/Regression.svelte';
|
|
13
20
|
import { groups as d3Groups } from 'd3-array';
|
|
14
21
|
|
|
15
|
-
let { data = [{}], ...options }: RegressionYMarkProps = $props();
|
|
22
|
+
let { data = [{} as DataRecord], ...options }: RegressionYMarkProps = $props();
|
|
16
23
|
|
|
17
24
|
let groupBy: ChannelName | null =
|
|
18
25
|
options.stroke != null ? 'stroke' : options.z != null ? 'z' : null;
|
|
19
26
|
// separate groups
|
|
20
27
|
let groups = $derived(
|
|
21
28
|
groupBy !== null
|
|
22
|
-
? d3Groups(data, (d) => resolveChannel(groupBy as ChannelName, d, options)).map(
|
|
29
|
+
? d3Groups(data, (d) => resolveChannel(groupBy as ChannelName, d, options as any)).map(
|
|
23
30
|
(g) => g[1]
|
|
24
31
|
)
|
|
25
32
|
: [data]
|
|
@@ -28,6 +35,6 @@
|
|
|
28
35
|
|
|
29
36
|
<Mark type="regression">
|
|
30
37
|
{#each groups as group, i (i)}
|
|
31
|
-
<Regression data={group} dependent="y" {...options} />
|
|
38
|
+
<Regression data={group as any} dependent="y" {...options as any} />
|
|
32
39
|
{/each}
|
|
33
40
|
</Mark>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import type { ChannelAccessor } from '../types/index.js';
|
|
2
|
+
import type { RegressionOptions } from './helpers/Regression.svelte';
|
|
3
|
+
export type RegressionYMarkProps = RegressionOptions & {
|
|
4
|
+
data?: Record<string | symbol, any>[];
|
|
5
|
+
z?: ChannelAccessor;
|
|
6
|
+
canvas?: boolean;
|
|
7
|
+
};
|
|
3
8
|
/** Calculates and displays a regression line with y as the dependent variable */
|
|
4
|
-
declare const RegressionY: import("svelte").Component<
|
|
9
|
+
declare const RegressionY: import("svelte").Component<RegressionYMarkProps, {}, "">;
|
|
5
10
|
type RegressionY = ReturnType<typeof RegressionY>;
|
|
6
11
|
export default RegressionY;
|
package/dist/marks/RuleX.svelte
CHANGED
|
@@ -3,13 +3,21 @@
|
|
|
3
3
|
-->
|
|
4
4
|
<script lang="ts" generics="Datum = DataRecord | RawValue">
|
|
5
5
|
interface RuleXMarkProps extends Omit<BaseMarkProps<Datum>, 'fill' | 'fillOpacity'> {
|
|
6
|
+
/** the input data array; each element becomes one vertical rule */
|
|
6
7
|
data?: Datum[];
|
|
8
|
+
/** the horizontal position channel for the rule */
|
|
7
9
|
x?: ChannelAccessor<Datum>;
|
|
10
|
+
/** the starting vertical position of the rule */
|
|
8
11
|
y1?: ChannelAccessor<Datum>;
|
|
12
|
+
/** the ending vertical position of the rule */
|
|
9
13
|
y2?: ChannelAccessor<Datum>;
|
|
14
|
+
/** shorthand to inset the rule from both ends, in pixels */
|
|
10
15
|
inset?: ConstantAccessor<number, Datum>;
|
|
16
|
+
/** inset the rule from the top, in pixels */
|
|
11
17
|
insetTop?: ConstantAccessor<number, Datum>;
|
|
18
|
+
/** inset the rule from the bottom, in pixels */
|
|
12
19
|
insetBottom?: ConstantAccessor<number, Datum>;
|
|
20
|
+
/** if true, renders using Canvas instead of SVG */
|
|
13
21
|
canvas?: boolean;
|
|
14
22
|
}
|
|
15
23
|
import Mark from '../Mark.svelte';
|
|
@@ -19,6 +27,7 @@
|
|
|
19
27
|
import { resolveProp, resolveStyles } from '../helpers/resolve.js';
|
|
20
28
|
import type {
|
|
21
29
|
DataRecord,
|
|
30
|
+
DataRow,
|
|
22
31
|
BaseMarkProps,
|
|
23
32
|
ConstantAccessor,
|
|
24
33
|
ChannelAccessor,
|
|
@@ -43,19 +52,17 @@
|
|
|
43
52
|
});
|
|
44
53
|
|
|
45
54
|
const plot = usePlot();
|
|
46
|
-
const args = $derived(
|
|
55
|
+
const args = $derived(
|
|
56
|
+
recordizeX({ data: data as DataRow[], ...options }, { withIndex: false })
|
|
57
|
+
);
|
|
47
58
|
</script>
|
|
48
59
|
|
|
49
|
-
<Mark
|
|
50
|
-
type="ruleX"
|
|
51
|
-
channels={['x', 'y1', 'y2', 'stroke', 'opacity', 'strokeOpacity']}
|
|
52
|
-
{...markProps}
|
|
53
|
-
{...args}>
|
|
60
|
+
<Mark type="ruleX" channels={['x', 'y1', 'y2', 'stroke', 'opacity', 'strokeOpacity']} {...args}>
|
|
54
61
|
{#snippet children({ mark, scaledData, usedScales })}
|
|
55
62
|
{#if canvas}
|
|
56
63
|
<RuleCanvas
|
|
57
64
|
data={scaledData}
|
|
58
|
-
options={args}
|
|
65
|
+
options={args as any}
|
|
59
66
|
{usedScales}
|
|
60
67
|
orientation="vertical"
|
|
61
68
|
marginTop={plot.options.marginTop}
|
|
@@ -65,13 +72,13 @@
|
|
|
65
72
|
class="rule-x {className || ''}"
|
|
66
73
|
length={className ? 2 : scaledData.length}>
|
|
67
74
|
{#each scaledData as d, i (i)}
|
|
68
|
-
{@const inset = resolveProp(args.inset, d.datum, 0)}
|
|
69
|
-
{@const insetTop = resolveProp(args.insetTop, d.datum, 0)}
|
|
70
|
-
{@const insetBottom = resolveProp(args.insetBottom, d.datum, 0)}
|
|
75
|
+
{@const inset = resolveProp(args.inset, d.datum, 0) as number}
|
|
76
|
+
{@const insetTop = resolveProp(args.insetTop, d.datum, 0) as number}
|
|
77
|
+
{@const insetBottom = resolveProp(args.insetBottom, d.datum, 0) as number}
|
|
71
78
|
{@const [style, styleClass] = resolveStyles(
|
|
72
79
|
plot,
|
|
73
80
|
d,
|
|
74
|
-
args,
|
|
81
|
+
args as any,
|
|
75
82
|
'stroke',
|
|
76
83
|
usedScales
|
|
77
84
|
)}
|
|
@@ -7,10 +7,20 @@ declare function $$render<Datum = DataRecord | RawValue>(): {
|
|
|
7
7
|
fy: ChannelAccessor<Datum>;
|
|
8
8
|
dx: ConstantAccessor<number, Datum>;
|
|
9
9
|
dy: ConstantAccessor<number, Datum>;
|
|
10
|
-
dodgeX: import("../transforms/dodge").DodgeXOptions;
|
|
11
|
-
dodgeY: import("../transforms/dodge").DodgeYOptions;
|
|
10
|
+
dodgeX: import("../transforms/dodge.js").DodgeXOptions;
|
|
11
|
+
dodgeY: import("../transforms/dodge.js").DodgeYOptions;
|
|
12
12
|
fill: ChannelAccessor<Datum>;
|
|
13
13
|
fillOpacity: ConstantAccessor<number, Datum>;
|
|
14
|
+
fontFamily: ConstantAccessor<import("csstype").Property.FontFamily, Datum>;
|
|
15
|
+
fontSize: ConstantAccessor<number | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "math" | (string & {}) | "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large" | "larger" | "smaller", Datum>;
|
|
16
|
+
fontStyle: ConstantAccessor<import("csstype").Property.FontStyle, Datum>;
|
|
17
|
+
fontVariant: ConstantAccessor<import("csstype").Property.FontVariant, Datum>;
|
|
18
|
+
fontWeight: ConstantAccessor<import("csstype").Property.FontWeight, Datum>;
|
|
19
|
+
letterSpacing: ConstantAccessor<import("csstype").Property.LetterSpacing<0 | (string & {})>, Datum>;
|
|
20
|
+
wordSpacing: ConstantAccessor<import("csstype").Property.WordSpacing<0 | (string & {})>, Datum>;
|
|
21
|
+
textAnchor: ConstantAccessor<import("csstype").Property.TextAnchor, Datum>;
|
|
22
|
+
textTransform: ConstantAccessor<import("csstype").Property.TextTransform, Datum>;
|
|
23
|
+
textDecoration: ConstantAccessor<import("csstype").Property.TextDecoration<0 | (string & {})>, Datum>;
|
|
14
24
|
sort: ((a: RawValue, b: RawValue) => number) | {
|
|
15
25
|
channel: string;
|
|
16
26
|
order?: "ascending" | "descending";
|
|
@@ -24,53 +34,123 @@ declare function $$render<Datum = DataRecord | RawValue>(): {
|
|
|
24
34
|
opacity: ChannelAccessor<Datum>;
|
|
25
35
|
strokeDasharray: ConstantAccessor<string, Datum>;
|
|
26
36
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
37
|
+
blend: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
27
38
|
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
28
39
|
clipPath: string;
|
|
29
40
|
mask: string;
|
|
30
41
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
31
42
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
32
43
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
33
|
-
onclick:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
onclick: (event: Event & {
|
|
45
|
+
currentTarget: SVGPathElement;
|
|
46
|
+
}, datum: Datum, index: number) => void;
|
|
47
|
+
ondblclick: (event: Event & {
|
|
48
|
+
currentTarget: SVGPathElement;
|
|
49
|
+
}, datum: Datum, index: number) => void;
|
|
50
|
+
onmouseup: (event: Event & {
|
|
51
|
+
currentTarget: SVGPathElement;
|
|
52
|
+
}, datum: Datum, index: number) => void;
|
|
53
|
+
onmousedown: (event: Event & {
|
|
54
|
+
currentTarget: SVGPathElement;
|
|
55
|
+
}, datum: Datum, index: number) => void;
|
|
56
|
+
onmouseenter: (event: Event & {
|
|
57
|
+
currentTarget: SVGPathElement;
|
|
58
|
+
}, datum: Datum, index: number) => void;
|
|
59
|
+
onmousemove: (event: Event & {
|
|
60
|
+
currentTarget: SVGPathElement;
|
|
61
|
+
}, datum: Datum, index: number) => void;
|
|
62
|
+
onmouseleave: (event: Event & {
|
|
63
|
+
currentTarget: SVGPathElement;
|
|
64
|
+
}, datum: Datum, index: number) => void;
|
|
65
|
+
onmouseout: (event: Event & {
|
|
66
|
+
currentTarget: SVGPathElement;
|
|
67
|
+
}, datum: Datum, index: number) => void;
|
|
68
|
+
onmouseover: (event: Event & {
|
|
69
|
+
currentTarget: SVGPathElement;
|
|
70
|
+
}, datum: Datum, index: number) => void;
|
|
71
|
+
onpointercancel: (event: Event & {
|
|
72
|
+
currentTarget: SVGPathElement;
|
|
73
|
+
}, datum: Datum, index: number) => void;
|
|
74
|
+
onpointerdown: (event: Event & {
|
|
75
|
+
currentTarget: SVGPathElement;
|
|
76
|
+
}, datum: Datum, index: number) => void;
|
|
77
|
+
onpointerup: (event: Event & {
|
|
78
|
+
currentTarget: SVGPathElement;
|
|
79
|
+
}, datum: Datum, index: number) => void;
|
|
80
|
+
onpointerenter: (event: Event & {
|
|
81
|
+
currentTarget: SVGPathElement;
|
|
82
|
+
}, datum: Datum, index: number) => void;
|
|
83
|
+
onpointerleave: (event: Event & {
|
|
84
|
+
currentTarget: SVGPathElement;
|
|
85
|
+
}, datum: Datum, index: number) => void;
|
|
86
|
+
onpointermove: (event: Event & {
|
|
87
|
+
currentTarget: SVGPathElement;
|
|
88
|
+
}, datum: Datum, index: number) => void;
|
|
89
|
+
onpointerover: (event: Event & {
|
|
90
|
+
currentTarget: SVGPathElement;
|
|
91
|
+
}, datum: Datum, index: number) => void;
|
|
92
|
+
onpointerout: (event: Event & {
|
|
93
|
+
currentTarget: SVGPathElement;
|
|
94
|
+
}, datum: Datum, index: number) => void;
|
|
95
|
+
ondrag: (event: Event & {
|
|
96
|
+
currentTarget: SVGPathElement;
|
|
97
|
+
}, datum: Datum, index: number) => void;
|
|
98
|
+
ondrop: (event: Event & {
|
|
99
|
+
currentTarget: SVGPathElement;
|
|
100
|
+
}, datum: Datum, index: number) => void;
|
|
101
|
+
ondragstart: (event: Event & {
|
|
102
|
+
currentTarget: SVGPathElement;
|
|
103
|
+
}, datum: Datum, index: number) => void;
|
|
104
|
+
ondragenter: (event: Event & {
|
|
105
|
+
currentTarget: SVGPathElement;
|
|
106
|
+
}, datum: Datum, index: number) => void;
|
|
107
|
+
ondragleave: (event: Event & {
|
|
108
|
+
currentTarget: SVGPathElement;
|
|
109
|
+
}, datum: Datum, index: number) => void;
|
|
110
|
+
ondragover: (event: Event & {
|
|
111
|
+
currentTarget: SVGPathElement;
|
|
112
|
+
}, datum: Datum, index: number) => void;
|
|
113
|
+
ondragend: (event: Event & {
|
|
114
|
+
currentTarget: SVGPathElement;
|
|
115
|
+
}, datum: Datum, index: number) => void;
|
|
116
|
+
ontouchstart: (event: Event & {
|
|
117
|
+
currentTarget: SVGPathElement;
|
|
118
|
+
}, datum: Datum, index: number) => void;
|
|
119
|
+
ontouchmove: (event: Event & {
|
|
120
|
+
currentTarget: SVGPathElement;
|
|
121
|
+
}, datum: Datum, index: number) => void;
|
|
122
|
+
ontouchend: (event: Event & {
|
|
123
|
+
currentTarget: SVGPathElement;
|
|
124
|
+
}, datum: Datum, index: number) => void;
|
|
125
|
+
ontouchcancel: (event: Event & {
|
|
126
|
+
currentTarget: SVGPathElement;
|
|
127
|
+
}, datum: Datum, index: number) => void;
|
|
128
|
+
oncontextmenu: (event: Event & {
|
|
129
|
+
currentTarget: SVGPathElement;
|
|
130
|
+
}, datum: Datum, index: number) => void;
|
|
131
|
+
onwheel: (event: Event & {
|
|
132
|
+
currentTarget: SVGPathElement;
|
|
133
|
+
}, datum: Datum, index: number) => void;
|
|
63
134
|
class: string;
|
|
64
135
|
style: string;
|
|
65
136
|
cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
|
|
137
|
+
title: ConstantAccessor<string, Datum>;
|
|
66
138
|
}>, "fill" | "fillOpacity"> & {
|
|
139
|
+
/** the input data array; each element becomes one vertical rule */
|
|
67
140
|
data?: Datum[];
|
|
141
|
+
/** the horizontal position channel for the rule */
|
|
68
142
|
x?: ChannelAccessor<Datum>;
|
|
143
|
+
/** the starting vertical position of the rule */
|
|
69
144
|
y1?: ChannelAccessor<Datum>;
|
|
145
|
+
/** the ending vertical position of the rule */
|
|
70
146
|
y2?: ChannelAccessor<Datum>;
|
|
147
|
+
/** shorthand to inset the rule from both ends, in pixels */
|
|
71
148
|
inset?: ConstantAccessor<number, Datum>;
|
|
149
|
+
/** inset the rule from the top, in pixels */
|
|
72
150
|
insetTop?: ConstantAccessor<number, Datum>;
|
|
151
|
+
/** inset the rule from the bottom, in pixels */
|
|
73
152
|
insetBottom?: ConstantAccessor<number, Datum>;
|
|
153
|
+
/** if true, renders using Canvas instead of SVG */
|
|
74
154
|
canvas?: boolean;
|
|
75
155
|
};
|
|
76
156
|
exports: {};
|