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.
Files changed (191) hide show
  1. package/dist/Mark.svelte +25 -27
  2. package/dist/Mark.svelte.d.ts +87 -17
  3. package/dist/Plot.svelte +1 -2
  4. package/dist/Plot.svelte.d.ts +1 -1
  5. package/dist/constants.d.ts +1 -1
  6. package/dist/core/Facet.svelte +1 -1
  7. package/dist/core/Facet.svelte.d.ts +1 -1
  8. package/dist/core/FacetAxes.svelte +3 -1
  9. package/dist/core/FacetGrid.svelte +1 -1
  10. package/dist/core/FacetGrid.svelte.d.ts +1 -1
  11. package/dist/core/Plot.svelte +1 -1
  12. package/dist/core/Plot.svelte.d.ts +1 -1
  13. package/dist/helpers/autoScales.d.ts +1 -1
  14. package/dist/helpers/autoTicks.d.ts +1 -1
  15. package/dist/helpers/autoTicks.js +1 -1
  16. package/dist/helpers/callWithProps.d.ts +1 -1
  17. package/dist/helpers/colors.d.ts +2 -2
  18. package/dist/helpers/curves.d.ts +1 -1
  19. package/dist/helpers/facets.d.ts +1 -1
  20. package/dist/helpers/getBaseStyles.d.ts +4 -2
  21. package/dist/helpers/getBaseStyles.js +8 -0
  22. package/dist/helpers/group.d.ts +1 -1
  23. package/dist/helpers/index.d.ts +3 -3
  24. package/dist/helpers/isDataRecord.d.ts +1 -1
  25. package/dist/helpers/isRawValue.d.ts +1 -1
  26. package/dist/helpers/projection.d.ts +1 -1
  27. package/dist/helpers/reduce.d.ts +1 -1
  28. package/dist/helpers/regressionLoess.d.ts +1 -1
  29. package/dist/helpers/resolve.d.ts +3 -3
  30. package/dist/helpers/scales.d.ts +2 -2
  31. package/dist/helpers/typeChecks.d.ts +5 -5
  32. package/dist/marks/Area.svelte +14 -17
  33. package/dist/marks/Area.svelte.d.ts +91 -19
  34. package/dist/marks/AreaX.svelte +15 -12
  35. package/dist/marks/AreaX.svelte.d.ts +94 -3
  36. package/dist/marks/AreaY.svelte +15 -15
  37. package/dist/marks/AreaY.svelte.d.ts +94 -3
  38. package/dist/marks/Arrow.svelte +16 -19
  39. package/dist/marks/Arrow.svelte.d.ts +110 -38
  40. package/dist/marks/AxisX.svelte +60 -56
  41. package/dist/marks/AxisX.svelte.d.ts +98 -25
  42. package/dist/marks/AxisY.svelte +73 -54
  43. package/dist/marks/AxisY.svelte.d.ts +100 -27
  44. package/dist/marks/BarX.svelte +28 -30
  45. package/dist/marks/BarX.svelte.d.ts +89 -17
  46. package/dist/marks/BarY.svelte +27 -27
  47. package/dist/marks/BarY.svelte.d.ts +88 -16
  48. package/dist/marks/BollingerX.svelte +21 -16
  49. package/dist/marks/BollingerX.svelte.d.ts +17 -16
  50. package/dist/marks/BollingerY.svelte +21 -16
  51. package/dist/marks/BollingerY.svelte.d.ts +17 -16
  52. package/dist/marks/BoxX.svelte +5 -7
  53. package/dist/marks/BoxX.svelte.d.ts +5 -3
  54. package/dist/marks/BoxY.svelte +13 -16
  55. package/dist/marks/BoxY.svelte.d.ts +41 -28
  56. package/dist/marks/Brush.svelte +27 -30
  57. package/dist/marks/Brush.svelte.d.ts +20 -15
  58. package/dist/marks/BrushX.svelte +9 -7
  59. package/dist/marks/BrushX.svelte.d.ts +5 -2
  60. package/dist/marks/BrushY.svelte +9 -7
  61. package/dist/marks/BrushY.svelte.d.ts +5 -2
  62. package/dist/marks/Cell.svelte +17 -18
  63. package/dist/marks/Cell.svelte.d.ts +80 -8
  64. package/dist/marks/CellX.svelte +12 -8
  65. package/dist/marks/CellX.svelte.d.ts +5 -2
  66. package/dist/marks/CellY.svelte +12 -8
  67. package/dist/marks/CellY.svelte.d.ts +5 -2
  68. package/dist/marks/ColorLegend.svelte +5 -8
  69. package/dist/marks/ColorLegend.svelte.d.ts +2 -2
  70. package/dist/marks/CustomMark.svelte +23 -16
  71. package/dist/marks/CustomMark.svelte.d.ts +17 -14
  72. package/dist/marks/CustomMarkHTML.svelte +20 -18
  73. package/dist/marks/CustomMarkHTML.svelte.d.ts +29 -15
  74. package/dist/marks/DifferenceY.svelte +54 -18
  75. package/dist/marks/DifferenceY.svelte.d.ts +59 -28
  76. package/dist/marks/Dot.svelte +13 -14
  77. package/dist/marks/Dot.svelte.d.ts +84 -12
  78. package/dist/marks/DotX.svelte +9 -9
  79. package/dist/marks/DotX.svelte.d.ts +86 -4
  80. package/dist/marks/DotY.svelte +10 -9
  81. package/dist/marks/DotY.svelte.d.ts +87 -5
  82. package/dist/marks/Frame.svelte +20 -27
  83. package/dist/marks/Frame.svelte.d.ts +24 -10
  84. package/dist/marks/Geo.svelte +22 -15
  85. package/dist/marks/Geo.svelte.d.ts +97 -13
  86. package/dist/marks/Graticule.svelte +16 -19
  87. package/dist/marks/Graticule.svelte.d.ts +3 -3
  88. package/dist/marks/GridX.svelte +5 -8
  89. package/dist/marks/GridX.svelte.d.ts +79 -7
  90. package/dist/marks/GridY.svelte +5 -8
  91. package/dist/marks/GridY.svelte.d.ts +79 -7
  92. package/dist/marks/HTMLTooltip.svelte +9 -14
  93. package/dist/marks/HTMLTooltip.svelte.d.ts +25 -12
  94. package/dist/marks/Line.svelte +24 -29
  95. package/dist/marks/Line.svelte.d.ts +97 -25
  96. package/dist/marks/LineX.svelte +9 -4
  97. package/dist/marks/LineX.svelte.d.ts +99 -3
  98. package/dist/marks/LineY.svelte +11 -5
  99. package/dist/marks/LineY.svelte.d.ts +100 -4
  100. package/dist/marks/Link.svelte +35 -19
  101. package/dist/marks/Link.svelte.d.ts +107 -18
  102. package/dist/marks/Pointer.svelte +13 -18
  103. package/dist/marks/Pointer.svelte.d.ts +34 -21
  104. package/dist/marks/Rect.svelte +19 -19
  105. package/dist/marks/Rect.svelte.d.ts +86 -13
  106. package/dist/marks/RectX.svelte +10 -9
  107. package/dist/marks/RectX.svelte.d.ts +22 -6
  108. package/dist/marks/RectY.svelte +9 -10
  109. package/dist/marks/RectY.svelte.d.ts +22 -6
  110. package/dist/marks/RegressionX.svelte +1 -1
  111. package/dist/marks/RegressionX.svelte.d.ts +1 -1
  112. package/dist/marks/RegressionY.svelte +1 -1
  113. package/dist/marks/RegressionY.svelte.d.ts +1 -1
  114. package/dist/marks/RuleX.svelte +14 -16
  115. package/dist/marks/RuleX.svelte.d.ts +84 -12
  116. package/dist/marks/RuleY.svelte +12 -15
  117. package/dist/marks/RuleY.svelte.d.ts +84 -12
  118. package/dist/marks/Sphere.svelte +6 -7
  119. package/dist/marks/Sphere.svelte.d.ts +3 -2
  120. package/dist/marks/Spike.svelte +17 -9
  121. package/dist/marks/Spike.svelte.d.ts +94 -4
  122. package/dist/marks/SymbolLegend.svelte +1 -1
  123. package/dist/marks/Text.svelte +34 -124
  124. package/dist/marks/Text.svelte.d.ts +101 -20
  125. package/dist/marks/TickX.svelte +12 -13
  126. package/dist/marks/TickX.svelte.d.ts +92 -20
  127. package/dist/marks/TickY.svelte +11 -14
  128. package/dist/marks/TickY.svelte.d.ts +92 -20
  129. package/dist/marks/Vector.svelte +19 -23
  130. package/dist/marks/Vector.svelte.d.ts +93 -21
  131. package/dist/marks/helpers/AreaCanvas.svelte +1 -1
  132. package/dist/marks/helpers/AreaCanvas.svelte.d.ts +1 -1
  133. package/dist/marks/helpers/BaseAxisX.svelte +5 -3
  134. package/dist/marks/helpers/BaseAxisX.svelte.d.ts +1 -1
  135. package/dist/marks/helpers/BaseAxisY.svelte +10 -8
  136. package/dist/marks/helpers/BaseAxisY.svelte.d.ts +3 -1
  137. package/dist/marks/helpers/CanvasLayer.svelte +1 -1
  138. package/dist/marks/helpers/DotCanvas.svelte +1 -1
  139. package/dist/marks/helpers/DotCanvas.svelte.d.ts +1 -1
  140. package/dist/marks/helpers/GeoCanvas.svelte +1 -1
  141. package/dist/marks/helpers/GeoCanvas.svelte.d.ts +1 -1
  142. package/dist/marks/helpers/LineCanvas.svelte +1 -1
  143. package/dist/marks/helpers/LineCanvas.svelte.d.ts +1 -1
  144. package/dist/marks/helpers/LinearGradientX.svelte +1 -1
  145. package/dist/marks/helpers/LinearGradientX.svelte.d.ts +1 -1
  146. package/dist/marks/helpers/LinearGradientY.svelte +1 -1
  147. package/dist/marks/helpers/LinearGradientY.svelte.d.ts +1 -1
  148. package/dist/marks/helpers/MarkerPath.svelte +1 -1
  149. package/dist/marks/helpers/MarkerPath.svelte.d.ts +1 -41
  150. package/dist/marks/helpers/MultilineText.svelte +158 -0
  151. package/dist/marks/helpers/MultilineText.svelte.d.ts +12 -0
  152. package/dist/marks/helpers/RectPath.svelte +29 -26
  153. package/dist/marks/helpers/RectPath.svelte.d.ts +39 -26
  154. package/dist/marks/helpers/Regression.svelte +7 -2
  155. package/dist/marks/helpers/Regression.svelte.d.ts +2 -5
  156. package/dist/marks/helpers/events.d.ts +1 -1
  157. package/dist/transforms/bin.d.ts +2 -2
  158. package/dist/transforms/bollinger.d.ts +2 -67
  159. package/dist/transforms/centroid.d.ts +8 -66
  160. package/dist/transforms/centroid.js +10 -7
  161. package/dist/transforms/filter.d.ts +1 -1
  162. package/dist/transforms/group.d.ts +5 -13
  163. package/dist/transforms/interval.d.ts +3 -123
  164. package/dist/transforms/jitter.d.ts +1 -1
  165. package/dist/transforms/map.d.ts +4 -184
  166. package/dist/transforms/normalize.d.ts +3 -123
  167. package/dist/transforms/recordize.d.ts +1 -1
  168. package/dist/transforms/rename.d.ts +2 -2
  169. package/dist/transforms/select.d.ts +8 -428
  170. package/dist/transforms/shift.d.ts +1 -1
  171. package/dist/transforms/sort.d.ts +4 -243
  172. package/dist/transforms/stack.d.ts +1 -1
  173. package/dist/transforms/window.d.ts +3 -131
  174. package/dist/types/channel.d.ts +11 -0
  175. package/dist/types/channel.js +1 -0
  176. package/dist/types/colorScheme.d.ts +1 -0
  177. package/dist/types/colorScheme.js +1 -0
  178. package/dist/types/data.d.ts +13 -0
  179. package/dist/types/data.js +1 -0
  180. package/dist/types/facet.d.ts +50 -0
  181. package/dist/types/facet.js +1 -0
  182. package/dist/types/index.d.ts +58 -0
  183. package/dist/types/index.js +7 -0
  184. package/dist/types/mark.d.ts +123 -0
  185. package/dist/types/mark.js +1 -0
  186. package/dist/types/plot.d.ts +459 -0
  187. package/dist/types/plot.js +1 -0
  188. package/dist/types/scale.d.ts +143 -0
  189. package/dist/types/scale.js +1 -0
  190. package/dist/types.d.ts +120 -127
  191. package/package.json +125 -120
