svelteplot 0.3.3 → 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 +4 -2
- package/dist/helpers/getBaseStyles.js +8 -0
- 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 +34 -124
- package/dist/marks/Text.svelte.d.ts +101 -20
- 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 +158 -0
- package/dist/marks/helpers/MultilineText.svelte.d.ts +12 -0
- 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/BoxY.svelte
CHANGED
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
<!-- @component
|
|
2
2
|
Creates a vertical box plot for visualizing data distribution with quartiles and outliers
|
|
3
3
|
-->
|
|
4
|
-
<script lang="ts"
|
|
5
|
-
|
|
6
|
-
data:
|
|
4
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
5
|
+
interface BoxYMarkProps extends Pick<BaseMarkProps<Datum>, 'class'> {
|
|
6
|
+
data: Datum[];
|
|
7
7
|
x: ChannelAccessor;
|
|
8
8
|
y: ChannelAccessor;
|
|
9
9
|
/**
|
|
10
10
|
* Options for the rule marks that represent the min/max range
|
|
11
11
|
*/
|
|
12
|
-
rule: Record<string, ChannelAccessor
|
|
12
|
+
rule: Record<string, ChannelAccessor<Datum>>;
|
|
13
13
|
/**
|
|
14
14
|
* Options for the bar marks that represent the IQR range
|
|
15
15
|
*/
|
|
16
|
-
bar: Record<string, ChannelAccessor
|
|
16
|
+
bar: Record<string, ChannelAccessor<Datum>>;
|
|
17
17
|
/**
|
|
18
18
|
* Options for the tick marks that represent the median
|
|
19
19
|
*/
|
|
20
|
-
tickMedian: Record<string, ChannelAccessor
|
|
20
|
+
tickMedian: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Options for the tick marks that represent the min/max range
|
|
23
23
|
*/
|
|
24
|
-
tickMinMax: Record<string, ChannelAccessor
|
|
24
|
+
tickMinMax: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
25
25
|
/**
|
|
26
26
|
* Options for the dot marks that represent the outliers
|
|
27
27
|
*/
|
|
28
|
-
dot: Record<string, ChannelAccessor
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<script lang="ts">
|
|
28
|
+
dot: Record<string, ChannelAccessor<Datum>>;
|
|
29
|
+
}
|
|
33
30
|
import GroupMultiple from './helpers/GroupMultiple.svelte';
|
|
34
|
-
import type { BaseMarkProps, ChannelAccessor, DataRecord } from '../types.js';
|
|
35
|
-
import { groupX, BarY, TickY, RuleX, Dot } from '
|
|
31
|
+
import type { BaseMarkProps, ChannelAccessor, DataRecord } from '../types/index.js';
|
|
32
|
+
import { groupX, BarY, TickY, RuleX, Dot } from '..';
|
|
36
33
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
37
34
|
import { getContext } from 'svelte';
|
|
38
|
-
import type { PlotDefaults } from '../types.js';
|
|
35
|
+
import type { PlotDefaults } from '../types/index.js';
|
|
39
36
|
|
|
40
37
|
let markProps: BoxYMarkProps = $props();
|
|
41
38
|
const DEFAULTS = {
|
|
@@ -45,7 +42,7 @@
|
|
|
45
42
|
...getContext<PlotDefaults>('svelteplot/_defaults').boxY
|
|
46
43
|
};
|
|
47
44
|
const {
|
|
48
|
-
data = [{}],
|
|
45
|
+
data = [{} as Datum],
|
|
49
46
|
class: className = '',
|
|
50
47
|
bar,
|
|
51
48
|
rule,
|
|
@@ -1,30 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import type { ChannelAccessor, DataRecord } from '../types/index.js';
|
|
2
|
+
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
3
|
+
props(): Pick<BaseMarkProps<Datum_1>, "class"> & {
|
|
4
|
+
data: Datum[];
|
|
5
|
+
x: ChannelAccessor;
|
|
6
|
+
y: ChannelAccessor;
|
|
7
|
+
/**
|
|
8
|
+
* Options for the rule marks that represent the min/max range
|
|
9
|
+
*/
|
|
10
|
+
rule: Record<string, ChannelAccessor<Datum_1>>;
|
|
11
|
+
/**
|
|
12
|
+
* Options for the bar marks that represent the IQR range
|
|
13
|
+
*/
|
|
14
|
+
bar: Record<string, ChannelAccessor<Datum_1>>;
|
|
15
|
+
/**
|
|
16
|
+
* Options for the tick marks that represent the median
|
|
17
|
+
*/
|
|
18
|
+
tickMedian: Record<string, ChannelAccessor<Datum_1>> | boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Options for the tick marks that represent the min/max range
|
|
21
|
+
*/
|
|
22
|
+
tickMinMax: Record<string, ChannelAccessor<Datum_1>> | boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Options for the dot marks that represent the outliers
|
|
25
|
+
*/
|
|
26
|
+
dot: Record<string, ChannelAccessor<Datum_1>>;
|
|
27
|
+
};
|
|
28
|
+
events(): {};
|
|
29
|
+
slots(): {};
|
|
30
|
+
bindings(): "";
|
|
31
|
+
exports(): {};
|
|
32
|
+
}
|
|
33
|
+
interface $$IsomorphicComponent {
|
|
34
|
+
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']>> & {
|
|
35
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
36
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
37
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
38
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
39
|
+
}
|
|
27
40
|
/** Creates a vertical box plot for visualizing data distribution with quartiles and outliers */
|
|
28
|
-
declare const BoxY:
|
|
29
|
-
type BoxY =
|
|
41
|
+
declare const BoxY: $$IsomorphicComponent;
|
|
42
|
+
type BoxY<Datum extends DataRecord> = InstanceType<typeof BoxY<Datum>>;
|
|
30
43
|
export default BoxY;
|
package/dist/marks/Brush.svelte
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
For creating a two-dimensional brush selection
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
6
|
+
interface BrushMarkProps
|
|
7
|
+
extends Pick<
|
|
8
|
+
BaseMarkProps<Datum>,
|
|
9
|
+
| 'cursor'
|
|
10
|
+
| 'stroke'
|
|
11
|
+
| 'strokeDasharray'
|
|
12
|
+
| 'strokeOpacity'
|
|
13
|
+
| 'strokeWidth'
|
|
14
|
+
| 'strokeLinecap'
|
|
15
|
+
| 'strokeDashoffset'
|
|
16
|
+
| 'strokeLinejoin'
|
|
17
|
+
| 'strokeMiterlimit'
|
|
18
|
+
> {
|
|
13
19
|
brush: Brush;
|
|
14
20
|
/**
|
|
15
21
|
* limit brushing to x or y dimension
|
|
@@ -26,26 +32,17 @@
|
|
|
26
32
|
onbrushstart?: (evt: BrushEvent) => void;
|
|
27
33
|
onbrushend?: (evt: BrushEvent) => void;
|
|
28
34
|
onbrush?: (evt: BrushEvent) => void;
|
|
29
|
-
}
|
|
30
|
-
BaseMarkProps,
|
|
31
|
-
| 'cursor'
|
|
32
|
-
| 'stroke'
|
|
33
|
-
| 'strokeDasharray'
|
|
34
|
-
| 'strokeOpacity'
|
|
35
|
-
| 'strokeWidth'
|
|
36
|
-
| 'strokeLinecap'
|
|
37
|
-
| 'strokeDashoffset'
|
|
38
|
-
| 'strokeLinejoin'
|
|
39
|
-
| 'strokeMiterlimit'
|
|
40
|
-
>;
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<script lang="ts">
|
|
35
|
+
}
|
|
44
36
|
import { getContext } from 'svelte';
|
|
45
|
-
import Frame from './Frame.svelte';
|
|
46
37
|
import Rect from './Rect.svelte';
|
|
47
|
-
import type {
|
|
38
|
+
import type {
|
|
39
|
+
BaseMarkProps,
|
|
40
|
+
DataRecord,
|
|
41
|
+
PlotContext,
|
|
42
|
+
PlotDefaults
|
|
43
|
+
} from '../types/index.js';
|
|
48
44
|
import { clientToLayerCoordinates } from './helpers/events.js';
|
|
45
|
+
import Frame from './Frame.svelte';
|
|
49
46
|
|
|
50
47
|
let { brush = $bindable({ enabled: false }), ...markProps }: BrushMarkProps = $props();
|
|
51
48
|
|
|
@@ -59,7 +56,7 @@
|
|
|
59
56
|
};
|
|
60
57
|
|
|
61
58
|
const {
|
|
62
|
-
data = [{}],
|
|
59
|
+
data = [{} as Datum],
|
|
63
60
|
stroke,
|
|
64
61
|
strokeWidth,
|
|
65
62
|
strokeDasharray,
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
x2?: Date | number;
|
|
4
|
-
y1?: Date | number;
|
|
5
|
-
y2?: Date | number;
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
};
|
|
8
|
-
type BrushEvent = MouseEvent & {
|
|
9
|
-
brush: Brush;
|
|
10
|
-
};
|
|
11
|
-
export type BrushMarkProps = {
|
|
1
|
+
import type { BaseMarkProps, DataRecord } from '../types/index.js';
|
|
2
|
+
interface BrushMarkProps extends Pick<BaseMarkProps<Datum>, 'cursor' | 'stroke' | 'strokeDasharray' | 'strokeOpacity' | 'strokeWidth' | 'strokeLinecap' | 'strokeDashoffset' | 'strokeLinejoin' | 'strokeMiterlimit'> {
|
|
12
3
|
brush: Brush;
|
|
13
4
|
/**
|
|
14
5
|
* limit brushing to x or y dimension
|
|
@@ -25,8 +16,22 @@ export type BrushMarkProps = {
|
|
|
25
16
|
onbrushstart?: (evt: BrushEvent) => void;
|
|
26
17
|
onbrushend?: (evt: BrushEvent) => void;
|
|
27
18
|
onbrush?: (evt: BrushEvent) => void;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
}
|
|
20
|
+
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
21
|
+
props(): BrushMarkProps;
|
|
22
|
+
events(): {};
|
|
23
|
+
slots(): {};
|
|
24
|
+
bindings(): "brush";
|
|
25
|
+
exports(): {};
|
|
26
|
+
}
|
|
27
|
+
interface $$IsomorphicComponent {
|
|
28
|
+
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']>> & {
|
|
29
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
30
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
31
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
32
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
33
|
+
}
|
|
34
|
+
/** For creating a two-dimensional brush selection */
|
|
35
|
+
declare const Brush: $$IsomorphicComponent;
|
|
36
|
+
type Brush<Datum extends DataRecord> = InstanceType<typeof Brush<Datum>>;
|
|
32
37
|
export default Brush;
|
package/dist/marks/BrushX.svelte
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
For creating a brush that can be dragged horizontally
|
|
4
|
+
-->
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
6
|
+
interface BrushXMarkProps extends Omit<ComponentProps<typeof Brush>, 'limitDimension'> {}
|
|
7
|
+
|
|
8
|
+
import Brush from './Brush.svelte';
|
|
9
|
+
import type { PlotDefaults } from '../types/index.js';
|
|
10
|
+
import { getContext, type ComponentProps } from 'svelte';
|
|
9
11
|
|
|
10
12
|
let { brush = $bindable({ enabled: false }), ...options }: BrushXMarkProps = $props();
|
|
11
13
|
const DEFAULTS = {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { type
|
|
1
|
+
import Brush from './Brush.svelte';
|
|
2
|
+
import { type ComponentProps } from 'svelte';
|
|
3
|
+
interface BrushXMarkProps extends Omit<ComponentProps<typeof Brush>, 'limitDimension'> {
|
|
4
|
+
}
|
|
5
|
+
/** For creating a brush that can be dragged horizontally */
|
|
3
6
|
declare const BrushX: import("svelte").Component<BrushXMarkProps, {}, "brush">;
|
|
4
7
|
type BrushX = ReturnType<typeof BrushX>;
|
|
5
8
|
export default BrushX;
|
package/dist/marks/BrushY.svelte
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
For creating a brush that can be dragged vertically
|
|
4
|
+
-->
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
import Brush
|
|
7
|
-
import type { PlotDefaults } from '../types.js';
|
|
8
|
-
import { getContext } from 'svelte';
|
|
6
|
+
import Brush from './Brush.svelte';
|
|
7
|
+
import type { PlotDefaults } from '../types/index.js';
|
|
8
|
+
import { getContext, type ComponentProps } from 'svelte';
|
|
9
|
+
|
|
10
|
+
interface BrushYMarkProps extends Omit<ComponentProps<typeof Brush>, 'limitDimension'> {}
|
|
9
11
|
|
|
10
12
|
let { brush = $bindable({ enabled: false }), ...options }: BrushYMarkProps = $props();
|
|
11
13
|
const DEFAULTS = {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { type
|
|
1
|
+
import Brush from './Brush.svelte';
|
|
2
|
+
import { type ComponentProps } from 'svelte';
|
|
3
|
+
interface BrushYMarkProps extends Omit<ComponentProps<typeof Brush>, 'limitDimension'> {
|
|
4
|
+
}
|
|
5
|
+
/** For creating a brush that can be dragged vertically */
|
|
3
6
|
declare const BrushY: import("svelte").Component<BrushYMarkProps, {}, "brush">;
|
|
4
7
|
type BrushY = ReturnType<typeof BrushY>;
|
|
5
8
|
export default BrushY;
|
package/dist/marks/Cell.svelte
CHANGED
|
@@ -2,29 +2,28 @@
|
|
|
2
2
|
@component
|
|
3
3
|
For arbitrary rectangles, requires band x and y scales
|
|
4
4
|
-->
|
|
5
|
-
<script
|
|
5
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
6
|
+
interface CellMarkProps
|
|
7
|
+
extends BaseMarkProps<Datum>,
|
|
8
|
+
LinkableMarkProps<Datum>,
|
|
9
|
+
BaseRectMarkProps<Datum> {
|
|
10
|
+
data: Datum[];
|
|
11
|
+
x?: ChannelAccessor<Datum>;
|
|
12
|
+
y?: ChannelAccessor<Datum>;
|
|
13
|
+
}
|
|
6
14
|
import type {
|
|
7
15
|
PlotContext,
|
|
8
16
|
DataRecord,
|
|
9
17
|
BaseMarkProps,
|
|
10
18
|
BaseRectMarkProps,
|
|
11
19
|
ChannelAccessor,
|
|
12
|
-
PlotDefaults
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
LinkableMarkProps &
|
|
17
|
-
BaseRectMarkProps & {
|
|
18
|
-
data: DataRecord[];
|
|
19
|
-
x?: ChannelAccessor;
|
|
20
|
-
y?: ChannelAccessor;
|
|
21
|
-
};
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<script lang="ts">
|
|
20
|
+
PlotDefaults,
|
|
21
|
+
LinkableMarkProps,
|
|
22
|
+
MarkType
|
|
23
|
+
} from '../types/index.js';
|
|
25
24
|
import Mark from '../Mark.svelte';
|
|
26
25
|
import { getContext } from 'svelte';
|
|
27
|
-
import { recordizeY, sort } from '
|
|
26
|
+
import { recordizeY, sort } from '..';
|
|
28
27
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
29
28
|
|
|
30
29
|
import { isValid } from '../helpers/isValid.js';
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
const {
|
|
40
|
-
data = [{}],
|
|
39
|
+
data = [{} as Datum],
|
|
41
40
|
class: className = '',
|
|
42
41
|
...options
|
|
43
42
|
}: CellMarkProps = $derived({
|
|
@@ -59,8 +58,8 @@
|
|
|
59
58
|
sort: { channel: 'x' }
|
|
60
59
|
}),
|
|
61
60
|
sort: { channel: 'y' }
|
|
62
|
-
}) as
|
|
63
|
-
);
|
|
61
|
+
}) as CellMarkProps)
|
|
62
|
+
) as CellMarkProps;
|
|
64
63
|
</script>
|
|
65
64
|
|
|
66
65
|
<Mark
|
|
@@ -1,10 +1,82 @@
|
|
|
1
|
-
import type { DataRecord,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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.js").RawValue, b: import("../types/data.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data.js").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.js").MouseEventHandler<SVGPathElement>;
|
|
31
|
+
ondblclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
32
|
+
onmouseup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
33
|
+
onmousedown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
34
|
+
onmouseenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
35
|
+
onmousemove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
36
|
+
onmouseleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
37
|
+
onmouseout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
38
|
+
onmouseover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
39
|
+
onpointercancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
40
|
+
onpointerdown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
41
|
+
onpointerup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
42
|
+
onpointerenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
43
|
+
onpointerleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
44
|
+
onpointermove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
45
|
+
onpointerover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
46
|
+
onpointerout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
47
|
+
ondrag?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
48
|
+
ondrop?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
49
|
+
ondragstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
50
|
+
ondragenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
51
|
+
ondragleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
52
|
+
ondragover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
53
|
+
ondragend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
54
|
+
ontouchstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
55
|
+
ontouchmove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
56
|
+
ontouchend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
57
|
+
ontouchcancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
58
|
+
oncontextmenu?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
|
|
59
|
+
onwheel?: import("svelte/elements.js").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
|
+
y?: ChannelAccessor<Datum>;
|
|
66
|
+
};
|
|
67
|
+
events(): {};
|
|
68
|
+
slots(): {};
|
|
69
|
+
bindings(): "";
|
|
70
|
+
exports(): {};
|
|
71
|
+
}
|
|
72
|
+
interface $$IsomorphicComponent {
|
|
73
|
+
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']>> & {
|
|
74
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
75
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
76
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
77
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
78
|
+
}
|
|
7
79
|
/** For arbitrary rectangles, requires band x and y scales */
|
|
8
|
-
declare const Cell:
|
|
9
|
-
type Cell =
|
|
80
|
+
declare const Cell: $$IsomorphicComponent;
|
|
81
|
+
type Cell<Datum extends DataRecord> = InstanceType<typeof Cell<Datum>>;
|
|
10
82
|
export default Cell;
|
package/dist/marks/CellX.svelte
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
For arbitrary rectangles with fixed y position, requires band x scale
|
|
4
|
+
-->
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
import Cell
|
|
7
|
-
import { recordizeY } from '
|
|
6
|
+
import Cell from './Cell.svelte';
|
|
7
|
+
import { recordizeY } from '..';
|
|
8
|
+
import type { ComponentProps } from 'svelte';
|
|
9
|
+
import type { TransformArgsRow } from '../types/index.js';
|
|
10
|
+
|
|
11
|
+
interface CellXMarkProps extends Omit<ComponentProps<typeof Cell>, 'y'> {}
|
|
8
12
|
|
|
9
13
|
let { data = [{}], ...options }: CellXMarkProps = $props();
|
|
10
14
|
|
|
11
15
|
const args = $derived(
|
|
12
|
-
recordizeY
|
|
16
|
+
recordizeY({
|
|
13
17
|
data,
|
|
14
18
|
...options
|
|
15
|
-
})
|
|
19
|
+
} as TransformArgsRow)
|
|
16
20
|
);
|
|
17
21
|
</script>
|
|
18
22
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import Cell from './Cell.svelte';
|
|
2
|
+
import type { ComponentProps } from 'svelte';
|
|
3
|
+
interface CellXMarkProps extends Omit<ComponentProps<typeof Cell>, 'y'> {
|
|
4
|
+
}
|
|
5
|
+
/** For arbitrary rectangles with fixed y position, requires band x scale */
|
|
3
6
|
declare const CellX: import("svelte").Component<CellXMarkProps, {}, "">;
|
|
4
7
|
type CellX = ReturnType<typeof CellX>;
|
|
5
8
|
export default CellX;
|
package/dist/marks/CellY.svelte
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
For arbitrary rectangles with fixed x position, requires band y scale
|
|
4
|
+
-->
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
import Cell
|
|
7
|
-
import { recordizeX } from '
|
|
6
|
+
import Cell from './Cell.svelte';
|
|
7
|
+
import { recordizeX } from '..';
|
|
8
|
+
import type { ComponentProps } from 'svelte';
|
|
9
|
+
import type { TransformArgsRow } from '../types/index.js';
|
|
10
|
+
|
|
11
|
+
interface CellYMarkProps extends Omit<ComponentProps<typeof Cell>, 'x'> {}
|
|
8
12
|
|
|
9
13
|
let { data = [{}], ...options }: CellYMarkProps = $props();
|
|
10
14
|
|
|
11
15
|
const args = $derived(
|
|
12
|
-
recordizeX
|
|
16
|
+
recordizeX({
|
|
13
17
|
data,
|
|
14
18
|
...options
|
|
15
|
-
})
|
|
19
|
+
} as TransformArgsRow)
|
|
16
20
|
);
|
|
17
21
|
</script>
|
|
18
22
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import Cell from './Cell.svelte';
|
|
2
|
+
import type { ComponentProps } from 'svelte';
|
|
3
|
+
interface CellYMarkProps extends Omit<ComponentProps<typeof Cell>, 'x'> {
|
|
4
|
+
}
|
|
5
|
+
/** For arbitrary rectangles with fixed x position, requires band y scale */
|
|
3
6
|
declare const CellY: import("svelte").Component<CellYMarkProps, {}, "">;
|
|
4
7
|
type CellY = ReturnType<typeof CellY>;
|
|
5
8
|
export default CellY;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
<script module lang="ts">
|
|
2
|
-
export type ColorLegendMarkProps = {
|
|
3
|
-
class: string | null;
|
|
4
|
-
};
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
1
|
<script lang="ts">
|
|
2
|
+
interface ColorLegendMarkProps {
|
|
3
|
+
class: string | null;
|
|
4
|
+
}
|
|
8
5
|
import { getContext } from 'svelte';
|
|
9
|
-
import { Plot, AxisX, Frame } from '
|
|
6
|
+
import { Plot, AxisX, Frame } from '..';
|
|
10
7
|
import { symbol as d3Symbol } from 'd3-shape';
|
|
11
8
|
import { range as d3Range, extent } from 'd3-array';
|
|
12
9
|
import { maybeSymbol } from '../helpers/symbols.js';
|
|
13
10
|
|
|
14
|
-
import type { PlotDefaults, PlotContext } from '../types.js';
|
|
11
|
+
import type { PlotDefaults, PlotContext } from '../types/index.js';
|
|
15
12
|
|
|
16
13
|
let { class: className = null }: ColorLegendMarkProps = $props();
|
|
17
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface ColorLegendMarkProps {
|
|
2
2
|
class: string | null;
|
|
3
|
-
}
|
|
3
|
+
}
|
|
4
4
|
/**
|
|
5
5
|
* The ColorLegend is an HTML mark that can be placed in the header, footer and overlay
|
|
6
6
|
* snippets. You can activate an implicit ColorLegend above the chart using the global
|