svelteplot 0.10.2 → 0.10.3-pr-370.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/Mark.svelte.d.ts +4 -4
  3. package/dist/constants.d.ts +1 -1
  4. package/dist/helpers/colors.d.ts +8 -11
  5. package/dist/helpers/curves.d.ts +2 -2
  6. package/dist/helpers/facets.d.ts +1 -1
  7. package/dist/helpers/getBaseStyles.d.ts +2 -4
  8. package/dist/helpers/index.d.ts +1 -1
  9. package/dist/helpers/reduce.d.ts +1 -1
  10. package/dist/helpers/scales.d.ts +7 -7
  11. package/dist/helpers/symbols.d.ts +1 -1
  12. package/dist/helpers/time.d.ts +3 -3
  13. package/dist/helpers/typeChecks.d.ts +4 -4
  14. package/dist/marks/Area.svelte.d.ts +5 -4
  15. package/dist/marks/AreaX.svelte.d.ts +4 -4
  16. package/dist/marks/AreaY.svelte.d.ts +4 -4
  17. package/dist/marks/Arrow.svelte.d.ts +5 -4
  18. package/dist/marks/AxisX.svelte +13 -0
  19. package/dist/marks/AxisX.svelte.d.ts +19 -5
  20. package/dist/marks/AxisY.svelte +15 -0
  21. package/dist/marks/AxisY.svelte.d.ts +21 -5
  22. package/dist/marks/BarX.svelte.d.ts +4 -4
  23. package/dist/marks/BarY.svelte.d.ts +5 -4
  24. package/dist/marks/BollingerX.svelte +3 -0
  25. package/dist/marks/BollingerX.svelte.d.ts +2 -77
  26. package/dist/marks/BollingerY.svelte +3 -0
  27. package/dist/marks/BollingerY.svelte.d.ts +2 -77
  28. package/dist/marks/BoxY.svelte +3 -0
  29. package/dist/marks/BoxY.svelte.d.ts +4 -64
  30. package/dist/marks/Brush.svelte +4 -0
  31. package/dist/marks/Brush.svelte.d.ts +5 -64
  32. package/dist/marks/Cell.svelte.d.ts +5 -4
  33. package/dist/marks/CellX.svelte.d.ts +30 -30
  34. package/dist/marks/CellY.svelte.d.ts +30 -30
  35. package/dist/marks/ColorLegend.svelte +1 -0
  36. package/dist/marks/ColorLegend.svelte.d.ts +1 -0
  37. package/dist/marks/CustomMark.svelte +11 -0
  38. package/dist/marks/CustomMark.svelte.d.ts +2 -85
  39. package/dist/marks/CustomMarkHTML.svelte +6 -0
  40. package/dist/marks/CustomMarkHTML.svelte.d.ts +6 -0
  41. package/dist/marks/DifferenceY.svelte +5 -1
  42. package/dist/marks/DifferenceY.svelte.d.ts +8 -64
  43. package/dist/marks/Dot.svelte.d.ts +5 -4
  44. package/dist/marks/DotX.svelte.d.ts +5 -5
  45. package/dist/marks/DotY.svelte.d.ts +5 -5
  46. package/dist/marks/Frame.svelte +11 -0
  47. package/dist/marks/Frame.svelte.d.ts +17 -5
  48. package/dist/marks/Geo.svelte +3 -0
  49. package/dist/marks/Geo.svelte.d.ts +8 -4
  50. package/dist/marks/Graticule.svelte +3 -0
  51. package/dist/marks/Graticule.svelte.d.ts +3 -0
  52. package/dist/marks/GridX.svelte +4 -0
  53. package/dist/marks/GridX.svelte.d.ts +9 -4
  54. package/dist/marks/GridY.svelte +4 -0
  55. package/dist/marks/GridY.svelte.d.ts +9 -4
  56. package/dist/marks/HTMLTooltip.svelte +7 -0
  57. package/dist/marks/HTMLTooltip.svelte.d.ts +7 -0
  58. package/dist/marks/Image.svelte.d.ts +5 -4
  59. package/dist/marks/Line.svelte.d.ts +4 -4
  60. package/dist/marks/LineX.svelte.d.ts +6 -6
  61. package/dist/marks/LineY.svelte.d.ts +6 -6
  62. package/dist/marks/Link.svelte +3 -1
  63. package/dist/marks/Link.svelte.d.ts +8 -4
  64. package/dist/marks/Pointer.svelte +7 -0
  65. package/dist/marks/Pointer.svelte.d.ts +7 -0
  66. package/dist/marks/Rect.svelte.d.ts +5 -4
  67. package/dist/marks/RuleX.svelte.d.ts +5 -4
  68. package/dist/marks/RuleY.svelte.d.ts +5 -4
  69. package/dist/marks/Spike.svelte +6 -0
  70. package/dist/marks/Spike.svelte.d.ts +11 -5
  71. package/dist/marks/Text.svelte.d.ts +9 -8
  72. package/dist/marks/TickX.svelte +2 -0
  73. package/dist/marks/TickX.svelte.d.ts +7 -4
  74. package/dist/marks/TickY.svelte +5 -3
  75. package/dist/marks/TickY.svelte.d.ts +10 -7
  76. package/dist/marks/Trail.svelte +11 -0
  77. package/dist/marks/Trail.svelte.d.ts +12 -64
  78. package/dist/marks/Vector.svelte +9 -0
  79. package/dist/marks/Vector.svelte.d.ts +14 -4
  80. package/dist/marks/WaffleX.svelte +6 -4
  81. package/dist/marks/WaffleX.svelte.d.ts +2 -86
  82. package/dist/marks/WaffleY.svelte +5 -4
  83. package/dist/marks/WaffleY.svelte.d.ts +10 -8
  84. package/dist/marks/helpers/Box.svelte.d.ts +1 -64
  85. package/dist/marks/helpers/MarkerPath.svelte.d.ts +2 -107
  86. package/dist/marks/helpers/Regression.svelte +6 -3
  87. package/dist/marks/helpers/Regression.svelte.d.ts +6 -0
  88. package/dist/transforms/bollinger.d.ts +8 -0
  89. package/dist/transforms/bollinger.js +8 -0
  90. package/dist/transforms/centroid.d.ts +5 -4
  91. package/dist/transforms/centroid.js +4 -0
  92. package/dist/transforms/dodge.d.ts +11 -0
  93. package/dist/transforms/dodge.js +6 -0
  94. package/dist/transforms/interval.d.ts +8 -8
  95. package/dist/transforms/jitter.d.ts +9 -0
  96. package/dist/transforms/jitter.js +9 -0
  97. package/dist/transforms/recordize.d.ts +16 -7
  98. package/dist/transforms/recordize.js +10 -6
  99. package/dist/transforms/rename.d.ts +5 -1
  100. package/dist/transforms/rename.js +4 -0
  101. package/dist/transforms/select.d.ts +36 -28
  102. package/dist/transforms/select.js +8 -0
  103. package/dist/transforms/shift.d.ts +8 -0
  104. package/dist/transforms/shift.js +6 -0
  105. package/dist/transforms/sort.d.ts +18 -19
  106. package/dist/transforms/sort.js +4 -0
  107. package/dist/transforms/stack.d.ts +32 -12
  108. package/dist/transforms/stack.js +14 -0
  109. package/dist/transforms/window.d.ts +13 -136
  110. package/dist/transforms/window.js +6 -0
  111. package/dist/types/channel.d.ts +12 -0
  112. package/dist/types/data.d.ts +13 -0
  113. package/dist/types/facet.d.ts +5 -0
  114. package/dist/types/index.d.ts +18 -0
  115. package/dist/types/mark.d.ts +62 -0
  116. package/dist/types/plot.d.ts +31 -0
  117. package/dist/types/scale.d.ts +98 -0
  118. package/package.json +13 -5