@@ -0,0 +1,123 @@
1
+ export type Mark<T> = {
2
+ id: symbol;
3
+ type: MarkType;
4
+ channels: ScaledChannelName[];
5
+ scales: Set<ScaleName>;
6
+ data: DataRecord<T>[];
7
+ options: T;
8
+ };
9
+ export type MarkType = 'area' | 'arrow' | 'barX' | 'barY' | 'cell' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY';
10
+ export type MarkStyleProps = 'strokeDasharray' | 'strokeLinejoin' | 'strokeLinecap' | 'opacity' | 'cursor' | 'pointerEvents' | 'blend' | 'fill' | 'fillOpacity' | 'fontWeight' | 'fontVariant' | 'fontSize' | 'fontStyle' | 'stroke' | 'strokeWidth' | 'strokeOpacity' | 'x' | 'y' | 'clipPath' | 'mask' | 'filter' | 'angle' | 'radius' | 'symbol' | 'textAnchor' | 'width';
11
+ import type { MouseEventHandler } from 'svelte/elements';
12
+ import type { ChannelAccessor, ConstantAccessor, DataRecord, RawValue } from '.';
13
+ import type * as CSS from 'csstype';
14
+ import type { ScaledChannelName, ScaleName } from './scale';
15
+ export type BaseMarkProps<T> = Partial<{
16
+ /**
17
+ * Filter the data without modifying the inferred scales
18
+ */
19
+ filter?: ConstantAccessor<boolean, T>;
20
+ facet?: 'auto' | 'include' | 'exclude';
21
+ fx: ChannelAccessor<T>;
22
+ fy: ChannelAccessor<T>;
23
+ dx: ConstantAccessor<number, T>;
24
+ dy: ConstantAccessor<number, T>;
25
+ fill: ChannelAccessor<T>;
26
+ fillOpacity: ConstantAccessor<number, T>;
27
+ sort: string | ConstantAccessor<RawValue, T> | ((a: RawValue, b: RawValue) => number) | {
28
+ /** sort data using an already defined channel */
29
+ channel: string;
30
+ /** sort order */
31
+ order?: 'ascending' | 'descending';
32
+ };
33
+ stroke: ChannelAccessor<T>;
34
+ strokeWidth: ConstantAccessor<number, T>;
35
+ strokeOpacity: ConstantAccessor<number, T>;
36
+ strokeLinejoin: ConstantAccessor<CSS.Property.StrokeLinejoin, T>;
37
+ strokeLinecap: ConstantAccessor<CSS.Property.StrokeLinecap, T>;
38
+ strokeMiterlimit: ConstantAccessor<number, T>;
39
+ opacity: ChannelAccessor<T>;
40
+ strokeDasharray: ConstantAccessor<string, T>;
41
+ strokeDashoffset: ConstantAccessor<number, T>;
42
+ mixBlendMode: ConstantAccessor<CSS.Property.MixBlendMode, T>;
43
+ clipPath: string;
44
+ imageFilter: ConstantAccessor<string, T>;
45
+ shapeRendering: ConstantAccessor<CSS.Property.ShapeRendering, T>;
46
+ paintOrder: ConstantAccessor<string, T>;
47
+ onclick?: MouseEventHandler<SVGPathElement>;
48
+ ondblclick?: MouseEventHandler<SVGPathElement>;
49
+ onmouseup?: MouseEventHandler<SVGPathElement>;
50
+ onmousedown?: MouseEventHandler<SVGPathElement>;
51
+ onmouseenter?: MouseEventHandler<SVGPathElement>;
52
+ onmousemove?: MouseEventHandler<SVGPathElement>;
53
+ onmouseleave?: MouseEventHandler<SVGPathElement>;
54
+ onmouseout?: MouseEventHandler<SVGPathElement>;
55
+ onmouseover?: MouseEventHandler<SVGPathElement>;
56
+ onpointercancel?: MouseEventHandler<SVGPathElement>;
57
+ onpointerdown?: MouseEventHandler<SVGPathElement>;
58
+ onpointerup?: MouseEventHandler<SVGPathElement>;
59
+ onpointerenter?: MouseEventHandler<SVGPathElement>;
60
+ onpointerleave?: MouseEventHandler<SVGPathElement>;
61
+ onpointermove?: MouseEventHandler<SVGPathElement>;
62
+ onpointerover?: MouseEventHandler<SVGPathElement>;
63
+ onpointerout?: MouseEventHandler<SVGPathElement>;
64
+ ondrag?: MouseEventHandler<SVGPathElement>;
65
+ ondrop?: MouseEventHandler<SVGPathElement>;
66
+ ondragstart?: MouseEventHandler<SVGPathElement>;
67
+ ondragenter?: MouseEventHandler<SVGPathElement>;
68
+ ondragleave?: MouseEventHandler<SVGPathElement>;
69
+ ondragover?: MouseEventHandler<SVGPathElement>;
70
+ ondragend?: MouseEventHandler<SVGPathElement>;
71
+ ontouchstart?: MouseEventHandler<SVGPathElement>;
72
+ ontouchmove?: MouseEventHandler<SVGPathElement>;
73
+ ontouchend?: MouseEventHandler<SVGPathElement>;
74
+ ontouchcancel?: MouseEventHandler<SVGPathElement>;
75
+ oncontextmenu?: MouseEventHandler<SVGPathElement>;
76
+ onwheel?: MouseEventHandler<SVGPathElement>;
77
+ /**
78
+ * if you want to give your mark element an extra CSS class
79
+ */
80
+ class: string | null;
81
+ cursor: ConstantAccessor<CSS.Property.Cursor, T>;
82
+ }>;
83
+ export type LinkableMarkProps<T> = {
84
+ /**
85
+ * if set, the mark element will be wrapped in a <a> link element
86
+ */
87
+ href?: ConstantAccessor<string, T>;
88
+ /**
89
+ * the relationship of the target object to the link object (e.g. "noopener")
90
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#rel
91
+ */
92
+ rel?: ConstantAccessor<string, T>;
93
+ /**
94
+ * the link target mime type, e.g. "text/csv"
95
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#type
96
+ */
97
+ type?: ConstantAccessor<string, T>;
98
+ /**
99
+ * the target of the link, e.g. "_blank" or "_self"
100
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target
101
+ */
102
+ target?: ConstantAccessor<'_self' | '_blank' | '_parent' | '_top' | string, T>;
103
+ /**
104
+ * if set to true, the link will be downloaded instead of navigating to it
105
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download
106
+ */
107
+ download?: ConstantAccessor<boolean, T>;
108
+ [key: `data-sveltekit-${string}`]: string | boolean | undefined;
109
+ };
110
+ export type BorderRadius = number | {
111
+ topLeft?: number;
112
+ topRight?: number;
113
+ bottomRight?: number;
114
+ bottomLeft?: number;
115
+ };
116
+ export type BaseRectMarkProps<T> = {
117
+ inset?: ConstantAccessor<number, T>;
118
+ insetLeft?: ConstantAccessor<number, T>;
119
+ insetTop?: ConstantAccessor<number, T>;
120
+ insetRight?: ConstantAccessor<number, T>;
121
+ insetBottom?: ConstantAccessor<number, T>;
122
+ borderRadius?: BorderRadius;
123
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,459 @@
1
+ import type { ComponentProps } from 'svelte';
2
+ import type { ColorScheme } from './colorScheme';
3
+ import type { GeoProjection } from 'd3-geo';
4
+ import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, ScaleOptions, XScaleOptions, YScaleOptions } from '.';
5
+ import type { Snippet } from 'svelte';
6
+ import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Vector } from '../marks';
7
+ export type PlotState = {
8
+ width: number;
9
+ height: number;
10
+ options: PlotOptions;
11
+ facetWidth: number;
12
+ facetHeight: number;
13
+ plotWidth: number;
14
+ plotHeight: number;
15
+ scales: PlotScales;
16
+ body: HTMLDivElement;
17
+ /**
18
+ * True if there's a color scale and a symbol scale and both are bound to the same
19
+ * single channel accessor.
20
+ */
21
+ colorSymbolRedundant: boolean;
22
+ /**
23
+ * True if the plot is using filled dot marks.
24
+ */
25
+ hasFilledDotMarks: boolean;
26
+ css: ((d: string) => string) | null;
27
+ };
28
+ export type PlotContext = {
29
+ /**
30
+ * Registers a mark with the Plot component along with its
31
+ * data and the channel mappings.
32
+ */
33
+ addMark: (mark: Mark<GenericMarkOptions>) => Mark<GenericMarkOptions>;
34
+ /**
35
+ * Updates a mark after either the data or the channel mappings
36
+ * have been updated.
37
+ */
38
+ updateMark: (mark: Mark<GenericMarkOptions>) => void;
39
+ /**
40
+ * Unregister a mark from the Plot component after the mark
41
+ * component has been destroyed.
42
+ */
43
+ removeMark: (mark: Mark<GenericMarkOptions>) => void;
44
+ getPlotState: () => PlotState;
45
+ getTopLevelFacet: () => PlotOptions['facet'];
46
+ /**
47
+ * Updates the plots internal facetWidth and facetHeight dimensions
48
+ * which are used as range for the positional scales x and y.
49
+ */
50
+ updateDimensions: (width: number, height: number) => void;
51
+ };
52
+ type IgnoreDefaults = 'data' | 'facet' | ChannelName | 'title' | 'automatic' | 'children';
53
+ /**
54
+ * these are the default options for the plot marks that can be set using
55
+ * the 'svelteplot/defaults' context.
56
+ */
57
+ export type PlotDefaults = {
58
+ /**
59
+ * default plot height
60
+ */
61
+ height: number;
62
+ /**
63
+ * default plot inset
64
+ */
65
+ inset: number;
66
+ /**
67
+ * default color scheme
68
+ */
69
+ colorScheme: ColorScheme;
70
+ categoricalColorScheme: ColorScheme | string[];
71
+ /**
72
+ * fallback color to be used for null/NA
73
+ */
74
+ unknown: string;
75
+ /**
76
+ * optional @emotion/css function to style the plot
77
+ */
78
+ css: (d: string) => string | undefined;
79
+ /**
80
+ * for computing the automatic height based on the number of
81
+ * domain items in a point scale
82
+ */
83
+ pointScaleHeight: number;
84
+ /**
85
+ * for computing the automatic height based on the number of
86
+ * domain items in a band scale
87
+ */
88
+ bandScaleHeight: number;
89
+ /**
90
+ * initial width of the plot before measuring the actual width
91
+ */
92
+ initialWidth: number;
93
+ /**
94
+ * locale, used for automatic axis ticks
95
+ */
96
+ locale: string;
97
+ /**
98
+ * default number format for axis ticks
99
+ */
100
+ numberFormat: Intl.NumberFormatOptions;
101
+ /**
102
+ * default dot radius for line markers, used in dot, circle, and circle-stroke markers
103
+ */
104
+ markerDotRadius: number;
105
+ /**
106
+ * default props for area marks, applied to area, areaX, and areaY marks
107
+ */
108
+ area: Partial<Omit<ComponentProps<typeof Area>, IgnoreDefaults>>;
109
+ /**
110
+ * default props for areaX marks
111
+ */
112
+ areaX: Partial<Omit<ComponentProps<typeof AreaX>, IgnoreDefaults>>;
113
+ /**
114
+ * default props for areaY marks
115
+ */
116
+ areaY: Partial<Omit<ComponentProps<typeof AreaY>, IgnoreDefaults>>;
117
+ /**
118
+ * default props for arrow marks
119
+ */
120
+ arrow: Partial<Omit<ComponentProps<typeof Arrow>, IgnoreDefaults>>;
121
+ /**
122
+ * default props for axis marks, applied to both axisX and axisY marks
123
+ */
124
+ axis: Partial<Omit<ComponentProps<typeof AxisX>, 'data' | 'facet' | ChannelName | 'facetAnchor' | 'labelAnchor' | 'anchor'> & {
125
+ implicit: boolean;
126
+ }>;
127
+ /**
128
+ * default props for axisX marks
129
+ */
130
+ axisX: Partial<Omit<ComponentProps<typeof AxisX>, IgnoreDefaults> & {
131
+ implicit: boolean;
132
+ }>;
133
+ /**
134
+ * default props for axisY marks
135
+ */
136
+ axisY: Partial<Omit<ComponentProps<typeof AxisY>, IgnoreDefaults> & {
137
+ implicit: boolean;
138
+ }>;
139
+ /**
140
+ * default props for bar marks, applied to both barX and barY marks
141
+ */
142
+ bar: Partial<Omit<ComponentProps<typeof BarX>, IgnoreDefaults>>;
143
+ /**
144
+ * default props for barX marks
145
+ */
146
+ barX: Partial<Omit<ComponentProps<typeof BarX>, IgnoreDefaults>>;
147
+ /**
148
+ * default props for barY marks
149
+ */
150
+ barY: Partial<Omit<ComponentProps<typeof BarY>, IgnoreDefaults>>;
151
+ /**
152
+ * default props for box marks, applied to boxX and boxY marks
153
+ */
154
+ box: Partial<Omit<ComponentProps<typeof BoxX>, IgnoreDefaults>>;
155
+ /**
156
+ * default props for boxX marks
157
+ */
158
+ boxX: Partial<Omit<ComponentProps<typeof BoxX>, IgnoreDefaults>>;
159
+ /**
160
+ * default props for boxY marks
161
+ */
162
+ boxY: Partial<Omit<ComponentProps<typeof BoxY>, IgnoreDefaults>>;
163
+ /**
164
+ * default props for brush marks, applied to brush, brushX and brushY marks
165
+ */
166
+ brush: Partial<Omit<ComponentProps<typeof Brush>, IgnoreDefaults | 'limitDimension'>>;
167
+ /**
168
+ * default props for brushX marks
169
+ */
170
+ brushX: Partial<Omit<ComponentProps<typeof BrushX>, IgnoreDefaults>>;
171
+ /**
172
+ * default props for brushY marks
173
+ */
174
+ brushY: Partial<Omit<ComponentProps<typeof BrushY>, IgnoreDefaults>>;
175
+ /**
176
+ * default props for cell marks
177
+ */
178
+ cell: Partial<Omit<ComponentProps<typeof Cell>, IgnoreDefaults>>;
179
+ /**
180
+ * default props for dot marks
181
+ */
182
+ dot: Partial<Omit<ComponentProps<typeof Dot>, IgnoreDefaults>>;
183
+ /**
184
+ * default props for differenceY marks
185
+ */
186
+ differenceY: Partial<Omit<ComponentProps<typeof DifferenceY>, IgnoreDefaults>>;
187
+ /**
188
+ * default props for frame marks
189
+ */
190
+ frame: Partial<ComponentProps<typeof Frame> & {
191
+ implicit: boolean;
192
+ }>;
193
+ /**
194
+ * default props for geo marks
195
+ */
196
+ geo: Partial<Omit<ComponentProps<typeof Geo>, IgnoreDefaults>>;
197
+ /**
198
+ * default props for graticule marks
199
+ */
200
+ graticule: Partial<Omit<ComponentProps<typeof Graticule>, IgnoreDefaults>>;
201
+ /**
202
+ * default props for grid marks, applied to both gridX and gridY marks
203
+ */
204
+ grid: Partial<Omit<ComponentProps<typeof GridX>, IgnoreDefaults> & {
205
+ implicit: boolean;
206
+ }>;
207
+ /**
208
+ * default props for gridX marks
209
+ */
210
+ gridX: Partial<Omit<ComponentProps<typeof GridX>, IgnoreDefaults> & {
211
+ implicit: boolean;
212
+ }>;
213
+ /**
214
+ * default props for gridY marks
215
+ */
216
+ gridY: Partial<Omit<ComponentProps<typeof GridY>, IgnoreDefaults> & {
217
+ implicit: boolean;
218
+ }>;
219
+ /**
220
+ * default props for line marks
221
+ */
222
+ line: Partial<Omit<ComponentProps<typeof Line>, IgnoreDefaults>>;
223
+ /**
224
+ * default props for link marks
225
+ */
226
+ link: Partial<Omit<ComponentProps<typeof Link>, IgnoreDefaults>>;
227
+ /**
228
+ * default props for pointer marks
229
+ */
230
+ pointer: Partial<Omit<ComponentProps<typeof Pointer>, IgnoreDefaults>>;
231
+ /**
232
+ * default props for rect marks, applied to rect and rectX marks
233
+ */
234
+ rect: Partial<Omit<ComponentProps<typeof Rect>, IgnoreDefaults>>;
235
+ /**
236
+ * default props for rectX marks
237
+ */
238
+ rectX: Partial<Omit<ComponentProps<typeof RectX>, IgnoreDefaults>>;
239
+ /**
240
+ * default props for rectY marks
241
+ */
242
+ rectY: Partial<Omit<ComponentProps<typeof RectY>, IgnoreDefaults>>;
243
+ /**
244
+ * default props for rule marks
245
+ */
246
+ rule: Partial<Omit<ComponentProps<typeof RuleX>, IgnoreDefaults>>;
247
+ /**
248
+ * default props for rule marks
249
+ */
250
+ ruleX: Partial<Omit<ComponentProps<typeof RuleX>, IgnoreDefaults>>;
251
+ /**
252
+ * default props for rule marks
253
+ */
254
+ ruleY: Partial<Omit<ComponentProps<typeof RuleY>, IgnoreDefaults>>;
255
+ /**
256
+ * default props for sphere marks
257
+ */
258
+ sphere: Partial<ComponentProps<typeof Sphere>>;
259
+ /**
260
+ * default props for spike marks
261
+ */
262
+ spike: Partial<Omit<ComponentProps<typeof Spike>, IgnoreDefaults>>;
263
+ /**
264
+ * default props for text marks
265
+ */
266
+ text: Partial<Omit<ComponentProps<typeof Text>, IgnoreDefaults>>;
267
+ /**
268
+ * default props for tick marks, applied to tickX and tickY marks
269
+ */
270
+ tick: Partial<Omit<ComponentProps<typeof TickX>, IgnoreDefaults>>;
271
+ /**
272
+ * default props for tickX marks
273
+ */
274
+ tickX: Partial<Omit<ComponentProps<typeof TickX>, IgnoreDefaults>>;
275
+ /**
276
+ * default props for tickY marks
277
+ */
278
+ tickY: Partial<Omit<ComponentProps<typeof TickY>, IgnoreDefaults>>;
279
+ /**
280
+ * default props for vector marks
281
+ */
282
+ vector: Partial<Omit<ComponentProps<typeof Vector>, IgnoreDefaults>>;
283
+ };
284
+ export type PlotOptions = {
285
+ /**
286
+ * The plot title, rendered as H2 tag above the SVG element. Instead of
287
+ * using the title, you can also pass a "header" snippet and render your
288
+ * own custom title markup.
289
+ */
290
+ title: string;
291
+ /**
292
+ * The plot subtitle, rendered as H3 tag above the SVG element. Instead of
293
+ * using the subtitle, you can also pass a "header" snippet and render your
294
+ * own custom title markup.
295
+ */
296
+ subtitle: string;
297
+ /**
298
+ * The plot caption, rendered as FIGCAPTION tag below the SVG element. Instead of
299
+ * using the caption, you can also pass a "footer" snippet and render your
300
+ * own custom title markup.
301
+ */
302
+ caption: string;
303
+ /**
304
+ * By default, the plot will extend to fit 100% of the parent container width. By
305
+ * setting the maxWidth style property you can limit the width of your plot.
306
+ */
307
+ maxWidth?: string;
308
+ /**
309
+ * force the plot into a fixed width
310
+ */
311
+ width?: number;
312
+ /**
313
+ * force the plot into a fixed height
314
+ */
315
+ height: 'auto' | number | ((d: number) => number);
316
+ /**
317
+ * Convenience option for setting all four margins at once, in px.
318
+ */
319
+ margin: number | {
320
+ top?: number;
321
+ right?: number;
322
+ bottom?: number;
323
+ left?: number;
324
+ };
325
+ /**
326
+ * Left margin of the plot, in px.
327
+ */
328
+ marginLeft: number;
329
+ /**
330
+ * Right margin of the plot, in px.
331
+ */
332
+ marginRight: number;
333
+ /**
334
+ * Top margin of the plot, in px.
335
+ */
336
+ marginTop: number;
337
+ /**
338
+ * Bottom margin of the plot, in px.
339
+ */
340
+ marginBottom: number;
341
+ /**
342
+ * Activates the implicit GridX and GridY marks.
343
+ */
344
+ grid: boolean;
345
+ /**
346
+ * Activates the implicit AxisX and AxisY marks.
347
+ */
348
+ axes: boolean;
349
+ /**
350
+ * Activates the implicit frame marks
351
+ */
352
+ frame: boolean;
353
+ /**
354
+ * Convenience shortcut for setting both the x and y scale insets.
355
+ */
356
+ inset: number;
357
+ /**
358
+ * Convenience shortcut for setting both the x and y scale paddings
359
+ */
360
+ padding: number;
361
+ /**
362
+ * Geo-projection
363
+ */
364
+ projection: string | null | {
365
+ type?: string;
366
+ rotate?: [number, number] | [number, number, number];
367
+ domain?: object;
368
+ inset?: number;
369
+ clip?: Clip;
370
+ } | {
371
+ type: (d: {
372
+ width: number;
373
+ height: number;
374
+ }) => GeoProjection;
375
+ };
376
+ /**
377
+ * if not null, computes a default height such that a variation of one
378
+ * unit in the x dimension is represented by the corresponding number
379
+ * of pixels as a variation in the y dimension of one unit.
380
+ */
381
+ aspectRatio: number | null;
382
+ /**
383
+ * Top-level faceting options
384
+ */
385
+ facet: Partial<{
386
+ /**
387
+ * The data to facet by. Turns on automatic faceting for all marks that
388
+ * use the exact same data (===)
389
+ */
390
+ data: DataRecord<any>[];
391
+ x: ChannelAccessor;
392
+ y: ChannelAccessor;
393
+ }>;
394
+ /**
395
+ * Options for the shared x scale.
396
+ */
397
+ x: Partial<XScaleOptions>;
398
+ /**
399
+ * Options for the shared y scale
400
+ */
401
+ y: Partial<YScaleOptions>;
402
+ /**
403
+ * Options for the shared radius scale
404
+ */
405
+ r: Partial<ScaleOptions>;
406
+ color: Partial<ColorScaleOptions>;
407
+ opacity: Partial<ScaleOptions>;
408
+ symbol: Partial<LegendScaleOptions>;
409
+ length: Partial<ScaleOptions>;
410
+ fx: Partial<ScaleOptions>;
411
+ fy: Partial<ScaleOptions>;
412
+ children: Snippet<[
413
+ {
414
+ width: number;
415
+ height: number;
416
+ options: PlotOptions;
417
+ scales: PlotScales;
418
+ }
419
+ ]>;
420
+ /**
421
+ * You can use the header snippet to render a custom title and subtitle for
422
+ * your plot, or place a legend above the visualization.
423
+ */
424
+ header: Snippet;
425
+ footer: Snippet;
426
+ /**
427
+ * The underlay snippet is useful for adding a layer of custom HTML markup
428
+ * behind the SVG body of your plot, e.g. for a watermark or background image.
429
+ */
430
+ underlay: Snippet<[PlotOptions]>;
431
+ /**
432
+ * The overlay snippet is useful for adding a layer of custom HTML markup
433
+ * in front of the SVG body of your plot, e.g. for HTML tooltips.
434
+ */
435
+ overlay: Snippet;
436
+ facetAxes: Snippet;
437
+ /**
438
+ * if you set testid, the plot container will get a data-testid attribute which
439
+ * can be useful for automatic testing
440
+ */
441
+ testid: string;
442
+ /**
443
+ * in case you want to give your Plot element an extra CSS class
444
+ */
445
+ class: string | null;
446
+ /**
447
+ * if set to true, the plot will use the implicit scales
448
+ */
449
+ implicitScales: boolean;
450
+ /**
451
+ * locale used for automatic axis ticks
452
+ */
453
+ locale: string;
454
+ /**
455
+ * pass a @emotion/css function to style plot using dynamic classes
456
+ */
457
+ css: (d: string) => string | undefined;
458
+ };
459
+ export {};
@@ -0,0 +1 @@
1
+ export {};