vccs 0.1.0 → 0.3.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 (273) hide show
  1. package/README.md +151 -0
  2. package/dist/animation/Animate.d.ts +1 -1
  3. package/dist/cartesian/area/type.d.ts +3 -3
  4. package/dist/cartesian/bar/type.d.ts +1 -13
  5. package/dist/cartesian/brush/components/Slide.d.ts +1 -1
  6. package/dist/cartesian/brush/components/TravellerLayer.d.ts +1 -1
  7. package/dist/cartesian/brush/type.d.ts +2 -1
  8. package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +2 -1
  9. package/dist/cartesian/funnel/Funnel.d.ts +2 -0
  10. package/dist/cartesian/funnel/index.d.ts +2 -0
  11. package/dist/cartesian/funnel/type.d.ts +74 -6
  12. package/dist/cartesian/index.d.ts +2 -0
  13. package/dist/cartesian/line/Line.d.ts +7 -13
  14. package/dist/cartesian/line/type.d.ts +4 -17
  15. package/dist/cartesian/reference-area/ReferenceArea.d.ts +16 -16
  16. package/dist/cartesian/reference-dot/ReferenceDot.d.ts +143 -0
  17. package/dist/cartesian/reference-dot/index.d.ts +2 -0
  18. package/dist/cartesian/reference-line/ReferenceLine.d.ts +8 -8
  19. package/dist/cartesian/scatter/Scatter.d.ts +1 -1
  20. package/dist/chart/FunnelChart.d.ts +1 -0
  21. package/dist/chart/RechartsWrapper.d.ts +7 -3
  22. package/dist/chart/Surface.d.ts +2 -1
  23. package/dist/chart/Treemap.d.ts +237 -0
  24. package/dist/chart/generateCategoricalChart.d.ts +2 -1
  25. package/dist/chart/index.d.ts +2 -0
  26. package/dist/chart/treemapUtils.d.ts +22 -0
  27. package/dist/components/Customized.d.ts +23 -0
  28. package/dist/components/Text.d.ts +4 -4
  29. package/dist/components/Tooltip.d.ts +1 -1
  30. package/dist/components/index.d.ts +2 -0
  31. package/dist/components/label/Label.d.ts +3 -3
  32. package/dist/components/label/types.d.ts +1 -1
  33. package/dist/container/Surface.d.ts +3 -2
  34. package/dist/es/animation/Animate.mjs +48 -22
  35. package/dist/es/cartesian/GraphicalItemClipPath.mjs +16 -15
  36. package/dist/es/cartesian/area/ActivePoints.mjs +44 -40
  37. package/dist/es/cartesian/area/Area.mjs +42 -31
  38. package/dist/es/cartesian/area/ClipRect.mjs +79 -58
  39. package/dist/es/cartesian/area/RenderArea.mjs +142 -108
  40. package/dist/es/cartesian/area/hooks/useArea.mjs +71 -47
  41. package/dist/es/cartesian/area/type.mjs +13 -15
  42. package/dist/es/cartesian/area/utils.mjs +69 -49
  43. package/dist/es/cartesian/axis/XAxis.mjs +87 -73
  44. package/dist/es/cartesian/axis/YAxis.mjs +67 -56
  45. package/dist/es/cartesian/bar/Bar.mjs +78 -71
  46. package/dist/es/cartesian/bar/components/BarBackground.mjs +22 -19
  47. package/dist/es/cartesian/bar/components/BarRectangles.mjs +117 -80
  48. package/dist/es/cartesian/bar/hooks/useBar.mjs +49 -37
  49. package/dist/es/cartesian/bar/type.mjs +11 -25
  50. package/dist/es/cartesian/bar/utils.mjs +97 -70
  51. package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +165 -115
  52. package/dist/es/cartesian/cartesian-grid/Background.mjs +19 -16
  53. package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +116 -97
  54. package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +24 -23
  55. package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +24 -24
  56. package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +23 -22
  57. package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +24 -24
  58. package/dist/es/cartesian/cartesian-grid/const.mjs +317 -10
  59. package/dist/es/cartesian/cartesian-grid/utils.mjs +18 -13
  60. package/dist/es/cartesian/error-bar/ErrorBar.mjs +111 -83
  61. package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +13 -12
  62. package/dist/es/cartesian/funnel/Funnel.mjs +162 -0
  63. package/dist/es/cartesian/funnel/type.mjs +78 -0
  64. package/dist/es/cartesian/funnel/utils.mjs +102 -0
  65. package/dist/es/cartesian/line/ActivePoints.mjs +45 -41
  66. package/dist/es/cartesian/line/Line.mjs +41 -37
  67. package/dist/es/cartesian/line/StaticLine.mjs +191 -122
  68. package/dist/es/cartesian/line/hooks/useLine.mjs +60 -44
  69. package/dist/es/cartesian/line/type.mjs +13 -18
  70. package/dist/es/cartesian/line/utils.mjs +27 -26
  71. package/dist/es/cartesian/reference-area/ReferenceArea.mjs +79 -78
  72. package/dist/es/cartesian/reference-dot/ReferenceDot.mjs +134 -0
  73. package/dist/es/cartesian/reference-line/ReferenceLine.mjs +93 -84
  74. package/dist/es/cartesian/scatter/Scatter.mjs +168 -140
  75. package/dist/es/cartesian/scatter/hooks/useScatter.mjs +18 -14
  76. package/dist/es/cartesian/useNeedsClip.mjs +18 -9
  77. package/dist/es/cartesian/utils/get-ticks.mjs +103 -68
  78. package/dist/es/cartesian/z-axis/ZAxis.mjs +30 -28
  79. package/dist/es/chart/AreaChart.mjs +5 -5
  80. package/dist/es/chart/BarChart.mjs +5 -5
  81. package/dist/es/chart/ComposedChart.mjs +5 -5
  82. package/dist/es/chart/FunnelChart.mjs +11 -0
  83. package/dist/es/chart/LegendPortalContext.mjs +3 -3
  84. package/dist/es/chart/LineChart.mjs +5 -5
  85. package/dist/es/chart/PieChart.mjs +5 -5
  86. package/dist/es/chart/RadarChart.mjs +5 -5
  87. package/dist/es/chart/RadialBarChart.mjs +5 -5
  88. package/dist/es/chart/RechartsWrapper.mjs +113 -89
  89. package/dist/es/chart/ScatterChart.mjs +5 -5
  90. package/dist/es/chart/Surface.mjs +3 -3
  91. package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +51 -45
  92. package/dist/es/chart/TooltipPortalContext.mjs +3 -3
  93. package/dist/es/chart/Treemap.mjs +379 -0
  94. package/dist/es/chart/const.mjs +2 -2
  95. package/dist/es/chart/generateCategoricalChart.mjs +99 -89
  96. package/dist/es/chart/provideClipPathId.mjs +12 -7
  97. package/dist/es/chart/treemapUtils.mjs +32 -0
  98. package/dist/es/components/Cell.mjs +16 -4
  99. package/dist/es/components/Customized.mjs +43 -0
  100. package/dist/es/components/Text.mjs +3 -3
  101. package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +106 -69
  102. package/dist/es/components/Tooltip.mjs +274 -199
  103. package/dist/es/components/label/Label.mjs +30 -26
  104. package/dist/es/components/label/LabelList.mjs +45 -39
  105. package/dist/es/components/label/types.mjs +10 -6
  106. package/dist/es/components/label/utils.mjs +194 -162
  107. package/dist/es/components/legend/Legend.mjs +82 -71
  108. package/dist/es/components/legend/LegendSymbol.mjs +40 -38
  109. package/dist/es/components/legend/hooks/useLegend.mjs +71 -46
  110. package/dist/es/components/legend/hooks/useLegendContent.mjs +52 -31
  111. package/dist/es/components/legend/type.mjs +2 -2
  112. package/dist/es/components/legend/utils.mjs +19 -11
  113. package/dist/es/components/utils.mjs +35 -22
  114. package/dist/es/container/ClipPath.mjs +14 -14
  115. package/dist/es/container/Layer.mjs +9 -7
  116. package/dist/es/container/ResponsiveContainer.mjs +3 -3
  117. package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +109 -77
  118. package/dist/es/container/Surface.mjs +25 -23
  119. package/dist/es/container/useSizeContext.mjs +3 -3
  120. package/dist/es/context/ChartDataContextProvider.mjs +19 -13
  121. package/dist/es/context/PanoramaContextProvider.mjs +15 -10
  122. package/dist/es/context/accessibilityContext.mjs +3 -3
  123. package/dist/es/context/cartesianLabelListContext.mjs +3 -3
  124. package/dist/es/context/chartLayoutContext.mjs +33 -30
  125. package/dist/es/context/cursorLayerContext.mjs +3 -3
  126. package/dist/es/context/graphicalLayerContext.mjs +3 -3
  127. package/dist/es/context/labelLayerContext.mjs +3 -3
  128. package/dist/es/context/polarLabelViewBoxContext.mjs +5 -5
  129. package/dist/es/context/useTooltipAxis.mjs +14 -12
  130. package/dist/es/events/useChartSynchronisation.mjs +91 -66
  131. package/dist/es/hooks/publicHooks.mjs +207 -0
  132. package/dist/es/hooks/useIsAnimating.mjs +28 -0
  133. package/dist/es/hooks/useSetupGraphicalItem.mjs +52 -43
  134. package/dist/es/index.mjs +54 -42
  135. package/dist/es/polar/pie/Pie.mjs +131 -115
  136. package/dist/es/polar/pie/type.mjs +8 -10
  137. package/dist/es/polar/radar/PolarAngleAxis.mjs +103 -84
  138. package/dist/es/polar/radar/PolarGrid.mjs +72 -59
  139. package/dist/es/polar/radar/PolarRadiusAxis.mjs +90 -65
  140. package/dist/es/polar/radar/Radar.mjs +181 -145
  141. package/dist/es/polar/radial-bar/RadialBar.mjs +161 -140
  142. package/dist/es/polar/radial-bar/type.mjs +9 -9
  143. package/dist/es/shape/Cross.mjs +11 -10
  144. package/dist/es/shape/Curve.mjs +71 -44
  145. package/dist/es/shape/Dot.mjs +12 -11
  146. package/dist/es/shape/Polygon.mjs +19 -0
  147. package/dist/es/shape/Rectangle.mjs +41 -30
  148. package/dist/es/shape/Sector.mjs +105 -79
  149. package/dist/es/shape/Symbols.mjs +45 -34
  150. package/dist/es/shape/Trapezoid.mjs +50 -0
  151. package/dist/es/state/ReportChartProps.mjs +23 -24
  152. package/dist/es/state/ReportMainChartProps.mjs +26 -21
  153. package/dist/es/state/ReportPolarOptions.mjs +23 -22
  154. package/dist/es/state/SetGraphicalItem.mjs +42 -27
  155. package/dist/es/state/SetLegendPayload.mjs +17 -13
  156. package/dist/es/state/SetTooltipEntrySettings.mjs +14 -12
  157. package/dist/es/state/brushSlice.mjs +12 -8
  158. package/dist/es/state/cartesianAxisSlice.mjs +23 -17
  159. package/dist/es/state/chartDataSlice.mjs +18 -13
  160. package/dist/es/state/externalEventsMiddleware.mjs +25 -15
  161. package/dist/es/state/graphicalItemsSlice.mjs +29 -25
  162. package/dist/es/state/hooks.mjs +24 -3
  163. package/dist/es/state/keyboardEventsMiddleware.mjs +50 -42
  164. package/dist/es/state/layoutSlice.mjs +18 -12
  165. package/dist/es/state/legendSlice.mjs +19 -14
  166. package/dist/es/state/mouseEventsMiddleware.mjs +31 -24
  167. package/dist/es/state/optionsSlice.mjs +14 -11
  168. package/dist/es/state/polarAxisSlice.mjs +15 -13
  169. package/dist/es/state/polarOptionsSlice.mjs +8 -6
  170. package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +5 -3
  171. package/dist/es/state/referenceElementsSlice.mjs +21 -19
  172. package/dist/es/state/rootPropsSlice.mjs +20 -9
  173. package/dist/es/state/selectors/areaSelectors.mjs +65 -55
  174. package/dist/es/state/selectors/axisSelectors.mjs +784 -569
  175. package/dist/es/state/selectors/barSelectors.mjs +225 -162
  176. package/dist/es/state/selectors/brushSelectors.mjs +15 -14
  177. package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +6 -5
  178. package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +36 -27
  179. package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +5 -3
  180. package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +13 -11
  181. package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +26 -21
  182. package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +10 -6
  183. package/dist/es/state/selectors/common.mjs +2 -2
  184. package/dist/es/state/selectors/containerSelectors.mjs +5 -2
  185. package/dist/es/state/selectors/dataSelectors.mjs +28 -9
  186. package/dist/es/state/selectors/funnelSelectors.mjs +38 -0
  187. package/dist/es/state/selectors/legendSelectors.mjs +7 -6
  188. package/dist/es/state/selectors/lineSelectors.mjs +54 -47
  189. package/dist/es/state/selectors/pickAxisId.mjs +2 -2
  190. package/dist/es/state/selectors/pickAxisType.mjs +2 -2
  191. package/dist/es/state/selectors/pieSelectors.mjs +116 -81
  192. package/dist/es/state/selectors/polarAxisSelectors.mjs +113 -94
  193. package/dist/es/state/selectors/polarGridSelectors.mjs +13 -11
  194. package/dist/es/state/selectors/polarScaleSelectors.mjs +49 -46
  195. package/dist/es/state/selectors/polarSelectors.mjs +79 -62
  196. package/dist/es/state/selectors/radarSelectors.mjs +111 -91
  197. package/dist/es/state/selectors/radialBarSelectors.mjs +230 -183
  198. package/dist/es/state/selectors/rootPropsSelectors.mjs +11 -5
  199. package/dist/es/state/selectors/scatterSelectors.mjs +111 -95
  200. package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +19 -17
  201. package/dist/es/state/selectors/selectAllAxes.mjs +8 -3
  202. package/dist/es/state/selectors/selectChartOffset.mjs +59 -50
  203. package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -44
  204. package/dist/es/state/selectors/selectTooltipEventType.mjs +15 -14
  205. package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +3 -3
  206. package/dist/es/state/selectors/selectTooltipSettings.mjs +2 -2
  207. package/dist/es/state/selectors/selectTooltipState.mjs +2 -2
  208. package/dist/es/state/selectors/selectors.mjs +94 -75
  209. package/dist/es/state/selectors/tooltipSelectors.mjs +253 -204
  210. package/dist/es/state/selectors/touchSelectors.mjs +17 -14
  211. package/dist/es/state/store.mjs +46 -46
  212. package/dist/es/state/tooltipSlice.mjs +64 -37
  213. package/dist/es/state/touchEventsMiddleware.mjs +35 -29
  214. package/dist/es/state/utils/useReportScale.mjs +16 -13
  215. package/dist/es/synchronisation/syncSelectors.mjs +3 -3
  216. package/dist/es/synchronisation/useChartSynchronisation.mjs +33 -19
  217. package/dist/es/types/common.mjs +12 -0
  218. package/dist/es/types/event.mjs +164 -2
  219. package/dist/es/utils/ReduceCSSCalc.mjs +81 -49
  220. package/dist/es/utils/VueUtils.mjs +35 -14
  221. package/dist/es/utils/attrs.mjs +43 -26
  222. package/dist/es/utils/cartesian.mjs +47 -15
  223. package/dist/es/utils/cell.mjs +28 -0
  224. package/dist/es/utils/chart.mjs +298 -197
  225. package/dist/es/utils/const.mjs +30 -2
  226. package/dist/es/utils/createCategoricalInverse.mjs +46 -0
  227. package/dist/es/utils/createContext.mjs +28 -9
  228. package/dist/es/utils/data-utils.mjs +9 -8
  229. package/dist/es/utils/data.mjs +35 -21
  230. package/dist/es/utils/events.mjs +5 -3
  231. package/dist/es/utils/getLinearRegression.mjs +28 -11
  232. package/dist/es/utils/grid.mjs +20 -5
  233. package/dist/es/utils/isDomainSpecifiedByUser.mjs +105 -54
  234. package/dist/es/utils/legend.mjs +13 -12
  235. package/dist/es/utils/log.mjs +10 -7
  236. package/dist/es/utils/payload/getUniqPayload.mjs +6 -4
  237. package/dist/es/utils/polar.mjs +37 -30
  238. package/dist/es/utils/props.mjs +16 -10
  239. package/dist/es/utils/resolveDefaultProps.mjs +23 -4
  240. package/dist/es/utils/scale/getNiceTickValues.mjs +127 -49
  241. package/dist/es/utils/scale/utils/arithmetic.mjs +49 -19
  242. package/dist/es/utils/scale/utils/utils.mjs +43 -24
  243. package/dist/es/utils/scale.mjs +46 -0
  244. package/dist/es/utils/style.mjs +24 -13
  245. package/dist/es/utils/tick.mjs +34 -23
  246. package/dist/es/utils/tooltip/translate.mjs +63 -49
  247. package/dist/es/utils/validate.mjs +40 -29
  248. package/dist/hooks/publicHooks.d.ts +143 -0
  249. package/dist/hooks/useIsAnimating.d.ts +14 -0
  250. package/dist/index.d.ts +1 -0
  251. package/dist/polar/pie/type.d.ts +2 -2
  252. package/dist/polar/radar/Radar.d.ts +4 -4
  253. package/dist/shape/Curve.d.ts +2 -1
  254. package/dist/shape/Polygon.d.ts +9 -0
  255. package/dist/shape/Rectangle.d.ts +0 -4
  256. package/dist/shape/Sector.d.ts +2 -2
  257. package/dist/shape/Symbols.d.ts +2 -1
  258. package/dist/shape/Trapezoid.d.ts +30 -0
  259. package/dist/shape/index.d.ts +2 -0
  260. package/dist/shape/types.d.ts +4 -5
  261. package/dist/state/ReportChartProps.d.ts +3 -3
  262. package/dist/state/graphicalItemsSlice.d.ts +1 -1
  263. package/dist/state/rootPropsSlice.d.ts +2 -2
  264. package/dist/state/selectors/axisSelectors.d.ts +5 -0
  265. package/dist/types/axis.d.ts +2 -2
  266. package/dist/types/bar.d.ts +2 -6
  267. package/dist/types/categorical.d.ts +2 -2
  268. package/dist/types/common.d.ts +7 -1
  269. package/dist/types/tooltip.d.ts +2 -2
  270. package/dist/utils/cell.d.ts +11 -0
  271. package/dist/utils/createCategoricalInverse.d.ts +16 -0
  272. package/dist/utils/scale.d.ts +23 -0
  273. package/package.json +2 -1