@@ -3,16 +3,27 @@
3
3
  BaseMarkProps<Datum>,
4
4
  'stroke' | 'strokeWidth' | 'strokeDasharray'
5
5
  > {
6
+ /** the input data array */
6
7
  data?: Datum[];
8
+ /** the horizontal position channel; bound to the x scale */
7
9
  x?: ChannelAccessor<Datum>;
10
+ /** the vertical position channel; bound to the y scale */
8
11
  y?: ChannelAccessor<Datum>;
12
+ /** grouping channel for splitting data into separate trails */
9
13
  z?: ChannelAccessor<Datum>;
14
+ /** the radius (width) of the trail at each data point */
10
15
  r?: ChannelAccessor<Datum>;
16
+ /** the curve interpolation type for connecting data points */
11
17
  curve?: CurveName | CurveFactory;
18
+ /** tension parameter for the curve interpolation */
12
19
  tension?: number;
20
+ /** sort order for data points before rendering */
13
21
  sort?: ConstantAccessor<RawValue, Datum> | { channel: 'stroke' | 'fill' };
22
+ /** accessor that returns false for data points that should create gaps in the trail */
14
23
  defined?: ConstantAccessor<boolean, Datum>;
24
+ /** if true, renders using Canvas instead of SVG */
15
25
  canvas?: boolean;
26
+ /** the cap style for trail endpoints */
16
27
  cap?: 'butt' | 'round';
17
28
  /**
18
29
  * Samples per segment for curve interpolation
@@ -1,82 +1,30 @@
1
1
  import type { DataRecord, ChannelAccessor, ConstantAccessor, RawValue, CurveName } from '../types';
2
2
  import type { CurveFactory } from 'd3-shape';
3
3
  declare function $$render<Datum extends DataRecord>(): {
4
- props: Omit<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
- dodgeX: import("../transforms/dodge").DodgeXOptions;
12
- dodgeY: import("../transforms/dodge").DodgeYOptions;
13
- fill: ChannelAccessor<Datum>;
14
- fillOpacity: ConstantAccessor<number, Datum>;
15
- sort: ((a: RawValue, b: RawValue) => number) | {
16
- channel: string;
17
- order?: "ascending" | "descending";
18
- } | ConstantAccessor<RawValue, Datum>;
19
- stroke: ChannelAccessor<Datum>;
20
- strokeWidth: ConstantAccessor<number, Datum>;
21
- strokeOpacity: ConstantAccessor<number, Datum>;
22
- strokeLinejoin: ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
23
- strokeLinecap: ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
24
- strokeMiterlimit: ConstantAccessor<number, Datum>;
25
- opacity: ChannelAccessor<Datum>;
26
- strokeDasharray: ConstantAccessor<string, Datum>;
27
- strokeDashoffset: ConstantAccessor<number, Datum>;
28
- mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
29
- clipPath: string;
30
- mask: string;
31
- imageFilter: ConstantAccessor<string, Datum>;
32
- shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
33
- paintOrder: ConstantAccessor<string, Datum>;
34
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
64
- class: string;
65
- style: string;
66
- cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
67
- }>, "stroke" | "strokeWidth" | "strokeDasharray"> & {
4
+ props: Omit<BaseMarkProps<Datum>, "stroke" | "strokeDasharray" | "strokeWidth"> & {
5
+ /** the input data array */
68
6
  data?: Datum[];
7
+ /** the horizontal position channel; bound to the x scale */
69
8
  x?: ChannelAccessor<Datum>;
9
+ /** the vertical position channel; bound to the y scale */
70
10
  y?: ChannelAccessor<Datum>;
11
+ /** grouping channel for splitting data into separate trails */
71
12
  z?: ChannelAccessor<Datum>;
13
+ /** the radius (width) of the trail at each data point */
72
14
  r?: ChannelAccessor<Datum>;
15
+ /** the curve interpolation type for connecting data points */
73
16
  curve?: CurveName | CurveFactory;
17
+ /** tension parameter for the curve interpolation */
74
18
  tension?: number;
19
+ /** sort order for data points before rendering */
75
20
  sort?: ConstantAccessor<RawValue, Datum> | {
76
21
  channel: "stroke" | "fill";
77
22
  };
23
+ /** accessor that returns false for data points that should create gaps in the trail */
78
24
  defined?: ConstantAccessor<boolean, Datum>;
25
+ /** if true, renders using Canvas instead of SVG */
79
26
  canvas?: boolean;
27
+ /** the cap style for trail endpoints */
80
28
  cap?: "butt" | "round";
81
29
  /**
82
30
  * Samples per segment for curve interpolation
@@ -11,11 +11,17 @@
11
11
 
12
12
  <script lang="ts" generics="Datum extends DataRecord">
13
13
  interface VectorMarkProps extends BaseMarkProps<Datum> {
14
+ /** the input data array; each element becomes one vector */
14
15
  data: Datum[];
16
+ /** the horizontal position channel; bound to the x scale */
15
17
  x: ChannelAccessor<Datum>;
18
+ /** the vertical position channel; bound to the y scale */
16
19
  y: ChannelAccessor<Datum>;
20
+ /** the radius (width) of the vector shape in pixels */
17
21
  r?: number;
22
+ /** the length of the vector in pixels */
18
23
  length?: ChannelAccessor<Datum>;
24
+ /** rotation angle of the vector in degrees */
19
25
  rotate?: ChannelAccessor<Datum>;
20
26
  /**
21
27
  * Controls where the vector is anchored in relation to the x, y position.
@@ -24,8 +30,11 @@
24
30
  * 'end', the arrow will end at the x, y position.
25
31
  */
26
32
  anchor?: 'start' | 'middle' | 'end';
33
+ /** the shape of the vector; can be a preset name or a custom ShapeRenderer */
27
34
  shape?: 'arrow' | 'spike' | 'arrow-filled' | ShapeRenderer;
35
+ /** snippet for custom rendering inside the vector mark group */
28
36
  children?: Snippet;
37
+ /** if true, renders using Canvas instead of SVG */
29
38
  canvas?: boolean;
30
39
  }
