vccs 0.0.1 → 0.1.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 (459) hide show
  1. package/LICENSE +21 -0
  2. package/dist/animation/Animate.d.ts +72 -0
  3. package/dist/cartesian/GraphicalItemClipPath.d.ts +31 -0
  4. package/dist/cartesian/area/ActivePoints.d.ts +77 -0
  5. package/dist/cartesian/area/Area.d.ts +17 -0
  6. package/dist/cartesian/area/ClipRect.d.ts +1 -0
  7. package/dist/cartesian/area/RenderArea.d.ts +16 -0
  8. package/dist/cartesian/area/__stories__/config.d.ts +31 -0
  9. package/dist/cartesian/area/hooks/useArea.d.ts +27 -0
  10. package/dist/cartesian/area/index.d.ts +2 -0
  11. package/dist/cartesian/area/type.d.ts +173 -0
  12. package/dist/cartesian/area/utils.d.ts +19 -0
  13. package/dist/cartesian/axis/XAxis.d.ts +189 -0
  14. package/dist/cartesian/axis/YAxis.d.ts +192 -0
  15. package/dist/cartesian/axis/index.d.ts +2 -0
  16. package/dist/cartesian/axis/type.d.ts +57 -0
  17. package/dist/cartesian/bar/Bar.d.ts +2 -0
  18. package/dist/cartesian/bar/components/BarBackground.d.ts +1 -0
  19. package/dist/cartesian/bar/components/BarRectangles.d.ts +1 -0
  20. package/dist/cartesian/bar/hooks/useBar.d.ts +23 -0
  21. package/dist/cartesian/bar/index.d.ts +1 -0
  22. package/dist/cartesian/bar/type.d.ts +166 -0
  23. package/dist/cartesian/bar/utils.d.ts +31 -0
  24. package/dist/cartesian/brush/Brush.d.ts +2 -0
  25. package/dist/cartesian/brush/components/Background.d.ts +15 -0
  26. package/dist/cartesian/brush/components/BrushText.d.ts +27 -0
  27. package/dist/cartesian/brush/components/Panorama.d.ts +65 -0
  28. package/dist/cartesian/brush/components/Slide.d.ts +20 -0
  29. package/dist/cartesian/brush/components/Traveller.d.ts +13 -0
  30. package/dist/cartesian/brush/components/TravellerLayer.d.ts +22 -0
  31. package/dist/cartesian/brush/hooks/useBrushHandlers.d.ts +25 -0
  32. package/dist/cartesian/brush/hooks/useBrushSetting.d.ts +6 -0
  33. package/dist/cartesian/brush/hooks/useBrushState.d.ts +29 -0
  34. package/dist/cartesian/brush/index.d.ts +2 -0
  35. package/dist/cartesian/brush/type.d.ts +103 -0
  36. package/dist/cartesian/brush/utils.d.ts +15 -0
  37. package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +209 -0
  38. package/dist/cartesian/cartesian-axis/const.d.ts +24 -0
  39. package/dist/cartesian/cartesian-axis/index.d.ts +1 -0
  40. package/dist/cartesian/cartesian-axis/use-axis-line.d.ts +7 -0
  41. package/dist/cartesian/cartesian-grid/Background.d.ts +18 -0
  42. package/dist/cartesian/cartesian-grid/CartesianGrid.d.ts +75 -0
  43. package/dist/cartesian/cartesian-grid/HorizontalGridLines.d.ts +37 -0
  44. package/dist/cartesian/cartesian-grid/HorizontalStripes.d.ts +20 -0
  45. package/dist/cartesian/cartesian-grid/VerticalGridLines.d.ts +26 -0
  46. package/dist/cartesian/cartesian-grid/VerticalStripes.d.ts +20 -0
  47. package/dist/cartesian/cartesian-grid/const.d.ts +6 -0
  48. package/dist/cartesian/cartesian-grid/index.d.ts +1 -0
  49. package/dist/cartesian/cartesian-grid/type.d.ts +145 -0
  50. package/dist/cartesian/cartesian-grid/utils.d.ts +5 -0
  51. package/dist/cartesian/error-bar/ErrorBar.d.ts +68 -0
  52. package/dist/cartesian/error-bar/ErrorBarContext.d.ts +27 -0
  53. package/dist/cartesian/error-bar/index.d.ts +2 -0
  54. package/dist/cartesian/funnel/index.d.ts +0 -0
  55. package/dist/cartesian/funnel/type.d.ts +37 -0
  56. package/dist/cartesian/funnel/utils.d.ts +12 -0
  57. package/dist/cartesian/index.d.ts +11 -0
  58. package/dist/cartesian/line/ActivePoints.d.ts +77 -0
  59. package/dist/cartesian/line/Line.d.ts +87 -0
  60. package/dist/cartesian/line/StaticLine.d.ts +16 -0
  61. package/dist/cartesian/line/hooks/useLine.d.ts +28 -0
  62. package/dist/cartesian/line/index.d.ts +3 -0
  63. package/dist/cartesian/line/type.d.ts +180 -0
  64. package/dist/cartesian/line/utils.d.ts +13 -0
  65. package/dist/cartesian/reference-area/ReferenceArea.d.ts +191 -0
  66. package/dist/cartesian/reference-area/index.d.ts +1 -0
  67. package/dist/cartesian/reference-line/ReferenceLine.d.ts +139 -0
  68. package/dist/cartesian/reference-line/index.d.ts +1 -0
  69. package/dist/cartesian/scatter/Scatter.d.ts +165 -0
  70. package/dist/cartesian/scatter/hooks/useScatter.d.ts +18 -0
  71. package/dist/cartesian/scatter/index.d.ts +1 -0
  72. package/dist/cartesian/type.d.ts +21 -0
  73. package/dist/cartesian/useNeedsClip.d.ts +6 -0
  74. package/dist/cartesian/utils/get-ticks.d.ts +16 -0
  75. package/dist/cartesian/z-axis/ZAxis.d.ts +81 -0
  76. package/dist/cartesian/z-axis/index.d.ts +1 -0
  77. package/dist/chart/AreaChart.d.ts +1 -0
  78. package/dist/chart/BarChart.d.ts +1 -0
  79. package/dist/chart/ComposedChart.d.ts +1 -0
  80. package/dist/chart/LegendPortalContext.d.ts +3 -0
  81. package/dist/chart/LineChart.d.ts +1 -0
  82. package/dist/chart/PieChart.d.ts +1 -0
  83. package/dist/chart/RadarChart.d.ts +1 -0
  84. package/dist/chart/RadialBarChart.d.ts +1 -0
  85. package/dist/chart/RechartsWrapper.d.ts +99 -0
  86. package/dist/chart/ScatterChart.d.ts +1 -0
  87. package/dist/chart/Surface.d.ts +40 -0
  88. package/dist/chart/TooltipPortalContext.d.ts +2 -0
  89. package/dist/chart/const.d.ts +6 -0
  90. package/dist/chart/generateCategoricalChart.d.ts +118 -0
  91. package/dist/chart/index.d.ts +8 -0
  92. package/dist/chart/provideClipPathId.d.ts +12 -0
  93. package/dist/components/Cell.d.ts +18 -0
  94. package/dist/components/DefaultLegendContent.d.ts +18 -0
  95. package/dist/components/Text.d.ts +149 -0
  96. package/dist/components/Tooltip.d.ts +250 -0
  97. package/dist/components/index.d.ts +4 -0
  98. package/dist/components/label/Label.d.ts +81 -0
  99. package/dist/components/label/LabelList.d.ts +63 -0
  100. package/dist/components/label/index.d.ts +2 -0
  101. package/dist/components/label/types.d.ts +88 -0
  102. package/dist/components/label/utils.d.ts +24 -0
  103. package/dist/components/legend/Legend.d.ts +4 -0
  104. package/dist/components/legend/LegendSymbol.d.ts +27 -0
  105. package/dist/components/legend/hooks/useLegend.d.ts +19 -0
  106. package/dist/components/legend/hooks/useLegendContent.d.ts +36 -0
  107. package/dist/components/legend/index.d.ts +2 -0
  108. package/dist/components/legend/type.d.ts +54 -0
  109. package/dist/components/legend/utils.d.ts +18 -0
  110. package/dist/components/types.d.ts +9 -0
  111. package/dist/components/utils.d.ts +4 -0
  112. package/dist/container/ClipPath.d.ts +12 -0
  113. package/dist/container/Layer.d.ts +2 -0
  114. package/dist/container/ResponsiveContainer.d.ts +50 -0
  115. package/dist/container/RootSurface.d.ts +17 -0
  116. package/dist/container/Surface.d.ts +25 -0
  117. package/dist/container/index.d.ts +1 -0
  118. package/dist/container/useSizeContext.d.ts +11 -0
  119. package/dist/context/ChartDataContextProvider.d.ts +17 -0
  120. package/dist/context/PanoramaContextProvider.d.ts +22 -0
  121. package/dist/context/accessibilityContext.d.ts +1 -0
  122. package/dist/context/cartesianLabelListContext.d.ts +3 -0
  123. package/dist/context/chartLayoutContext.d.ts +8 -0
  124. package/dist/context/cursorLayerContext.d.ts +2 -0
  125. package/dist/context/graphicalLayerContext.d.ts +2 -0
  126. package/dist/context/labelLayerContext.d.ts +2 -0
  127. package/dist/context/polarLabelViewBoxContext.d.ts +4 -0
  128. package/dist/context/useTooltipAxis.d.ts +2 -0
  129. package/dist/es/animation/Animate.mjs +63 -0
  130. package/dist/es/cartesian/GraphicalItemClipPath.mjs +36 -0
  131. package/dist/es/cartesian/area/ActivePoints.mjs +74 -0
  132. package/dist/es/cartesian/area/Area.mjs +41 -0
  133. package/dist/es/cartesian/area/ClipRect.mjs +104 -0
  134. package/dist/es/cartesian/area/RenderArea.mjs +151 -0
  135. package/dist/es/cartesian/area/hooks/useArea.mjs +57 -0
  136. package/dist/es/cartesian/area/type.mjs +136 -0
  137. package/dist/es/cartesian/area/utils.mjs +59 -0
  138. package/dist/es/cartesian/axis/XAxis.mjs +189 -0
  139. package/dist/es/cartesian/axis/YAxis.mjs +181 -0
  140. package/dist/es/cartesian/bar/Bar.mjs +89 -0
  141. package/dist/es/cartesian/bar/components/BarBackground.mjs +29 -0
  142. package/dist/es/cartesian/bar/components/BarRectangles.mjs +106 -0
  143. package/dist/es/cartesian/bar/hooks/useBar.mjs +41 -0
  144. package/dist/es/cartesian/bar/type.mjs +131 -0
  145. package/dist/es/cartesian/bar/utils.mjs +84 -0
  146. package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +246 -0
  147. package/dist/es/cartesian/cartesian-grid/Background.mjs +30 -0
  148. package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +155 -0
  149. package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +49 -0
  150. package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +43 -0
  151. package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +44 -0
  152. package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +43 -0
  153. package/dist/es/cartesian/cartesian-grid/const.mjs +29 -0
  154. package/dist/es/cartesian/cartesian-grid/utils.mjs +17 -0
  155. package/dist/es/cartesian/error-bar/ErrorBar.mjs +115 -0
  156. package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +19 -0
  157. package/dist/es/cartesian/line/ActivePoints.mjs +75 -0
  158. package/dist/es/cartesian/line/Line.mjs +46 -0
  159. package/dist/es/cartesian/line/StaticLine.mjs +148 -0
  160. package/dist/es/cartesian/line/hooks/useLine.mjs +53 -0
  161. package/dist/es/cartesian/line/type.mjs +112 -0
  162. package/dist/es/cartesian/line/utils.mjs +33 -0
  163. package/dist/es/cartesian/reference-area/ReferenceArea.mjs +146 -0
  164. package/dist/es/cartesian/reference-line/ReferenceLine.mjs +143 -0
  165. package/dist/es/cartesian/scatter/Scatter.mjs +252 -0
  166. package/dist/es/cartesian/scatter/hooks/useScatter.mjs +19 -0
  167. package/dist/es/cartesian/useNeedsClip.mjs +14 -0
  168. package/dist/es/cartesian/utils/get-ticks.mjs +83 -0
  169. package/dist/es/cartesian/z-axis/ZAxis.mjs +70 -0
  170. package/dist/es/chart/AreaChart.mjs +9 -0
  171. package/dist/es/chart/BarChart.mjs +10 -0
  172. package/dist/es/chart/ComposedChart.mjs +10 -0
  173. package/dist/es/chart/LegendPortalContext.mjs +5 -0
  174. package/dist/es/chart/LineChart.mjs +10 -0
  175. package/dist/es/chart/PieChart.mjs +16 -0
  176. package/dist/es/chart/RadarChart.mjs +16 -0
  177. package/dist/es/chart/RadialBarChart.mjs +16 -0
  178. package/dist/es/chart/RechartsWrapper.mjs +137 -0
  179. package/dist/es/chart/ScatterChart.mjs +10 -0
  180. package/dist/es/chart/Surface.mjs +5 -0
  181. package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +66 -0
  182. package/dist/es/chart/TooltipPortalContext.mjs +5 -0
  183. package/dist/es/chart/const.mjs +7 -0
  184. package/dist/es/chart/generateCategoricalChart.mjs +166 -0
  185. package/dist/es/chart/provideClipPathId.mjs +10 -0
  186. package/dist/es/components/Cell.mjs +11 -0
  187. package/dist/es/components/Text.mjs +5 -0
  188. package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +154 -0
  189. package/dist/es/components/Tooltip.mjs +388 -0
  190. package/dist/es/components/label/Label.mjs +36 -0
  191. package/dist/es/components/label/LabelList.mjs +49 -0
  192. package/dist/es/components/label/types.mjs +35 -0
  193. package/dist/es/components/label/utils.mjs +233 -0
  194. package/dist/es/components/legend/Legend.mjs +82 -0
  195. package/dist/es/components/legend/LegendSymbol.mjs +60 -0
  196. package/dist/es/components/legend/hooks/useLegend.mjs +52 -0
  197. package/dist/es/components/legend/hooks/useLegendContent.mjs +47 -0
  198. package/dist/es/components/legend/type.mjs +41 -0
  199. package/dist/es/components/legend/utils.mjs +17 -0
  200. package/dist/es/components/utils.mjs +31 -0
  201. package/dist/es/container/ClipPath.mjs +25 -0
  202. package/dist/es/container/Layer.mjs +12 -0
  203. package/dist/es/container/ResponsiveContainer.mjs +5 -0
  204. package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +112 -0
  205. package/dist/es/container/Surface.mjs +58 -0
  206. package/dist/es/container/useSizeContext.mjs +5 -0
  207. package/dist/es/context/ChartDataContextProvider.mjs +21 -0
  208. package/dist/es/context/PanoramaContextProvider.mjs +19 -0
  209. package/dist/es/context/accessibilityContext.mjs +5 -0
  210. package/dist/es/context/cartesianLabelListContext.mjs +5 -0
  211. package/dist/es/context/chartLayoutContext.mjs +46 -0
  212. package/dist/es/context/cursorLayerContext.mjs +5 -0
  213. package/dist/es/context/graphicalLayerContext.mjs +5 -0
  214. package/dist/es/context/labelLayerContext.mjs +5 -0
  215. package/dist/es/context/polarLabelViewBoxContext.mjs +8 -0
  216. package/dist/es/context/useTooltipAxis.mjs +15 -0
  217. package/dist/es/events/useChartSynchronisation.mjs +88 -0
  218. package/dist/es/hooks/useSetupGraphicalItem.mjs +57 -0
  219. package/dist/es/index.mjs +42 -0
  220. package/dist/es/polar/pie/Pie.mjs +145 -0
  221. package/dist/es/polar/pie/type.mjs +97 -0
  222. package/dist/es/polar/radar/PolarAngleAxis.mjs +161 -0
  223. package/dist/es/polar/radar/PolarGrid.mjs +102 -0
  224. package/dist/es/polar/radar/PolarRadiusAxis.mjs +137 -0
  225. package/dist/es/polar/radar/Radar.mjs +248 -0
  226. package/dist/es/polar/radial-bar/RadialBar.mjs +176 -0
  227. package/dist/es/polar/radial-bar/type.mjs +97 -0
  228. package/dist/es/shape/Cross.mjs +15 -0
  229. package/dist/es/shape/Curve.mjs +60 -0
  230. package/dist/es/shape/Dot.mjs +23 -0
  231. package/dist/es/shape/Rectangle.mjs +68 -0
  232. package/dist/es/shape/Sector.mjs +128 -0
  233. package/dist/es/shape/Symbols.mjs +41 -0
  234. package/dist/es/state/ReportChartProps.mjs +63 -0
  235. package/dist/es/state/ReportMainChartProps.mjs +41 -0
  236. package/dist/es/state/ReportPolarOptions.mjs +55 -0
  237. package/dist/es/state/SetGraphicalItem.mjs +34 -0
  238. package/dist/es/state/SetLegendPayload.mjs +16 -0
  239. package/dist/es/state/SetTooltipEntrySettings.mjs +17 -0
  240. package/dist/es/state/brushSlice.mjs +22 -0
  241. package/dist/es/state/cartesianAxisSlice.mjs +33 -0
  242. package/dist/es/state/chartDataSlice.mjs +28 -0
  243. package/dist/es/state/externalEventsMiddleware.mjs +20 -0
  244. package/dist/es/state/graphicalItemsSlice.mjs +43 -0
  245. package/dist/es/state/hooks.mjs +5 -0
  246. package/dist/es/state/keyboardEventsMiddleware.mjs +55 -0
  247. package/dist/es/state/layoutSlice.mjs +33 -0
  248. package/dist/es/state/legendSlice.mjs +35 -0
  249. package/dist/es/state/mouseEventsMiddleware.mjs +34 -0
  250. package/dist/es/state/optionsSlice.mjs +22 -0
  251. package/dist/es/state/polarAxisSlice.mjs +26 -0
  252. package/dist/es/state/polarOptionsSlice.mjs +11 -0
  253. package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +6 -0
  254. package/dist/es/state/referenceElementsSlice.mjs +34 -0
  255. package/dist/es/state/rootPropsSlice.mjs +21 -0
  256. package/dist/es/state/selectors/areaSelectors.mjs +67 -0
  257. package/dist/es/state/selectors/axisSelectors.mjs +693 -0
  258. package/dist/es/state/selectors/barSelectors.mjs +178 -0
  259. package/dist/es/state/selectors/brushSelectors.mjs +17 -0
  260. package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +8 -0
  261. package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +34 -0
  262. package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +6 -0
  263. package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +19 -0
  264. package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +32 -0
  265. package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +9 -0
  266. package/dist/es/state/selectors/common.mjs +4 -0
  267. package/dist/es/state/selectors/containerSelectors.mjs +4 -0
  268. package/dist/es/state/selectors/dataSelectors.mjs +16 -0
  269. package/dist/es/state/selectors/legendSelectors.mjs +9 -0
  270. package/dist/es/state/selectors/lineSelectors.mjs +57 -0
  271. package/dist/es/state/selectors/pickAxisId.mjs +4 -0
  272. package/dist/es/state/selectors/pickAxisType.mjs +4 -0
  273. package/dist/es/state/selectors/pieSelectors.mjs +97 -0
  274. package/dist/es/state/selectors/polarAxisSelectors.mjs +148 -0
  275. package/dist/es/state/selectors/polarGridSelectors.mjs +17 -0
  276. package/dist/es/state/selectors/polarScaleSelectors.mjs +52 -0
  277. package/dist/es/state/selectors/polarSelectors.mjs +64 -0
  278. package/dist/es/state/selectors/radarSelectors.mjs +113 -0
  279. package/dist/es/state/selectors/radialBarSelectors.mjs +212 -0
  280. package/dist/es/state/selectors/rootPropsSelectors.mjs +8 -0
  281. package/dist/es/state/selectors/scatterSelectors.mjs +118 -0
  282. package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +18 -0
  283. package/dist/es/state/selectors/selectAllAxes.mjs +5 -0
  284. package/dist/es/state/selectors/selectChartOffset.mjs +60 -0
  285. package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -0
  286. package/dist/es/state/selectors/selectTooltipEventType.mjs +21 -0
  287. package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +6 -0
  288. package/dist/es/state/selectors/selectTooltipSettings.mjs +4 -0
  289. package/dist/es/state/selectors/selectTooltipState.mjs +4 -0
  290. package/dist/es/state/selectors/selectors.mjs +85 -0
  291. package/dist/es/state/selectors/tooltipSelectors.mjs +220 -0
  292. package/dist/es/state/selectors/touchSelectors.mjs +16 -0
  293. package/dist/es/state/store.mjs +55 -0
  294. package/dist/es/state/tooltipSlice.mjs +75 -0
  295. package/dist/es/state/touchEventsMiddleware.mjs +38 -0
  296. package/dist/es/state/utils/useReportScale.mjs +16 -0
  297. package/dist/es/synchronisation/syncSelectors.mjs +6 -0
  298. package/dist/es/synchronisation/useChartSynchronisation.mjs +24 -0
  299. package/dist/es/types/event.mjs +4 -0
  300. package/dist/es/utils/ReduceCSSCalc.mjs +82 -0
  301. package/dist/es/utils/VueUtils.mjs +18 -0
  302. package/dist/es/utils/attrs.mjs +52 -0
  303. package/dist/es/utils/cartesian.mjs +22 -0
  304. package/dist/es/utils/chart.mjs +265 -0
  305. package/dist/es/utils/const.mjs +4 -0
  306. package/dist/es/utils/createContext.mjs +12 -0
  307. package/dist/es/utils/data-utils.mjs +12 -0
  308. package/dist/es/utils/data.mjs +27 -0
  309. package/dist/es/utils/events.mjs +5 -0
  310. package/dist/es/utils/getLinearRegression.mjs +17 -0
  311. package/dist/es/utils/grid.mjs +8 -0
  312. package/dist/es/utils/isDomainSpecifiedByUser.mjs +65 -0
  313. package/dist/es/utils/legend.mjs +18 -0
  314. package/dist/es/utils/log.mjs +11 -0
  315. package/dist/es/utils/payload/getUniqPayload.mjs +7 -0
  316. package/dist/es/utils/polar.mjs +52 -0
  317. package/dist/es/utils/props.mjs +14 -0
  318. package/dist/es/utils/resolveDefaultProps.mjs +7 -0
  319. package/dist/es/utils/scale/getNiceTickValues.mjs +59 -0
  320. package/dist/es/utils/scale/utils/arithmetic.mjs +24 -0
  321. package/dist/es/utils/scale/utils/utils.mjs +34 -0
  322. package/dist/es/utils/style.mjs +19 -0
  323. package/dist/es/utils/tick.mjs +31 -0
  324. package/dist/es/utils/tooltip/translate.mjs +59 -0
  325. package/dist/es/utils/validate.mjs +31 -0
  326. package/dist/events/useChartSynchronisation.d.ts +8 -0
  327. package/dist/hooks/useSetupGraphicalItem.d.ts +7 -0
  328. package/dist/index.d.ts +6 -0
  329. package/dist/polar/index.d.ts +3 -0
  330. package/dist/polar/pie/Pie.d.ts +2 -0
  331. package/dist/polar/pie/index.d.ts +2 -0
  332. package/dist/polar/pie/type.d.ts +88 -0
  333. package/dist/polar/radar/PolarAngleAxis.d.ts +145 -0
  334. package/dist/polar/radar/PolarGrid.d.ts +77 -0
  335. package/dist/polar/radar/PolarRadiusAxis.d.ts +125 -0
  336. package/dist/polar/radar/Radar.d.ts +160 -0
  337. package/dist/polar/radar/index.d.ts +4 -0
  338. package/dist/polar/radial-bar/RadialBar.d.ts +2 -0
  339. package/dist/polar/radial-bar/index.d.ts +2 -0
  340. package/dist/polar/radial-bar/type.d.ts +96 -0
  341. package/dist/shape/Cross.d.ts +10 -0
  342. package/dist/shape/Curve.d.ts +42 -0
  343. package/dist/shape/Dot.d.ts +18 -0
  344. package/dist/shape/Rectangle.d.ts +33 -0
  345. package/dist/shape/Sector.d.ts +48 -0
  346. package/dist/shape/Symbols.d.ts +15 -0
  347. package/dist/shape/index.d.ts +8 -0
  348. package/dist/shape/types.d.ts +20 -0
  349. package/dist/state/ReportBar.d.ts +1 -0
  350. package/dist/state/ReportChartProps.d.ts +88 -0
  351. package/dist/state/ReportMainChartProps.d.ts +37 -0
  352. package/dist/state/ReportPolarOptions.d.ts +59 -0
  353. package/dist/state/SetGraphicalItem.d.ts +9 -0
  354. package/dist/state/SetLegendPayload.d.ts +3 -0
  355. package/dist/state/SetTooltipEntrySettings.d.ts +8 -0
  356. package/dist/state/brushSlice.d.ts +18 -0
  357. package/dist/state/cartesianAxisSlice.d.ts +88 -0
  358. package/dist/state/chartDataSlice.d.ts +44 -0
  359. package/dist/state/externalEventsMiddleware.d.ts +17 -0
  360. package/dist/state/graphicalItemsSlice.d.ts +108 -0
  361. package/dist/state/hooks.d.ts +54 -0
  362. package/dist/state/keyboardEventsMiddleware.d.ts +3 -0
  363. package/dist/state/layoutSlice.d.ts +15 -0
  364. package/dist/state/legendSlice.d.ts +26 -0
  365. package/dist/state/mouseEventsMiddleware.d.ts +5 -0
  366. package/dist/state/optionsSlice.d.ts +27 -0
  367. package/dist/state/polarAxisSlice.d.ts +10 -0
  368. package/dist/state/polarOptionsSlice.d.ts +10 -0
  369. package/dist/state/reduxDevtoolsJsonStringifyReplacer.d.ts +1 -0
  370. package/dist/state/referenceElementsSlice.d.ts +40 -0
  371. package/dist/state/rootPropsSlice.d.ts +26 -0
  372. package/dist/state/selectors/areaSelectors.d.ts +24 -0
  373. package/dist/state/selectors/axisSelectors.d.ts +1828 -0
  374. package/dist/state/selectors/barSelectors.d.ts +944 -0
  375. package/dist/state/selectors/brushSelectors.d.ts +10 -0
  376. package/dist/state/selectors/combiners/combineActiveLabel.d.ts +3 -0
  377. package/dist/state/selectors/combiners/combineActiveTooltipIndex.d.ts +5 -0
  378. package/dist/state/selectors/combiners/combineAxisRangeWithReverse.d.ts +3 -0
  379. package/dist/state/selectors/combiners/combineCoordinateForDefaultIndex.d.ts +3 -0
  380. package/dist/state/selectors/combiners/combineTooltipInteractionState.d.ts +3 -0
  381. package/dist/state/selectors/combiners/combineTooltipPayloadConfigurations.d.ts +3 -0
  382. package/dist/state/selectors/common.d.ts +2 -0
  383. package/dist/state/selectors/containerSelectors.d.ts +6 -0
  384. package/dist/state/selectors/dataSelectors.d.ts +23 -0
  385. package/dist/state/selectors/funnelSelectors.d.ts +69 -0
  386. package/dist/state/selectors/legendSelectors.d.ts +7 -0
  387. package/dist/state/selectors/lineSelectors.d.ts +123 -0
  388. package/dist/state/selectors/pickAxisId.d.ts +3 -0
  389. package/dist/state/selectors/pickAxisType.d.ts +2 -0
  390. package/dist/state/selectors/pieSelectors.d.ts +55 -0
  391. package/dist/state/selectors/polarAxisSelectors.d.ts +49 -0
  392. package/dist/state/selectors/polarGridSelectors.d.ts +118 -0
  393. package/dist/state/selectors/polarScaleSelectors.d.ts +9 -0
  394. package/dist/state/selectors/polarSelectors.d.ts +70 -0
  395. package/dist/state/selectors/radarSelectors.d.ts +76 -0
  396. package/dist/state/selectors/radialBarSelectors.d.ts +61 -0
  397. package/dist/state/selectors/rootPropsSelectors.d.ts +11 -0
  398. package/dist/state/selectors/scatterSelectors.d.ts +21 -0
  399. package/dist/state/selectors/selectActivePropsFromChartPointer.d.ts +382 -0
  400. package/dist/state/selectors/selectAllAxes.d.ts +4 -0
  401. package/dist/state/selectors/selectChartOffset.d.ts +116 -0
  402. package/dist/state/selectors/selectChartOffsetInternal.d.ts +9 -0
  403. package/dist/state/selectors/selectTooltipEventType.d.ts +8 -0
  404. package/dist/state/selectors/selectTooltipPayloadSearcher.d.ts +3 -0
  405. package/dist/state/selectors/selectTooltipSettings.d.ts +3 -0
  406. package/dist/state/selectors/selectTooltipState.d.ts +3 -0
  407. package/dist/state/selectors/selectors.d.ts +184 -0
  408. package/dist/state/selectors/tooltipSelectors.d.ts +581 -0
  409. package/dist/state/selectors/touchSelectors.d.ts +4 -0
  410. package/dist/state/store.d.ts +74 -0
  411. package/dist/state/tooltipSlice.d.ts +204 -0
  412. package/dist/state/touchEventsMiddleware.d.ts +2 -0
  413. package/dist/state/utils/useReportScale.d.ts +1 -0
  414. package/dist/synchronisation/syncSelectors.d.ts +3 -0
  415. package/dist/synchronisation/useChartSynchronisation.d.ts +11 -0
  416. package/dist/types/area.d.ts +8 -0
  417. package/dist/types/axis.d.ts +127 -0
  418. package/dist/types/bar.d.ts +51 -0
  419. package/dist/types/categorical.d.ts +36 -0
  420. package/dist/types/common.d.ts +129 -0
  421. package/dist/types/event.d.ts +16 -0
  422. package/dist/types/index.d.ts +4 -0
  423. package/dist/types/legend.d.ts +1 -0
  424. package/dist/types/offset.d.ts +8 -0
  425. package/dist/types/radar.d.ts +28 -0
  426. package/dist/types/scale.d.ts +11 -0
  427. package/dist/types/tick.d.ts +55 -0
  428. package/dist/types/tooltip.d.ts +33 -0
  429. package/dist/utils/ReduceCSSCalc.d.ts +2 -0
  430. package/dist/utils/VueUtils.d.ts +11 -0
  431. package/dist/utils/attrs.d.ts +46 -0
  432. package/dist/utils/cartesian.d.ts +20 -0
  433. package/dist/utils/chart.d.ts +99 -0
  434. package/dist/utils/const.d.ts +30 -0
  435. package/dist/utils/context.d.ts +8 -0
  436. package/dist/utils/createContext.d.ts +8 -0
  437. package/dist/utils/data-utils.d.ts +4 -0
  438. package/dist/utils/data.d.ts +13 -0
  439. package/dist/utils/events.d.ts +12 -0
  440. package/dist/utils/getLinearRegression.d.ts +15 -0
  441. package/dist/utils/getRelativeCoordinate.d.ts +11 -0
  442. package/dist/utils/grid.d.ts +37 -0
  443. package/dist/utils/index.d.ts +4 -0
  444. package/dist/utils/isDomainSpecifiedByUser.d.ts +47 -0
  445. package/dist/utils/legend.d.ts +3 -0
  446. package/dist/utils/log.d.ts +1 -0
  447. package/dist/utils/payload/getUniqPayload.d.ts +4 -0
  448. package/dist/utils/polar.d.ts +21 -0
  449. package/dist/utils/props.d.ts +15 -0
  450. package/dist/utils/resolveDefaultProps.d.ts +52 -0
  451. package/dist/utils/scale/getNiceTickValues.d.ts +61 -0
  452. package/dist/utils/scale/utils/arithmetic.d.ts +50 -0
  453. package/dist/utils/scale/utils/utils.d.ts +9 -0
  454. package/dist/utils/style.d.ts +12 -0
  455. package/dist/utils/tick.d.ts +19 -0
  456. package/dist/utils/tooltip/translate.d.ts +47 -0
  457. package/dist/utils/types.d.ts +14 -0
  458. package/dist/utils/validate.d.ts +25 -0
  459. package/package.json +27 -10