@@ -1,59 +1,73 @@
1
- import { isNumber as e } from "../validate.mjs";
1
+ import { isNumber } from "../validate.mjs";
2
2
  //#region src/utils/tooltip/translate.ts
3
- var t = "v-charts-tooltip-wrapper", n = { visibility: "hidden" };
4
- function r({ coordinate: n, translateX: r, translateY: i }) {
5
- return [t, {
6
- [`${t}-right`]: e(r) && n && e(n.x) && r >= n.x,
7
- [`${t}-left`]: e(r) && n && e(n.x) && r < n.x,
8
- [`${t}-bottom`]: e(i) && n && e(n.y) && i >= n.y,
9
- [`${t}-top`]: e(i) && n && e(n.y) && i < n.y
3
+ var CSS_CLASS_PREFIX = "v-charts-tooltip-wrapper";
4
+ var TOOLTIP_HIDDEN = { visibility: "hidden" };
5
+ function getTooltipCSSClassName({ coordinate, translateX, translateY }) {
6
+ return [CSS_CLASS_PREFIX, {
7
+ [`${CSS_CLASS_PREFIX}-right`]: isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x,
8
+ [`${CSS_CLASS_PREFIX}-left`]: isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX < coordinate.x,
9
+ [`${CSS_CLASS_PREFIX}-bottom`]: isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY >= coordinate.y,
10
+ [`${CSS_CLASS_PREFIX}-top`]: isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY < coordinate.y
10
11
  }];
11
12
  }
12
- function i({ allowEscapeViewBox: t, coordinate: n, key: r, offsetTopLeft: i, position: a, reverseDirection: o, tooltipDimension: s, viewBox: c, viewBoxDimension: l }) {
13
- if (a && e(a[r])) return a[r];
14
- let u = n[r] - s - (i > 0 ? i : 0), d = n[r] + i;
15
- if (t[r]) return o[r] ? u : d;
16
- let f = c[r];
17
- return f == null ? 0 : o[r] ? u < f ? Math.max(d, f) : Math.max(u, f) : l == null ? 0 : d + s > f + l ? Math.max(u, f) : Math.max(d, f);
13
+ function getTooltipTranslateXY({ allowEscapeViewBox, coordinate, key, offsetTopLeft, position, reverseDirection, tooltipDimension, viewBox, viewBoxDimension }) {
14
+ if (position && isNumber(position[key])) return position[key];
15
+ const negative = coordinate[key] - tooltipDimension - (offsetTopLeft > 0 ? offsetTopLeft : 0);
16
+ const positive = coordinate[key] + offsetTopLeft;
17
+ if (allowEscapeViewBox[key]) return reverseDirection[key] ? negative : positive;
18
+ const viewBoxKey = viewBox[key];
19
+ if (viewBoxKey == null) return 0;
20
+ if (reverseDirection[key]) {
21
+ if (negative < viewBoxKey) return Math.max(positive, viewBoxKey);
22
+ return Math.max(negative, viewBoxKey);
23
+ }
24
+ if (viewBoxDimension == null) return 0;
25
+ if (positive + tooltipDimension > viewBoxKey + viewBoxDimension) return Math.max(negative, viewBoxKey);
26
+ return Math.max(positive, viewBoxKey);
18
27
  }
19
- function a({ translateX: e, translateY: t, useTranslate3d: n }) {
20
- return { transform: n ? `translate3d(${e}px, ${t}px, 0)` : `translate(${e}px, ${t}px)` };
28
+ function getTransformStyle({ translateX, translateY, useTranslate3d }) {
29
+ return { transform: useTranslate3d ? `translate3d(${translateX}px, ${translateY}px, 0)` : `translate(${translateX}px, ${translateY}px)` };
21
30
  }
22
- function o({ allowEscapeViewBox: e, coordinate: t, offsetTopLeft: o, position: s, reverseDirection: c, tooltipBox: l, useTranslate3d: u, viewBox: d }) {
23
- let f, p, m;
24
- return l.height > 0 && l.width > 0 && t ? (p = i({
25
- allowEscapeViewBox: e,
26
- coordinate: t,
27
- key: "x",
28
- offsetTopLeft: o,
29
- position: s,
30
- reverseDirection: c,
31
- tooltipDimension: l.width,
32
- viewBox: d,
33
- viewBoxDimension: d.width
34
- }), m = i({
35
- allowEscapeViewBox: e,
36
- coordinate: t,
37
- key: "y",
38
- offsetTopLeft: o,
39
- position: s,
40
- reverseDirection: c,
41
- tooltipDimension: l.height,
42
- viewBox: d,
43
- viewBoxDimension: d.height
44
- }), f = {}) : f = n, {
45
- cssProperties: f,
46
- cssClasses: r({
47
- translateX: p,
48
- translateY: m,
49
- coordinate: t
31
+ function getTooltipTranslate({ allowEscapeViewBox, coordinate, offsetTopLeft, position, reverseDirection, tooltipBox, useTranslate3d, viewBox }) {
32
+ let cssProperties, translateX, translateY;
33
+ if (tooltipBox.height > 0 && tooltipBox.width > 0 && coordinate) {
34
+ translateX = getTooltipTranslateXY({
35
+ allowEscapeViewBox,
36
+ coordinate,
37
+ key: "x",
38
+ offsetTopLeft,
39
+ position,
40
+ reverseDirection,
41
+ tooltipDimension: tooltipBox.width,
42
+ viewBox,
43
+ viewBoxDimension: viewBox.width
44
+ });
45
+ translateY = getTooltipTranslateXY({
46
+ allowEscapeViewBox,
47
+ coordinate,
48
+ key: "y",
49
+ offsetTopLeft,
50
+ position,
51
+ reverseDirection,
52
+ tooltipDimension: tooltipBox.height,
53
+ viewBox,
54
+ viewBoxDimension: viewBox.height
55
+ });
56
+ cssProperties = {};
57
+ } else cssProperties = TOOLTIP_HIDDEN;
58
+ return {
59
+ cssProperties,
60
+ cssClasses: getTooltipCSSClassName({
61
+ translateX,
62
+ translateY,
63
+ coordinate
50
64
  }),
51
- transform: a({
52
- translateX: p ?? 0,
53
- translateY: m ?? 0,
54
- useTranslate3d: u
65
+ transform: getTransformStyle({
66
+ translateX: translateX ?? 0,
67
+ translateY: translateY ?? 0,
68
+ useTranslate3d
55
69
  })
56
70
  };
57
71
  }
58
72
  //#endregion
59
- export { o as getTooltipTranslate };
73
+ export { getTooltipTranslate };
@@ -1,31 +1,42 @@
1
1
  //#region src/utils/validate.ts
2
- function e(e) {
3
- return typeof e == "number" && e != +e;
4
- }
5
- function t(t) {
6
- return (typeof t == "number" || t instanceof Number) && !e(t);
7
- }
8
- function n({ width: e, height: n }) {
9
- return !(!t(e) || e <= 0 || !t(n) || n <= 0);
10
- }
11
- function r(e) {
12
- return Number.isFinite(e);
13
- }
14
- function i(e) {
15
- return typeof e == "string" && e.indexOf("%") === e.length - 1;
16
- }
17
- function a(e, t) {
18
- return e === "horizontal" && t === "xAxis" || e === "vertical" && t === "yAxis" || e === "centric" && t === "angleAxis" || e === "radial" && t === "radiusAxis";
19
- }
20
- function o(e, t, n, r, i) {
21
- if (e * t < e * r || e * t > e * i) return !1;
22
- let a = n();
23
- return e * (t - e * a / 2 - r) >= 0 && e * (t + e * a / 2 - i) <= 0;
24
- }
25
- var s = typeof window > "u";
26
- function c(e) {
27
- return e == null;
28
- }
29
- var l = (e) => t(e) || typeof e == "string";
2
+ function isNan(value) {
3
+ return typeof value == "number" && value != +value;
4
+ }
5
+ function isNumber(value) {
6
+ return (typeof value === "number" || value instanceof Number) && !isNan(value);
7
+ }
8
+ /**
9
+ * validate the width and height props of a chart element
10
+ * @param {object} el A chart element
11
+ * @return {boolean} true If the props width and height are number, and greater than 0
12
+ */
13
+ function validateWidthHeight({ width, height }) {
14
+ if (!isNumber(width) || width <= 0 || !isNumber(height) || height <= 0) return false;
15
+ return true;
16
+ }
17
+ function isWellBehavedNumber(n) {
18
+ return Number.isFinite(n);
19
+ }
20
+ function isPercent(value) {
21
+ return typeof value === "string" && value.indexOf("%") === value.length - 1;
22
+ }
23
+ function isCategoricalAxis(layout, axisType) {
24
+ return layout === "horizontal" && axisType === "xAxis" || layout === "vertical" && axisType === "yAxis" || layout === "centric" && axisType === "angleAxis" || layout === "radial" && axisType === "radiusAxis";
25
+ }
26
+ function isVisible(sign, tickPosition, getSize, start, end) {
27
+ if (sign * tickPosition < sign * start || sign * tickPosition > sign * end) return false;
28
+ const size = getSize();
29
+ return sign * (tickPosition - sign * size / 2 - start) >= 0 && sign * (tickPosition + sign * size / 2 - end) <= 0;
30
+ }
31
+ var isSsr = typeof window === "undefined";
32
+ /**
33
+ * Checks if the value is null or undefined
34
+ * @param {any} value The value to check
35
+ * @returns {boolean} true if the value is null or undefined
36
+ */
37
+ function isNullish(value) {
38
+ return value === null || typeof value === "undefined";
39
+ }
40
+ var isNumOrStr = (value) => isNumber(value) || typeof value === "string";
30
41
  //#endregion
31
- export { a as isCategoricalAxis, e as isNan, c as isNullish, l as isNumOrStr, t as isNumber, i as isPercent, s as isSsr, o as isVisible, r as isWellBehavedNumber, n as validateWidthHeight };
42
+ export { isCategoricalAxis, isNan, isNullish, isNumOrStr, isNumber, isPercent, isSsr, isVisible, isWellBehavedNumber, validateWidthHeight };
@@ -0,0 +1,143 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { useChartHeight, useChartWidth, useMargin, useOffset } from '../context/chartLayoutContext';
3
+ import { AxisId } from '../state/cartesianAxisSlice';
4
+ import { Coordinate } from '../types/common';
5
+ export type { InverseScaleFunction } from '../utils/createCategoricalInverse';
6
+ export type ScaleFunction = (value: unknown) => number | undefined;
7
+ export interface CartesianDataPoint {
8
+ x: number | string;
9
+ y: number | string;
10
+ }
11
+ export { useChartWidth, useChartHeight, useMargin, useOffset };
12
+ export { useActiveTooltipDataPoints } from '../state/hooks';
13
+ /**
14
+ * Returns whether the tooltip is currently active (visible).
15
+ *
16
+ * Must be used inside a chart component tree (where the Redux store is provided).
17
+ *
18
+ * @returns A reactive boolean indicating tooltip active state
19
+ */
20
+ export declare function useIsTooltipActive(): Readonly<import('vue').ShallowRef<boolean>>;
21
+ /**
22
+ * Returns the current coordinate of the active tooltip.
23
+ *
24
+ * Must be used inside a chart component tree (where the Redux store is provided).
25
+ *
26
+ * @returns A reactive Coordinate ({ x, y }) or undefined when no tooltip is active
27
+ */
28
+ export declare function useActiveTooltipCoordinate(): Readonly<import('vue').ShallowRef<Coordinate>>;
29
+ /**
30
+ * Returns the label of the currently active tooltip (the value from the axis dataKey at the hovered index).
31
+ *
32
+ * Must be used inside a chart component tree (where the Redux store is provided).
33
+ *
34
+ * @returns A reactive string label or undefined when no tooltip is active
35
+ */
36
+ export declare function useActiveTooltipLabel(): Readonly<import('vue').ShallowRef<string>>;
37
+ /**
38
+ * Returns the plot area rectangle { x, y, width, height }.
39
+ * This is the area inside all axes, legend, and brush — where graphical items render.
40
+ *
41
+ * Must be used inside a chart component tree (where the Redux store is provided).
42
+ *
43
+ * @returns A reactive object with x, y, width, height or undefined if offset is not yet available
44
+ */
45
+ export declare function usePlotArea(): ComputedRef<{
46
+ x: number;
47
+ y: number;
48
+ width: number;
49
+ height: number;
50
+ }>;
51
+ /**
52
+ * Returns the computed domain of an X axis.
53
+ *
54
+ * @param axisId - The axis ID (defaults to 0)
55
+ * @returns A reactive domain (categorical or numerical) or undefined
56
+ */
57
+ export declare function useXAxisDomain(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../types/axis').NumberDomain | import('../types').CategoricalDomain>>;
58
+ /**
59
+ * Returns the computed domain of a Y axis.
60
+ *
61
+ * @param axisId - The axis ID (defaults to 0)
62
+ * @returns A reactive domain (categorical or numerical) or undefined
63
+ */
64
+ export declare function useYAxisDomain(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../types/axis').NumberDomain | import('../types').CategoricalDomain>>;
65
+ /**
66
+ * Returns the computed tick items of an X axis.
67
+ *
68
+ * @param axisId - The axis ID (defaults to 0)
69
+ * @returns A reactive array of TickItem or undefined
70
+ */
71
+ export declare function useXAxisTicks(axisId?: AxisId): Readonly<import('vue').ShallowRef<readonly import('../types/common').TickItem[]>>;
72
+ /**
73
+ * Returns the computed tick items of a Y axis.
74
+ *
75
+ * @param axisId - The axis ID (defaults to 0)
76
+ * @returns A reactive array of TickItem or undefined
77
+ */
78
+ export declare function useYAxisTicks(axisId?: AxisId): Readonly<import('vue').ShallowRef<readonly import('../types/common').TickItem[]>>;
79
+ /**
80
+ * Returns the scale function for an X axis, mapping data values to pixel coordinates.
81
+ *
82
+ * @param axisId - The axis ID (defaults to 0)
83
+ * @returns A reactive ScaleFunction or undefined if the axis is not yet initialized
84
+ */
85
+ export declare function useXAxisScale(axisId?: AxisId): ComputedRef<ScaleFunction | undefined>;
86
+ /**
87
+ * Returns the scale function for a Y axis, mapping data values to pixel coordinates.
88
+ *
89
+ * @param axisId - The axis ID (defaults to 0)
90
+ * @returns A reactive ScaleFunction or undefined if the axis is not yet initialized
91
+ */
92
+ export declare function useYAxisScale(axisId?: AxisId): ComputedRef<ScaleFunction | undefined>;
93
+ /**
94
+ * Returns the inverse scale function for an X axis, mapping pixel coordinates back to data values.
95
+ *
96
+ * @param axisId - The axis ID (defaults to 0)
97
+ * @returns A reactive InverseScaleFunction or undefined
98
+ */
99
+ export declare function useXAxisInverseScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
100
+ /**
101
+ * Returns the inverse scale function for a Y axis, mapping pixel coordinates back to data values.
102
+ *
103
+ * @param axisId - The axis ID (defaults to 0)
104
+ * @returns A reactive InverseScaleFunction or undefined
105
+ */
106
+ export declare function useYAxisInverseScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
107
+ /**
108
+ * Returns the inverse scale function for an X axis that snaps to the nearest data point.
109
+ *
110
+ * @param axisId - The axis ID (defaults to 0)
111
+ * @returns A reactive InverseScaleFunction or undefined
112
+ */
113
+ export declare function useXAxisInverseDataSnapScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
114
+ /**
115
+ * Returns the inverse scale function for a Y axis that snaps to the nearest data point.
116
+ *
117
+ * @param axisId - The axis ID (defaults to 0)
118
+ * @returns A reactive InverseScaleFunction or undefined
119
+ */
120
+ export declare function useYAxisInverseDataSnapScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
121
+ /**
122
+ * Returns the inverse scale function for an X axis that snaps to the nearest tick.
123
+ *
124
+ * @param axisId - The axis ID (defaults to 0)
125
+ * @returns A reactive InverseScaleFunction or undefined
126
+ */
127
+ export declare function useXAxisInverseTickSnapScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
128
+ /**
129
+ * Returns the inverse scale function for a Y axis that snaps to the nearest tick.
130
+ *
131
+ * @param axisId - The axis ID (defaults to 0)
132
+ * @returns A reactive InverseScaleFunction or undefined
133
+ */
134
+ export declare function useYAxisInverseTickSnapScale(axisId?: AxisId): Readonly<import('vue').ShallowRef<import('../utils/createCategoricalInverse').InverseScaleFunction>>;
135
+ /**
136
+ * Convenience hook that maps a data point to pixel coordinates using both X and Y axis scales.
137
+ *
138
+ * @param dataPoint - An object with x and y data values
139
+ * @param xAxisId - The X axis ID (defaults to 0)
140
+ * @param yAxisId - The Y axis ID (defaults to 0)
141
+ * @returns A reactive Coordinate ({ x, y }) or undefined if either scale is unavailable
142
+ */
143
+ export declare function useCartesianScale(dataPoint: CartesianDataPoint, xAxisId?: AxisId, yAxisId?: AxisId): ComputedRef<Coordinate | undefined>;
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Tracks whether a component is currently animating.
4
+ *
5
+ * When `isAnimationActive` is `false`, always returns `false` regardless of
6
+ * internal state — this ensures `isAnimationActive={false}` immediately
7
+ * disables all animation-gated rendering (e.g. deferred LabelList).
8
+ *
9
+ * When `isAnimationActive` is `true`, starts as `true` and can be set to
10
+ * `false` via the returned ref (typically on animation end).
11
+ *
12
+ * Re-entering `isAnimationActive=true` resets internal state to `true`.
13
+ */
14
+ export declare function useIsAnimating(isAnimationActive: () => boolean): Ref<boolean>;
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './container';
4
4
  export * from './components';
5
5
  export * from './polar';
6
6
  export * from './shape';
7
+ export * from './hooks/publicHooks';
@@ -79,8 +79,8 @@ export declare const PieVueProps: {
79
79
  type: BooleanConstructor;
80
80
  default: boolean;
81
81
  };
82
- className: {
83
- type: StringConstructor;
82
+ class: {
83
+ type: PropType<import('../../types').VueClassValue>;
84
84
  default: any;
85
85
  };
86
86
  };
@@ -142,14 +142,14 @@ export declare const Radar: import('vue').DefineComponent<import('vue').ExtractP
142
142
  };
143
143
  }>> & Readonly<{}>, {
144
144
  fill: string;
145
- name: string;
145
+ fillOpacity: number;
146
146
  stroke: string;
147
- label: boolean | Record<string, any>;
148
- connectNulls: boolean;
149
147
  strokeDasharray: string;
150
148
  strokeWidth: number;
149
+ name: string;
150
+ label: boolean | Record<string, any>;
151
+ connectNulls: boolean;
151
152
  hide: boolean;
152
- fillOpacity: number;
153
153
  tooltipType: "none";
154
154
  legendType: LegendType;
155
155
  isAnimationActive: boolean;
@@ -33,7 +33,8 @@ export declare const CurveVueProps: {
33
33
  type: StringConstructor;
34
34
  };
35
35
  class: {
36
- type: (StringConstructor | ArrayConstructor)[];
36
+ type: PropType<import('../types').VueClassValue>;
37
+ default: any;
37
38
  };
38
39
  };
39
40
  export type CurvePropsWithOutSVG = VuePropsToType<typeof CurveVueProps>;
@@ -0,0 +1,9 @@
1
+ import { SVGAttributes } from 'vue';
2
+ export interface PolygonPoint {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ export interface PolygonProps {
7
+ points?: PolygonPoint[];
8
+ }
9
+ export declare function Polygon(props: PolygonProps & SVGAttributes): import("vue/jsx-runtime").JSX.Element;
@@ -2,10 +2,6 @@ import { PropType } from 'vue';
2
2
  import { VuePropsToType, WithSVGProps } from '../types';
3
3
  import { RectRadius } from '../types/bar';
4
4
  declare const RectangleVueProps: {
5
- className: {
6
- type: PropType<string>;
7
- default: any;
8
- };
9
5
  x: {
10
6
  type: PropType<number>;
11
7
  default: number;
@@ -37,8 +37,8 @@ declare const SectorVueProps: {
37
37
  type: PropType<boolean>;
38
38
  default: boolean;
39
39
  };
40
- className: {
41
- type: PropType<string>;
40
+ class: {
41
+ type: PropType<import('../types').VueClassValue>;
42
42
  default: any;
43
43
  };
44
44
  };
@@ -1,7 +1,8 @@
1
+ import { VueClassValue } from '../types/common';
1
2
  export type SymbolType = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
2
3
  type SizeType = 'area' | 'diameter';
3
4
  export interface SymbolsProps {
4
- className?: string;
5
+ class?: VueClassValue;
5
6
  type?: SymbolType;
6
7
  cx?: number;
7
8
  cy?: number;
@@ -0,0 +1,30 @@
1
+ import { WithSVGProps } from '../types';
2
+ declare const TrapezoidVueProps: {
3
+ x: {
4
+ type: NumberConstructor;
5
+ default: number;
6
+ };
7
+ y: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ upperWidth: {
12
+ type: NumberConstructor;
13
+ default: number;
14
+ };
15
+ lowerWidth: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ height: {
20
+ type: NumberConstructor;
21
+ default: number;
22
+ };
23
+ class: {
24
+ type: import('vue').PropType<import('../types').VueClassValue>;
25
+ default: any;
26
+ };
27
+ };
28
+ export type TrapezoidComponentProps = WithSVGProps<typeof TrapezoidVueProps>;
29
+ export declare const Trapezoid: import('vue').DefineComponent<TrapezoidComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TrapezoidComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
30
+ export {};
@@ -3,6 +3,8 @@ export * from './Cross';
3
3
  export { Curve, CurveVueProps, getPath } from './Curve';
4
4
  export type { CurveType, CurvePropsWithOutSVG, CurveProps } from './Curve';
5
5
  export * from './Dot';
6
+ export * from './Polygon';
6
7
  export * from './Rectangle';
7
8
  export * from './Symbols';
8
9
  export * from './Sector';
10
+ export * from './Trapezoid';
@@ -1,4 +1,5 @@
1
- import { AnimationEasing } from '../types/bar';
1
+ import { AnimationOptions } from 'motion-v';
2
+ import { VueClassValue } from '../types/common';
2
3
  export interface Point {
3
4
  readonly x: number;
4
5
  readonly y: number;
@@ -6,7 +7,7 @@ export interface Point {
6
7
  export type MinPointSize = number | ((value: number, index: number) => number);
7
8
  export type NormalizedStackId = string;
8
9
  export interface TrapezoidProps {
9
- className?: string;
10
+ class?: VueClassValue;
10
11
  x?: number;
11
12
  y?: number;
12
13
  width?: number;
@@ -14,7 +15,5 @@ export interface TrapezoidProps {
14
15
  lowerWidth?: number;
15
16
  height?: number;
16
17
  isUpdateAnimationActive?: boolean;
17
- animationBegin?: number;
18
- animationDuration?: number;
19
- animationEasing?: AnimationEasing;
18
+ transition?: AnimationOptions;
20
19
  }
@@ -18,7 +18,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
18
18
  default: any;
19
19
  };
20
20
  class: {
21
- type: StringConstructor;
21
+ type: PropType<import('../types').VueClassValue>;
22
22
  default: any;
23
23
  };
24
24
  maxBarSize: {
@@ -55,7 +55,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
55
55
  default: any;
56
56
  };
57
57
  class: {
58
- type: StringConstructor;
58
+ type: PropType<import('../types').VueClassValue>;
59
59
  default: any;
60
60
  };
61
61
  maxBarSize: {
@@ -79,7 +79,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
79
79
  barCategoryGap: string | number;
80
80
  barGap: number;
81
81
  barSize: string | number;
82
- class: string;
82
+ class: import('../types').VueClassValue;
83
83
  maxBarSize: number;
84
84
  stackOffset: StackOffsetType;
85
85
  syncId: string | number;
@@ -23,7 +23,7 @@ export type ErrorBarsSettings = {
23
23
  dataKey: DataKey<any>;
24
24
  };
25
25
  export type CartesianGraphicalItemType = 'area' | 'bar' | 'line' | 'scatter';
26
- export type PolarGraphicalItemType = 'pie' | 'radar' | 'radialBar';
26
+ export type PolarGraphicalItemType = 'pie' | 'radar' | 'radialBar' | 'funnel';
27
27
  export interface GraphicalItemSettings extends MaybeStackedGraphicalItem {
28
28
  data: ChartData;
29
29
  dataKey: DataKey<any> | undefined;
@@ -1,4 +1,4 @@
1
- import { StackOffsetType, SyncMethod } from '../types';
1
+ import { StackOffsetType, SyncMethod, VueClassValue } from '../types';
2
2
  /**
3
3
  * These are chart options that users can choose - which means they can also
4
4
  * choose to change them which should trigger a re-render.
@@ -12,7 +12,7 @@ export type UpdatableChartOptions = {
12
12
  * Useful for debugging which chart is which when synchronising.
13
13
  * The className is also passed to the root element of the chart but that's done in the JSX, not through Redux.
14
14
  */
15
- class: string | undefined;
15
+ class: VueClassValue | undefined;
16
16
  maxBarSize: number | undefined;
17
17
  stackOffset: StackOffsetType;
18
18
  /**
@@ -10,6 +10,7 @@ import { AxisDomain, AxisType, NumberDomain } from '../../types/axis';
10
10
  import { CategoricalDomain, Coordinate, DataKey, LayoutType, Size, StackOffsetType, TickItem } from '../../types';
11
11
  import { StackId } from '../../types/tick';
12
12
  import { RechartsScale } from '../../types/scale';
13
+ import { InverseScaleFunction } from '../../utils/createCategoricalInverse';
13
14
  import { AxisPropsForCartesianGridTicksGeneration } from '../../cartesian/cartesian-grid/type';
14
15
  /**
15
16
  * angle, radius, X, Y, and Z axes all have domain and range and scale and associated settings
@@ -876,6 +877,9 @@ export declare const selectAxisScale: ((state: {
876
877
  argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
877
878
  memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
878
879
  };
880
+ export declare const selectSortedDataPoints: (state: RechartsRootState, axisType: XorYorZType, axisId: AxisId, isPanorama: boolean) => ReadonlyArray<unknown> | undefined;
881
+ export declare const selectAxisInverseScale: (state: RechartsRootState, axisType: XorYorZType, axisId: AxisId, isPanorama: boolean) => InverseScaleFunction | undefined;
882
+ export declare const selectAxisInverseDataSnapScale: (state: RechartsRootState, axisType: XorYorZType, axisId: AxisId, isPanorama: boolean) => InverseScaleFunction | undefined;
879
883
  export declare const selectErrorBarsSettings: ((state: {
880
884
  brush: import('../brushSlice').BrushSettings;
881
885
  cartesianAxis: {
@@ -1702,6 +1706,7 @@ export declare const selectTicksOfAxis: ((state: {
1702
1706
  argsMemoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
1703
1707
  memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
1704
1708
  };
1709
+ export declare const selectAxisInverseTickSnapScale: (state: RechartsRootState, axisType: XorYorZType, axisId: AxisId, isPanorama: boolean) => InverseScaleFunction | undefined;
1705
1710
  export declare function combineGraphicalItemTicks(layout: LayoutType, axis: AxisWithTicksSettings, scale: RechartsScale | undefined, axisRange: AxisRange | undefined, duplicateDomain: ReadonlyArray<unknown> | undefined, categoricalDomain: ReadonlyArray<unknown> | undefined, axisType: XorYType): TickItem[] | null;
1706
1711
  export declare const selectTicksOfGraphicalItem: (state: RechartsRootState, axisType: XorYType, axisId: AxisId, isPanorama: boolean) => TickItem[] | null;
1707
1712
  export type BaseAxisWithScale = BaseCartesianAxis & {
@@ -1,4 +1,4 @@
1
- import { DataKey } from './common';
1
+ import { DataKey, VueClassValue } from './common';
2
2
  import { RechartsScale, ScaleType } from './scale';
3
3
  import { TickFormatter, TicksSettings } from './tick';
4
4
  export type AxisId = string | number;
@@ -113,7 +113,7 @@ export interface XAxisProps {
113
113
  angle?: number;
114
114
  minTickGap?: number;
115
115
  label?: string | number | any;
116
- className?: string;
116
+ class?: VueClassValue;
117
117
  }
118
118
  /**
119
119
  * NumberDomain is an evaluated {@link AxisDomain}.
@@ -1,4 +1,4 @@
1
- import { Coordinate } from './common';
1
+ import { Coordinate, VueClassValue } from './common';
2
2
  import { CartesianViewBox } from '../cartesian/type';
3
3
  export type BarPositionPosition = {
4
4
  /**
@@ -16,9 +16,8 @@ export type BarPositionPosition = {
16
16
  size: number | undefined | typeof NaN;
17
17
  };
18
18
  export type RectRadius = [number, number, number, number];
19
- export type AnimationEasing = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
20
19
  interface RectangleProps {
21
- className?: string;
20
+ class?: VueClassValue;
22
21
  x?: number;
23
22
  y?: number;
24
23
  width?: number;
@@ -26,9 +25,6 @@ interface RectangleProps {
26
25
  radius?: number | RectRadius;
27
26
  isAnimationActive?: boolean;
28
27
  isUpdateAnimationActive?: boolean;
29
- animationBegin?: number;
30
- animationDuration?: number;
31
- animationEasing?: AnimationEasing;
32
28
  }
33
29
  export interface BarRectangleItem extends RectangleProps {
34
30
  value?: number | [number, number];