31
40
  import type {
@@ -4,6 +4,7 @@ export type ShapeRenderer = {
4
4
  };
5
5
  import type { DataRecord, ChannelAccessor } from '../types/index.js';
6
6
  import { type Snippet } from 'svelte';
7
+ import { indexData } from '../transforms/recordize.js';
7
8
  declare function $$render<Datum extends DataRecord>(): {
8
9
  props: Partial<{
9
10
  filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
@@ -12,14 +13,14 @@ declare function $$render<Datum extends DataRecord>(): {
12
13
  fy: ChannelAccessor<Datum>;
13
14
  dx: import("../types/index.js").ConstantAccessor<number, Datum>;
14
15
  dy: import("../types/index.js").ConstantAccessor<number, Datum>;
15
- dodgeX: import("../transforms/dodge.js").DodgeXOptions;
16
- dodgeY: import("../transforms/dodge.js").DodgeYOptions;
16
+ dodgeX: indexData;
17
+ dodgeY: indexData;
17
18
  fill: ChannelAccessor<Datum>;
18
19
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
19
- sort: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
20
+ sort: {
20
21
  channel: string;
21
22
  order?: "ascending" | "descending";
22
- } | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Datum>;
23
+ } | ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Datum>;
23
24
  stroke: ChannelAccessor<Datum>;
24
25
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
25
26
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -69,11 +70,17 @@ declare function $$render<Datum extends DataRecord>(): {
69
70
  style: string;
70
71
  cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
71
72
  }> & {
73
+ /** the input data array; each element becomes one vector */
72
74
  data: Datum[];
75
+ /** the horizontal position channel; bound to the x scale */
73
76
  x: ChannelAccessor<Datum>;
77
+ /** the vertical position channel; bound to the y scale */
74
78
  y: ChannelAccessor<Datum>;
79
+ /** the radius (width) of the vector shape in pixels */
75
80
  r?: number;
81
+ /** the length of the vector in pixels */
76
82
  length?: ChannelAccessor<Datum>;
83
+ /** rotation angle of the vector in degrees */
77
84
  rotate?: ChannelAccessor<Datum>;
78
85
  /**
79
86
  * Controls where the vector is anchored in relation to the x, y position.
@@ -82,8 +89,11 @@ declare function $$render<Datum extends DataRecord>(): {
82
89
  * 'end', the arrow will end at the x, y position.
83
90
  */
84
91
  anchor?: "start" | "middle" | "end";
92
+ /** the shape of the vector; can be a preset name or a custom ShapeRenderer */
85
93
  shape?: "arrow" | "spike" | "arrow-filled" | ShapeRenderer;
94
+ /** snippet for custom rendering inside the vector mark group */
86
95
  children?: Snippet;
96
+ /** if true, renders using Canvas instead of SVG */
87
97
  canvas?: boolean;
88
98
  };
89
99
  exports: {};
@@ -21,23 +21,25 @@
21
21
 
22
22
  interface WaffleXMarkProps
23
23
  extends BaseMarkProps<Datum>, LinkableMarkProps<Datum>, WaffleOptions<Datum> {
24
+ /** the input data array */
24
25
  data?: Datum[];
25
26
  /**
26
- * bound to a quantitative scale
27
+ * the horizontal position channel; bound to a quantitative scale
27
28
  */
28
29
  x?: ChannelAccessor<Datum>;
29
30
  /**
30
- * bound to a quantitative scale
31
+ * the starting horizontal position; bound to a quantitative scale
31
32
  */
32
33
  x1?: ChannelAccessor<Datum>;
33
34
  /**
34
- * bound to a quantitative scale
35
+ * the ending horizontal position; bound to a quantitative scale
35
36
  */
36
37
  x2?: ChannelAccessor<Datum>;
37
38
  /**
38
- * bound to a band scale
39
+ * the vertical position channel; bound to a band scale
39
40
  */
40
41
  y?: ChannelAccessor<Datum>;
42
+ /** stacking options for combining multiple series */
41
43
  stack?: StackOptions;
42
44
  }
43
45
 
@@ -1,90 +1,6 @@
1
- import type { DataRecord, ChannelAccessor, LinkableMarkProps } from '../types';
2
- import { type WaffleOptions } from './helpers/waffle';
3
- import type { StackOptions } from '../transforms/stack';
1
+ import type { DataRecord } from '../types';
4
2
  declare function $$render<Datum extends DataRecord>(): {
5
- props: Partial<{
6
- filter: import("../types").ConstantAccessor<boolean, Datum>;
7
- facet: "auto" | "include" | "exclude";
8
- fx: ChannelAccessor<Datum>;
9
- fy: ChannelAccessor<Datum>;
10
- dx: import("../types").ConstantAccessor<number, Datum>;
11
- dy: import("../types").ConstantAccessor<number, Datum>;
12
- dodgeX: import("../transforms/dodge").DodgeXOptions;
13
- dodgeY: import("../transforms/dodge").DodgeYOptions;
14
- fill: ChannelAccessor<Datum>;
15
- fillOpacity: import("../types").ConstantAccessor<number, Datum>;
16
- sort: ((a: import("../types").RawValue, b: import("../types").RawValue) => number) | {
17
- channel: string;
18
- order?: "ascending" | "descending";
19
- } | import("../types").ConstantAccessor<import("../types").RawValue, Datum>;
20
- stroke: ChannelAccessor<Datum>;
21
- strokeWidth: import("../types").ConstantAccessor<number, Datum>;
22
- strokeOpacity: import("../types").ConstantAccessor<number, Datum>;
23
- strokeLinejoin: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
24
- strokeLinecap: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
25
- strokeMiterlimit: import("../types").ConstantAccessor<number, Datum>;
26
- opacity: ChannelAccessor<Datum>;
27
- strokeDasharray: import("../types").ConstantAccessor<string, Datum>;
28
- strokeDashoffset: import("../types").ConstantAccessor<number, Datum>;
29
- mixBlendMode: import("../types").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
30
- clipPath: string;
31
- mask: string;
32
- imageFilter: import("../types").ConstantAccessor<string, Datum>;
33
- shapeRendering: import("../types").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
34
- paintOrder: import("../types").ConstantAccessor<string, Datum>;
35
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
64
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
65
- class: string;
66
- style: string;
67
- cursor: import("../types").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
68
- }> & LinkableMarkProps<Datum> & WaffleOptions<Datum> & {
69
- data?: Datum[];
70
- /**
71
- * bound to a quantitative scale
72
- */
73
- x?: ChannelAccessor<Datum>;
74
- /**
75
- * bound to a quantitative scale
76
- */
77
- x1?: ChannelAccessor<Datum>;
78
- /**
79
- * bound to a quantitative scale
80
- */
81
- x2?: ChannelAccessor<Datum>;
82
- /**
83
- * bound to a band scale
84
- */
85
- y?: ChannelAccessor<Datum>;
86
- stack?: StackOptions;
87
- };
3
+ props: any;
88
4
  exports: {};
89
5
  bindings: "";
90
6
  slots: {};
@@ -21,21 +21,22 @@
21
21
 
22
22
  interface WaffleYMarkProps
23
23
  extends BaseMarkProps<Datum>, LinkableMarkProps<Datum>, WaffleOptions<Datum> {
24
+ /** the input data array */
24
25
  data?: Datum[];
25
26
  /**
26
- * bound to a babd scale
27
+ * the horizontal position channel; bound to a band scale
27
28
  */
28
29
  x?: ChannelAccessor<Datum>;
29
30
  /**
30
- * bound to a quantitative scale
31
+ * the vertical position channel; bound to a quantitative scale
31
32
  */
32
33
  y?: ChannelAccessor<Datum>;
33
34
  /**
34
- * bound to a quantitative scale
35
+ * the starting vertical position; bound to a quantitative scale
35
36
  */
36
37
  y1?: ChannelAccessor<Datum>;
37
38
  /**
38
- * bound to a quantitative scale
39
+ * the ending vertical position; bound to a quantitative scale
39
40
  */
40
41
  y2?: ChannelAccessor<Datum>;
41
42
  }
@@ -1,5 +1,6 @@
1
1
  import type { DataRecord, ChannelAccessor, LinkableMarkProps } from '../types';
2
2
  import { type WaffleOptions } from './helpers/waffle';
3
+ import { resolveProp } from '../helpers/resolve';
3
4
  declare function $$render<Datum extends DataRecord>(): {
4
5
  props: Partial<{
5
6
  filter: import("../types").ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare function $$render<Datum extends DataRecord>(): {
8
9
  fy: ChannelAccessor<Datum>;
9
10
  dx: import("../types").ConstantAccessor<number, Datum>;
10
11
  dy: import("../types").ConstantAccessor<number, Datum>;
11
- dodgeX: import("../transforms/dodge").DodgeXOptions;
12
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
+ dodgeX: resolveProp;
13
+ dodgeY: resolveProp;
13
14
  fill: ChannelAccessor<Datum>;
14
15
  fillOpacity: import("../types").ConstantAccessor<number, Datum>;
15
- sort: ((a: import("../types").RawValue, b: import("../types").RawValue) => number) | {
16
+ sort: {
16
17
  channel: string;
17
18
  order?: "ascending" | "descending";
18
- } | import("../types").ConstantAccessor<import("../types").RawValue, Datum>;
19
+ } | ((a: import("../types").RawValue, b: import("../types").RawValue) => number) | import("../types").ConstantAccessor<import("../types").RawValue, Datum>;
19
20
  stroke: ChannelAccessor<Datum>;
20
21
  strokeWidth: import("../types").ConstantAccessor<number, Datum>;
21
22
  strokeOpacity: import("../types").ConstantAccessor<number, Datum>;
@@ -65,21 +66,22 @@ declare function $$render<Datum extends DataRecord>(): {
65
66
  style: string;
66
67
  cursor: import("../types").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
67
68
  }> & LinkableMarkProps<Datum> & WaffleOptions<Datum> & {
69
+ /** the input data array */
68
70
  data?: Datum[];
69
71
  /**
70
- * bound to a babd scale
72
+ * the horizontal position channel; bound to a band scale
71
73
  */
72
74
  x?: ChannelAccessor<Datum>;
73
75
  /**
74
- * bound to a quantitative scale
76
+ * the vertical position channel; bound to a quantitative scale
75
77
  */
76
78
  y?: ChannelAccessor<Datum>;
77
79
  /**
78
- * bound to a quantitative scale
80
+ * the starting vertical position; bound to a quantitative scale
79
81
  */
80
82
  y1?: ChannelAccessor<Datum>;
81
83
  /**
82
- * bound to a quantitative scale
84
+ * the ending vertical position; bound to a quantitative scale
83
85
  */
84
86
  y2?: ChannelAccessor<Datum>;
85
87
  };
@@ -1,69 +1,6 @@
1
1
  import type { ChannelAccessor, DataRecord, RawValue } from '../../types';
2
2
  declare function $$render<Datum extends DataRecord>(): {
3
- props: Pick<Partial<{
4
- filter: import("../../types").ConstantAccessor<boolean, Datum>;
5
- facet: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../../types").ConstantAccessor<number, Datum>;
9
- dy: import("../../types").ConstantAccessor<number, Datum>;
10
- dodgeX: import("../../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../../transforms/dodge").DodgeYOptions;
12
- fill: ChannelAccessor<Datum>;
13
- fillOpacity: import("../../types").ConstantAccessor<number, Datum>;
14
- sort: ((a: RawValue, b: RawValue) => number) | {
15
- channel: string;
16
- order?: "ascending" | "descending";
17
- } | import("../../types").ConstantAccessor<RawValue, Datum>;
18
- stroke: ChannelAccessor<Datum>;
19
- strokeWidth: import("../../types").ConstantAccessor<number, Datum>;
20
- strokeOpacity: import("../../types").ConstantAccessor<number, Datum>;
21
- strokeLinejoin: import("../../types").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
22
- strokeLinecap: import("../../types").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
23
- strokeMiterlimit: import("../../types").ConstantAccessor<number, Datum>;
24
- opacity: ChannelAccessor<Datum>;
25
- strokeDasharray: import("../../types").ConstantAccessor<string, Datum>;
26
- strokeDashoffset: import("../../types").ConstantAccessor<number, Datum>;
27
- mixBlendMode: import("../../types").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
28
- clipPath: string;
29
- mask: string;
30
- imageFilter: import("../../types").ConstantAccessor<string, Datum>;
31
- shapeRendering: import("../../types").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
32
- paintOrder: import("../../types").ConstantAccessor<string, Datum>;
33
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
- class: string;
64
- style: string;
65
- cursor: import("../../types").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
66
- }>, "fx" | "fy" | "fill" | "stroke" | "class"> & {
3
+ props: Pick<BaseMarkProps<Datum>, "fill" | "stroke" | "fx" | "fy" | "class"> & {
67
4
  data: Datum[];
68
5
  x: ChannelAccessor;
69
6
  y: ChannelAccessor;
@@ -1,111 +1,6 @@
1
- import { type MarkerShape } from './Marker.svelte';
2
- import type { BaseMarkProps, ConstantAccessor, DataRecord, Mark, PlotScales } from '../../types/index.js';
1
+ import type { DataRecord } from '../../types/index.js';
3
2
  declare function $$render<Datum extends DataRecord>(): {
4
- props: Partial<{
5
- filter: ConstantAccessor<boolean, Datum>;
6
- facet: "auto" | "include" | "exclude";
7
- fx: import("../../types/index.js").ChannelAccessor<Datum>;
8
- fy: import("../../types/index.js").ChannelAccessor<Datum>;
9
- dx: ConstantAccessor<number, Datum>;
10
- dy: ConstantAccessor<number, Datum>;
11
- dodgeX: import("../../transforms/dodge").DodgeXOptions;
12
- dodgeY: import("../../transforms/dodge").DodgeYOptions;
13
- fill: import("../../types/index.js").ChannelAccessor<Datum>;
14
- fillOpacity: ConstantAccessor<number, Datum>;
15
- sort: ((a: import("../../types/index.js").RawValue, b: import("../../types/index.js").RawValue) => number) | {
16
- channel: string;
17
- order?: "ascending" | "descending";
18
- } | ConstantAccessor<import("../../types/index.js").RawValue, Datum>;
19
- stroke: import("../../types/index.js").ChannelAccessor<Datum>;
20
- strokeWidth: ConstantAccessor<number, Datum>;
21
- strokeOpacity: ConstantAccessor<number, Datum>;
22
- strokeLinejoin: ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
23
- strokeLinecap: ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
24
- strokeMiterlimit: ConstantAccessor<number, Datum>;
25
- opacity: import("../../types/index.js").ChannelAccessor<Datum>;
26
- strokeDasharray: ConstantAccessor<string, Datum>;
27
- strokeDashoffset: ConstantAccessor<number, Datum>;
28
- mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
29
- clipPath: string;
30
- mask: string;
31
- imageFilter: ConstantAccessor<string, Datum>;
32
- shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
33
- paintOrder: ConstantAccessor<string, Datum>;
34
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
64
- class: string;
65
- style: string;
66
- cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
67
- }> & {
68
- /**
69
- * the datum associated with this path, usually the first
70
- * element of the data array group
71
- */
72
- datum: Datum;
73
- /**
74
- * the marker shape to use at the start of the path, defaults to
75
- * circle
76
- */
77
- markerStart?: boolean | MarkerShape;
78
- /**
79
- * the marker shape to use at the middle of the path, defaults to circle
80
- */
81
- markerMid?: boolean | MarkerShape;
82
- /**
83
- * the marker shape to use at the end of the path, defaults to circle
84
- */
85
- markerEnd?: boolean | MarkerShape;
86
- /**
87
- * shorthand for setting all markers
88
- */
89
- marker?: boolean | MarkerShape;
90
- /**
91
- * scale factor for marker size, relative to the line stroke width
92
- */
93
- markerScale?: ConstantAccessor<number>;
94
- /**
95
- * path string
96
- */
97
- d: string;
98
- style: string;
99
- startOffset: string;
100
- textStyle: string;
101
- textStyleClass?: string | null;
102
- text: string;
103
- transform: string;
104
- color: string;
105
- strokeWidth: ConstantAccessor<number>;
106
- mark: Mark<BaseMarkProps<Datum>>;
107
- scales: PlotScales;
108
- };
3
+ props: any;
109
4
  exports: {};
110
5
  bindings: "";
111
6
  slots: {};
@@ -4,8 +4,11 @@
4
4
  type RegressionType = 'linear' | 'quad' | 'poly' | 'exp' | 'log' | 'pow' | 'loess';
5
5
 
6
6
  export type RegressionMarkProps = BaseMarkProps & {
7
+ /** the horizontal position channel; bound to the x scale */
7
8
  x: ChannelAccessor;
9
+ /** the vertical position channel; bound to the y scale */
8
10
  y: ChannelAccessor;
11
+ /** the regression model type */
9
12
  type: RegressionType;
10
13
  /**
11
14
  * If order is specified, sets the regression's order to the specified number.
@@ -17,11 +20,11 @@
17
20
  * it may have little predictive power for data outside of your domain.
18
21
  */
19
22
  order: number;
20
- // for log
23
+ /** the base for logarithmic regression */
21
24
  base: number;
22
- // for loess
25
+ /** the bandwidth for LOESS regression, as a fraction of the data range (0 to 1) */
23
26
  span: number;
24
- // for confidence bands
27
+ /** the confidence level for confidence bands (e.g. 0.95 for 95% confidence) */
25
28
  confidence: number;
26
29
  };
27
30
  </script>