@@ -0,0 +1,204 @@
1
+ import { AxisId } from './cartesianAxisSlice';
2
+ import { ChartCoordinate, Coordinate, DataKey, NameType, Payload, TooltipTrigger, ValueType } from '../types';
3
+ /**
4
+ * One Tooltip can display multiple TooltipPayloadEntries at a time.
5
+ */
6
+ export type TooltipPayloadEntry = Payload<ValueType, NameType>;
7
+ /**
8
+ * So what happens is that the tooltip payload is decided based on the available data, and the dataKey.
9
+ * The dataKey can either be defined on the graphical element (like Line, or Bar)
10
+ * or on the tooltip itself.
11
+ *
12
+ * The data can be defined in the chart element, or in the graphical item.
13
+ *
14
+ * So this type is all the settings, other than the data + dataKey complications.
15
+ */
16
+ export type TooltipEntrySettings = Omit<TooltipPayloadEntry, 'payload' | 'value'> & {
17
+ nameKey: DataKey<any> | undefined;
18
+ };
19
+ /**
20
+ * This is what Tooltip renders.
21
+ */
22
+ export type TooltipPayload = ReadonlyArray<TooltipPayloadEntry>;
23
+ /**
24
+ * null means no active index
25
+ * string means: whichever index from the chart data it is.
26
+ * Different charts have different requirements on data shapes,
27
+ * and are also responsible for providing a function that will accept this index
28
+ * and return data.
29
+ */
30
+ export type TooltipIndex = string | null;
31
+ /**
32
+ * Different items have different data shapes so the state has no opinion on what the data shape should be;
33
+ * the only requirement is that the chart also provides a searcher function
34
+ * that accepts the data, and a key, and returns whatever the payload in Tooltip should be.
35
+ */
36
+ export type TooltipPayloadSearcher<T = any, R = T> = (data: T, index: TooltipIndex, computedData?: unknown, nameKey?: DataKey<any>) => R | undefined;
37
+ export type TooltipPayloadConfiguration = {
38
+ settings: TooltipEntrySettings;
39
+ /**
40
+ * This is the data that the item has provided, all of it mixed together.
41
+ * Later as user is interacting with the chart, a redux selector will use this
42
+ * data + activeIndex, pass it to the TooltipPayloadSearcher, and render the result in a Tooltip.
43
+ */
44
+ dataDefinedOnItem: unknown;
45
+ /**
46
+ * Opportunity for the graphical item to define its own Tooltip coordinates
47
+ * instead of relying on the axes.
48
+ *
49
+ * If undefined, then Recharts will use mouse interaction coordinates, or the axis coordinates,
50
+ * with some defaults (like, top/left of the chart).
51
+ */
52
+ positions: Record<NonNullable<TooltipIndex>, Coordinate> | ReadonlyArray<Coordinate> | undefined;
53
+ };
54
+ export type ActiveTooltipProps = {
55
+ activeIndex: TooltipIndex;
56
+ activeCoordinate: ChartCoordinate | undefined;
57
+ };
58
+ /**
59
+ * So this informs the "tooltip event type". Tooltip event type can be either "axis" or "item"
60
+ * and it is used for two things:
61
+ * 1. Sets the active area
62
+ * 2. Sets the background and cursor highlights
63
+ *
64
+ * Some charts only allow to have one type of tooltip event type, some allow both.
65
+ * Those charts that allow both will have one default, and the "shared" prop will be used to switch between them.
66
+ * Undefined means "use the chart default".
67
+ *
68
+ * Charts that only allow one tooltip event type, will ignore the shared prop.
69
+ */
70
+ export type SharedTooltipSettings = boolean | undefined;
71
+ export type TooltipSettingsState = {
72
+ shared: SharedTooltipSettings;
73
+ trigger: TooltipTrigger;
74
+ axisId: AxisId;
75
+ /**
76
+ * The `active` prop, despite its name, does not mean "always active".
77
+ * It means "active after user interaction has ended".
78
+ * By default, the tooltip is only active while the user is hovering over the chart.
79
+ * With `active=true`, the tooltip will remain visible after mouse leave event.
80
+ *
81
+ * If you want to see the "active before user interaction" settings, see `defaultIndex`.
82
+ *
83
+ * Undefined means "depends on user interactions".
84
+ */
85
+ active: boolean | undefined;
86
+ /**
87
+ * If you want to set the tooltip to be active before user interaction, you can set this property.
88
+ */
89
+ defaultIndex: TooltipIndex | undefined;
90
+ };
91
+ /**
92
+ * A generic state for user interaction with the chart.
93
+ * User interaction can come through multiple channels: mouse events, keyboard events, or hardcoded in props, or synchronised from other charts.
94
+ *
95
+ * Each of the interaction states is represented as TooltipInteractionState,
96
+ * and then the selectors and Tooltip will decide which of the interaction states to use.
97
+ */
98
+ export type TooltipInteractionState = {
99
+ /**
100
+ * If user interaction is in progress or not.
101
+ * Why is this its own property? Why is this not computed from the index?
102
+ * Certainly if index !== -1 then the tooltip is active, right?
103
+ * Well not so fast. Recharts allows Tooltips can be set to `active=true`
104
+ * which means the tooltip remains displayed after the user stops interacting.
105
+ * - This implies that we cannot set index to <empty value> after interaction ends,
106
+ * because the chart must remember the last position just in case the `active` prop on Tooltip is set to true.
107
+ */
108
+ active: boolean;
109
+ /**
110
+ * This is the current data index that is set for the chart.
111
+ * This can come from mouse events, keyboard events, or hardcoded in props
112
+ * in property `defaultIndex` on Tooltip.
113
+ */
114
+ index: TooltipIndex;
115
+ /**
116
+ * DataKey filter.
117
+ *
118
+ * In case of multiple graphical items, this is the dataKey that is set for the item.
119
+ * Very useful for `Tooltip.shared=false`, where activeIndex can display multiple values,
120
+ * but we only want to display one of them.
121
+ *
122
+ * If we want to interact with all the graphical items, then this is undefined.
123
+ * This is the case for eventTooltipType === 'axis' for example.
124
+ */
125
+ dataKey: DataKey<any> | undefined;
126
+ /**
127
+ * The Coordinate where user last interacted with the chart. This needs saved so we can continue to render the tooltip at that point.
128
+ * This is undefined on several occasions:
129
+ * - before the user started interacting with the chart,
130
+ * - when the chart is controlled programmatically through `defaultIndex` prop
131
+ * - when the chart is controlled using keyboard interactions
132
+ */
133
+ coordinate: Coordinate | undefined;
134
+ };
135
+ export type TooltipSyncState = TooltipInteractionState & {
136
+ /**
137
+ * Tooltip synchronization is a feature that allows multiple charts to share the same interaction state.
138
+ * This comes with one specialty - the syncMethod. `syncMethod=value` allows the user to synchronise charts
139
+ * based on the active label (which is rendered as the title of the Tooltip).
140
+ * To allow that, we need the label to be stored in the sync state.
141
+ */
142
+ label: string | undefined;
143
+ };
144
+ export declare const noInteraction: TooltipInteractionState;
145
+ /**
146
+ * The tooltip interaction state stores:
147
+ *
148
+ * - Which graphical item is user interacting with at the moment,
149
+ * - which axis (or, which part of chart background) is user interacting with at the moment
150
+ * - The data that individual graphical items wish to be displayed in case the tooltip gets activated
151
+ */
152
+ export type TooltipState = {
153
+ /**
154
+ * This is the state of interactions with individual graphical items.
155
+ */
156
+ itemInteraction: {
157
+ click: TooltipInteractionState;
158
+ /**
159
+ * Why is hover activation separate from click activation? Because they are independent:
160
+ * If a click is set, then mouseLeave should not clear it.
161
+ * - the opposite is technically true too - but it's difficult to click on things without also hovering.
162
+ */
163
+ hover: TooltipInteractionState;
164
+ };
165
+ /**
166
+ * This is the state of interaction with the bar background - which will get mapped
167
+ * to the axis index.
168
+ *
169
+ * Axis interaction is independent of item interaction so the state must also be independent.
170
+ */
171
+ axisInteraction: {
172
+ click: TooltipInteractionState;
173
+ hover: TooltipInteractionState;
174
+ };
175
+ keyboardInteraction: TooltipInteractionState;
176
+ /**
177
+ * This part of the state is the information coming from other charts.
178
+ * If there are two charts with the same syncId, events from one chart will be transferred
179
+ * to other charts. So this is what the other charts are reporting.
180
+ */
181
+ syncInteraction: TooltipSyncState;
182
+ /**
183
+ * One graphical item will have one configuration;
184
+ * hovering over multiple of them (for example with tooltipEventType===axis)
185
+ * may render multiple tooltip payloads.
186
+ */
187
+ tooltipItemPayloads: ReadonlyArray<TooltipPayloadConfiguration>;
188
+ /**
189
+ * Tooltip props or other settings that need redux access.
190
+ * This assumes that there is always only one Tooltip. In case we want to start supporting multiple Tooltips,
191
+ * we have to change this to an array - and update all the places reading this state too.
192
+ */
193
+ settings: TooltipSettingsState;
194
+ };
195
+ export declare const initialState: TooltipState;
196
+ export type TooltipActionPayload = {
197
+ activeIndex: TooltipIndex;
198
+ activeDataKey: DataKey<any> | undefined;
199
+ activeCoordinate?: ChartCoordinate | undefined;
200
+ };
201
+ export declare const addTooltipEntrySettings: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipPayloadConfiguration, "tooltip/addTooltipEntrySettings">, removeTooltipEntrySettings: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipPayloadConfiguration, "tooltip/removeTooltipEntrySettings">, setTooltipSettingsState: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipSettingsState, "tooltip/setTooltipSettingsState">, setActiveMouseOverItemIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipActionPayload, "tooltip/setActiveMouseOverItemIndex">, mouseLeaveItem: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"tooltip/mouseLeaveItem">, mouseLeaveChart: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"tooltip/mouseLeaveChart">, setActiveClickItemIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipActionPayload, "tooltip/setActiveClickItemIndex">, setMouseOverAxisIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipActionPayload, "tooltip/setMouseOverAxisIndex">, setMouseClickAxisIndex: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipActionPayload, "tooltip/setMouseClickAxisIndex">, setSyncInteraction: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipSyncState, "tooltip/setSyncInteraction">, setKeyboardInteraction: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TooltipActionPayload & {
202
+ active: boolean;
203
+ }, "tooltip/setKeyboardInteraction">;
204
+ export declare const tooltipReducer: import('@reduxjs/toolkit').Reducer<TooltipState>;
@@ -0,0 +1,2 @@
1
+ export declare const touchEventAction: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<TouchEvent, string>;
2
+ export declare const touchEventMiddleware: import('@reduxjs/toolkit').ListenerMiddlewareInstance<unknown, import('@reduxjs/toolkit').ThunkDispatch<unknown, unknown, import('@reduxjs/toolkit').UnknownAction>, unknown>;
@@ -0,0 +1 @@
1
+ export declare function useReportScale(): import('vue').Ref<HTMLElement, HTMLElement>;
@@ -0,0 +1,3 @@
1
+ import { RechartsRootState } from '../state/store';
2
+ import { TooltipSyncState } from '../state/tooltipSlice';
3
+ export declare function selectSynchronisedTooltipState(state: RechartsRootState): TooltipSyncState;
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { ChartCoordinate, TooltipEventType, TooltipIndex, TooltipTrigger } from '../types';
3
+ export declare function useTooltipChartSynchronisation({ tooltipEventType, trigger, activeCoordinate, activeLabel, activeIndex, isTooltipActive, }: {
4
+ tooltipEventType: Ref<TooltipEventType | undefined>;
5
+ trigger: TooltipTrigger;
6
+ activeCoordinate: Ref<ChartCoordinate | undefined>;
7
+ activeLabel: Ref<string | number | undefined>;
8
+ activeIndex: Ref<TooltipIndex | undefined>;
9
+ isTooltipActive: Ref<boolean>;
10
+ }): void;
11
+ export declare function useBrushChartSynchronisation(): void;
@@ -0,0 +1,8 @@
1
+ export type BaseValue = number | 'dataMin' | 'dataMax';
2
+ export interface DataPoint {
3
+ [key: string]: number | string | Date | undefined;
4
+ }
5
+ export interface AreaChartData extends DataPoint {
6
+ value: number;
7
+ date?: Date | string;
8
+ }
@@ -0,0 +1,127 @@
1
+ import { DataKey } from './common';
2
+ import { RechartsScale, ScaleType } from './scale';
3
+ import { TickFormatter, TicksSettings } from './tick';
4
+ export type AxisId = string | number;
5
+ export type AxisDomainType = 'number' | 'category';
6
+ export type AxisDomainItem = string | number | ((d: number) => string | number) | 'auto' | 'dataMin' | 'dataMax';
7
+ /**
8
+ * The domain of axis.
9
+ * This is the definition
10
+ *
11
+ * Numeric domain is always defined by an array of exactly two values, for the min and the max of the axis.
12
+ * Categorical domain is defined as array of all possible values.
13
+ *
14
+ * Can be specified in many ways:
15
+ * - array of numbers
16
+ * - with special strings like 'dataMin' and 'dataMax'
17
+ * - with special string math like 'dataMin - 100'
18
+ * - with keyword 'auto'
19
+ * - or a function
20
+ * - array of functions
21
+ * - or a combination of the above
22
+ */
23
+ export type AxisDomain = ReadonlyArray<string> | ReadonlyArray<number> | Readonly<[AxisDomainItem, AxisDomainItem]> | (([dataMin, dataMax]: [number, number], allowDataOverflow: boolean) => [number, number]);
24
+ /**
25
+ * Properties shared in X, Y, and Z axes
26
+ */
27
+ export type BaseCartesianAxis = {
28
+ id?: AxisId;
29
+ scale: ScaleType | RechartsScale | undefined;
30
+ type: AxisDomainType;
31
+ /**
32
+ * The axis functionality is severely restricted without a dataKey
33
+ * - but there is still something left, and the prop is optional
34
+ * so this can also be undefined even in real charts.
35
+ * There are no defaults.
36
+ */
37
+ dataKey: DataKey<any> | undefined;
38
+ unit: string | undefined;
39
+ name: string | undefined;
40
+ allowDuplicatedCategory: boolean;
41
+ allowDataOverflow: boolean;
42
+ reversed: boolean;
43
+ includeHidden: boolean;
44
+ domain: AxisDomain | undefined;
45
+ };
46
+ export type AxisInterval = number | 'preserveStart' | 'preserveEnd' | 'preserveStartEnd' | 'equidistantPreserveStart' | 'equidistantPreserveEnd';
47
+ /**
48
+ * These are the external props, visible for users as they set them using our public API.
49
+ * There is all sorts of internal computed things based on these, but they will come through selectors.
50
+ *
51
+ * Properties shared between X and Y axes
52
+ */
53
+ export type CartesianAxisSettings = BaseCartesianAxis & TicksSettings & {
54
+ interval: AxisInterval;
55
+ mirror: boolean;
56
+ minTickGap: number;
57
+ angle: number;
58
+ hide: boolean;
59
+ tickFormatter: TickFormatter | undefined;
60
+ };
61
+ export type YAxisPadding = {
62
+ top?: number;
63
+ bottom?: number;
64
+ } | 'gap' | 'no-gap';
65
+ export type YAxisOrientation = 'left' | 'right';
66
+ export type YAxisSettings = CartesianAxisSettings & {
67
+ padding: YAxisPadding;
68
+ width: number;
69
+ orientation: YAxisOrientation;
70
+ };
71
+ export type AxisRange = readonly [number, number];
72
+ /**
73
+ * Z axis is special because it's never displayed. It controls the size of Scatter dots,
74
+ * but it never displays ticks anywhere.
75
+ */
76
+ export type ZAxisSettings = BaseCartesianAxis & {
77
+ range: AxisRange;
78
+ };
79
+ export type XAxisPadding = {
80
+ left?: number;
81
+ right?: number;
82
+ } | 'gap' | 'no-gap';
83
+ export type XAxisOrientation = 'top' | 'bottom';
84
+ export type XAxisSettings = CartesianAxisSettings & {
85
+ padding: XAxisPadding;
86
+ height: number;
87
+ orientation: XAxisOrientation;
88
+ };
89
+ export type AxisType = 'xAxis' | 'yAxis' | 'zAxis' | 'angleAxis' | 'radiusAxis';
90
+ export interface XAxisProps {
91
+ xAxisId?: string | number;
92
+ dataKey?: string | number | ((row: any) => any);
93
+ type?: 'number' | 'category';
94
+ domain?: any[];
95
+ scale?: string | Function;
96
+ orientation?: 'top' | 'bottom';
97
+ height?: number;
98
+ padding?: {
99
+ left?: number;
100
+ right?: number;
101
+ } | 'gap' | 'no-gap';
102
+ mirror?: boolean;
103
+ hide?: boolean;
104
+ tick?: boolean | Function | any;
105
+ tickCount?: number;
106
+ tickFormatter?: (val: any, idx: number) => string;
107
+ allowDataOverflow?: boolean;
108
+ allowDuplicatedCategory?: boolean;
109
+ allowDecimals?: boolean;
110
+ includeHidden?: boolean;
111
+ name?: string;
112
+ unit?: string;
113
+ angle?: number;
114
+ minTickGap?: number;
115
+ label?: string | number | any;
116
+ className?: string;
117
+ }
118
+ /**
119
+ * NumberDomain is an evaluated {@link AxisDomain}.
120
+ * Unlike {@link AxisDomain}, it has no variety - it's a tuple of two number.
121
+ * This is after all the keywords and functions were evaluated and what is left is [min, max].
122
+ *
123
+ * Know that the min, max values are not guaranteed to be nice numbers - values like -Infinity or NaN are possible.
124
+ *
125
+ * There are also `category` axes that have different things than numbers in their domain.
126
+ */
127
+ export type NumberDomain = [min: number, max: number];
@@ -0,0 +1,51 @@
1
+ import { Coordinate } from './common';
2
+ import { CartesianViewBox } from '../cartesian/type';
3
+ export type BarPositionPosition = {
4
+ /**
5
+ * Offset is returned always from zero position.
6
+ * So in a way it's "absolute".
7
+ *
8
+ * NOT inbetween bars, but always from zero.
9
+ */
10
+ offset: number;
11
+ /**
12
+ * Size of the bar.
13
+ * This will be usually a number.
14
+ * But if the input data is not well-formed, undefined or NaN will be on the output too.
15
+ */
16
+ size: number | undefined | typeof NaN;
17
+ };
18
+ export type RectRadius = [number, number, number, number];
19
+ export type AnimationEasing = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
20
+ interface RectangleProps {
21
+ className?: string;
22
+ x?: number;
23
+ y?: number;
24
+ width?: number;
25
+ height?: number;
26
+ radius?: number | RectRadius;
27
+ isAnimationActive?: boolean;
28
+ isUpdateAnimationActive?: boolean;
29
+ animationBegin?: number;
30
+ animationDuration?: number;
31
+ animationEasing?: AnimationEasing;
32
+ }
33
+ export interface BarRectangleItem extends RectangleProps {
34
+ value?: number | [number, number];
35
+ /** the original data entry */
36
+ payload?: any;
37
+ /** the coordinate of background rectangle */
38
+ background?: {
39
+ x?: number;
40
+ y?: number;
41
+ width?: number;
42
+ height?: number;
43
+ };
44
+ /** Chart range coordinate of the baseValue of the first bar in a stack. */
45
+ stackedBarStart: number;
46
+ tooltipPosition: Coordinate;
47
+ /** The chart's full plotting area viewBox, used by LabelList for text wrapping calculations */
48
+ parentViewBox?: CartesianViewBox;
49
+ }
50
+ export type ErrorBarDirection = 'x' | 'y';
51
+ export {};
@@ -0,0 +1,36 @@
1
+ import { DataKey, LayoutType, Margin, StackOffsetType, SyncMethod } from './common';
2
+ import { ExternalMouseEvents } from './event';
3
+ export interface CategoricalChartProps extends Partial<ExternalMouseEvents> {
4
+ accessibilityLayer?: boolean;
5
+ barCategoryGap?: number | string;
6
+ barGap?: number | string;
7
+ barSize?: number | string;
8
+ children?: any;
9
+ class?: string;
10
+ compact?: boolean;
11
+ cx?: number | string;
12
+ cy?: number | string;
13
+ data?: any[];
14
+ dataKey?: DataKey<any>;
15
+ desc?: string;
16
+ endAngle?: number;
17
+ height?: number;
18
+ id?: string;
19
+ innerRadius?: number | string;
20
+ layout?: LayoutType;
21
+ margin?: Margin;
22
+ maxBarSize?: number;
23
+ outerRadius?: number | string;
24
+ reverseStackOrder?: boolean;
25
+ role?: string;
26
+ stackOffset?: StackOffsetType;
27
+ startAngle?: number;
28
+ style?: any;
29
+ syncId?: number | string;
30
+ syncMethod?: SyncMethod;
31
+ tabIndex?: number;
32
+ throttleDelay?: number;
33
+ title?: string;
34
+ width?: number;
35
+ }
36
+ export type CategoricalDomain = ReadonlyArray<number | string | Date>;
@@ -0,0 +1,129 @@
1
+ import { TooltipPayload, TooltipPayloadSearcher } from '../state/tooltipSlice';
2
+ import { TooltipEventType, TooltipIndex } from './tooltip';
3
+ import { PropType, SVGAttributes } from 'vue';
4
+ export type DataKey<T> = string | number | ((obj: T) => any);
5
+ export interface Coordinate {
6
+ x: number;
7
+ y: number;
8
+ }
9
+ export interface ChartCoordinate extends Coordinate {
10
+ xAxis?: any;
11
+ yAxis?: any;
12
+ width?: any;
13
+ height?: any;
14
+ offset?: ChartOffset;
15
+ angle?: number;
16
+ radius?: number;
17
+ cx?: number;
18
+ cy?: number;
19
+ startAngle?: number;
20
+ endAngle?: number;
21
+ innerRadius?: number;
22
+ outerRadius?: number;
23
+ }
24
+ export type LayoutType = 'horizontal' | 'vertical' | 'centric' | 'radial';
25
+ export interface Margin {
26
+ top?: number;
27
+ right?: number;
28
+ bottom?: number;
29
+ left?: number;
30
+ }
31
+ export type StackOffsetType = 'sign' | 'expand' | 'none' | 'wiggle' | 'silhouette' | 'positive';
32
+ export interface TickItem {
33
+ value?: any;
34
+ coordinate: number;
35
+ index?: number;
36
+ offset?: number;
37
+ }
38
+ export type SyncMethod = 'index' | 'value' | ((ticks: ReadonlyArray<TickItem>, data: MouseHandlerDataParam) => number);
39
+ export type MouseHandlerDataParam = {
40
+ /**
41
+ * Index of the active tick in the current chart. Only works with number-indexed one-dimensional data charts,
42
+ * like Line, Area, Bar, Pie, etc.
43
+ *
44
+ * Doesn't work with two-dimensional data charts like Treemap, Sankey. But one day it will which is why the TooltipIndex type is here.
45
+ */
46
+ activeTooltipIndex: number | TooltipIndex | undefined;
47
+ isTooltipActive: boolean;
48
+ /**
49
+ * Exactly the same as activeTooltipIndex - this was also duplicated in recharts@2 so let's keep both properties for better backwards compatibility.
50
+ */
51
+ activeIndex: number | TooltipIndex | undefined;
52
+ activeLabel: string | undefined;
53
+ activeDataKey: DataKey<any> | undefined;
54
+ activeCoordinate: Coordinate | undefined;
55
+ };
56
+ export interface Padding {
57
+ top?: number;
58
+ bottom?: number;
59
+ left?: number;
60
+ right?: number;
61
+ }
62
+ export interface ChartOffset {
63
+ top: number;
64
+ bottom: number;
65
+ left: number;
66
+ right: number;
67
+ height: number;
68
+ width: number;
69
+ brushBottom: number;
70
+ }
71
+ export type ChartOffsetRequired = Required<ChartOffset>;
72
+ export interface Size {
73
+ width: number;
74
+ height: number;
75
+ }
76
+ export type AnimationDuration = number;
77
+ /**
78
+ * Coordinates relative to the top-left corner of the chart.
79
+ * Also include scale which means that a chart that's scaled will return the same coordinates as a chart that's not scaled.
80
+ */
81
+ export interface ChartPointer {
82
+ chartX: number;
83
+ chartY: number;
84
+ }
85
+ export type IfOverflow = 'hidden' | 'visible' | 'discard' | 'extendDomain';
86
+ export interface ScatterPointNode {
87
+ x?: number | string;
88
+ y?: number | string;
89
+ z?: number | string;
90
+ }
91
+ export interface ScatterPointItem {
92
+ cx: number | undefined;
93
+ cy: number | undefined;
94
+ x: number | undefined;
95
+ y: number | undefined;
96
+ size: number;
97
+ width: number;
98
+ height: number;
99
+ node: ScatterPointNode;
100
+ payload?: any;
101
+ tooltipPayload?: TooltipPayload;
102
+ tooltipPosition: Coordinate;
103
+ }
104
+ export interface CategoricalChartOptions {
105
+ chartName: string;
106
+ defaultTooltipEventType?: TooltipEventType;
107
+ validateTooltipEventTypes?: ReadonlyArray<TooltipEventType>;
108
+ defaultProps?: any;
109
+ tooltipPayloadSearcher: TooltipPayloadSearcher;
110
+ }
111
+ type UnwrapPropType<T> = T extends PropType<infer C> ? C : T;
112
+ type VuePropField<P> = P extends {
113
+ type: infer T;
114
+ } ? UnwrapPropType<T> : UnwrapPropType<P>;
115
+ export type VuePropsToType<Props> = {
116
+ [K in keyof Props as Props[K] extends {
117
+ required: boolean;
118
+ } ? K : never]: VuePropField<Props[K]>;
119
+ } & {
120
+ [K in keyof Props as Props[K] extends {
121
+ required: boolean;
122
+ } ? never : K]?: VuePropField<Props[K]>;
123
+ };
124
+ export type WithSVGProps<T> = VuePropsToType<T> & Omit<SVGAttributes, keyof T>;
125
+ export type AllowInDimension = {
126
+ x?: boolean;
127
+ y?: boolean;
128
+ };
129
+ export {};
@@ -0,0 +1,16 @@
1
+ import { MouseHandlerDataParam } from './common';
2
+ export type CategoricalChartFunc = (nextState: MouseHandlerDataParam, event: Event) => void;
3
+ export interface ExternalMouseEvents {
4
+ onClick: CategoricalChartFunc;
5
+ onMouseLeave: CategoricalChartFunc;
6
+ onMouseEnter: CategoricalChartFunc;
7
+ onMouseMove: CategoricalChartFunc;
8
+ onMouseDown: CategoricalChartFunc;
9
+ onMouseUp: CategoricalChartFunc;
10
+ onContextMenu: CategoricalChartFunc;
11
+ onDoubleClick: CategoricalChartFunc;
12
+ onTouchStart: CategoricalChartFunc;
13
+ onTouchMove: CategoricalChartFunc;
14
+ onTouchEnd: CategoricalChartFunc;
15
+ }
16
+ export declare const EventKeys: string[];
@@ -0,0 +1,4 @@
1
+ export * from './common';
2
+ export * from './categorical';
3
+ export * from './event';
4
+ export * from './tooltip';
@@ -0,0 +1 @@
1
+ export type LegendType = 'circle' | 'cross' | 'diamond' | 'line' | 'plainline' | 'rect' | 'square' | 'star' | 'triangle' | 'wye' | 'none';
@@ -0,0 +1,8 @@
1
+ export type OffsetVertical = {
2
+ top: number;
3
+ bottom: number;
4
+ };
5
+ export type OffsetHorizontal = {
6
+ left: number;
7
+ right: number;
8
+ };
@@ -0,0 +1,28 @@
1
+ import { DataKey } from '.';
2
+ import { RechartsScale } from './scale';
3
+ export type RadiusAxisForRadar = {
4
+ scale: RechartsScale;
5
+ };
6
+ export type AngleAxisForRadar = {
7
+ scale: RechartsScale;
8
+ type: 'number' | 'category';
9
+ dataKey: DataKey<any>;
10
+ cx: number;
11
+ cy: number;
12
+ };
13
+ export interface RadarPoint {
14
+ x: number;
15
+ y: number;
16
+ cx?: number;
17
+ cy?: number;
18
+ angle?: number;
19
+ radius?: number;
20
+ value?: number;
21
+ payload?: any;
22
+ name?: string;
23
+ }
24
+ export type RadarComposedData = {
25
+ points: RadarPoint[];
26
+ baseLinePoints: RadarPoint[];
27
+ isRange: boolean;
28
+ };
@@ -0,0 +1,11 @@
1
+ export type ScaleType = 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'symlog' | 'threshold';
2
+ /**
3
+ * A subset of d3-scale that Recharts is using
4
+ */
5
+ export interface RechartsScale {
6
+ domain: (() => ReadonlyArray<unknown>) & ((newDomain: ReadonlyArray<unknown>) => this);
7
+ range: (() => ReadonlyArray<unknown>) & ((newRange: ReadonlyArray<unknown>) => this);
8
+ bandwidth?: () => number;
9
+ ticks?: (count: number) => any;
10
+ (args: any): number;
11
+ }