@mui/x-charts 8.11.2 → 8.12.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 (330) hide show
  1. package/BarChart/BarChart.d.ts +2 -2
  2. package/BarChart/BarChart.js +1 -0
  3. package/BarChart/BarChart.plugins.d.ts +3 -2
  4. package/BarChart/BarChart.plugins.js +2 -1
  5. package/BarChart/BarElement.js +10 -2
  6. package/BarChart/index.d.ts +2 -0
  7. package/BarChart/index.js +12 -0
  8. package/BarChart/useBarChartProps.d.ts +2 -2
  9. package/BarChart/useBarChartProps.js +4 -3
  10. package/CHANGELOG.md +231 -0
  11. package/ChartContainer/ChartContainer.js +4 -2
  12. package/ChartContainer/useChartContainerProps.js +4 -2
  13. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
  14. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
  15. package/ChartsLegend/ChartsLegend.js +2 -1
  16. package/ChartsLegend/ContinuousColorLegend.js +1 -0
  17. package/ChartsLegend/PiecewiseColorLegend.d.ts +2 -2
  18. package/ChartsLegend/PiecewiseColorLegend.js +33 -22
  19. package/ChartsLegend/piecewiseColorLegendClasses.d.ts +4 -0
  20. package/ChartsLegend/piecewiseColorLegendClasses.js +2 -2
  21. package/ChartsSurface/ChartsSurface.js +22 -2
  22. package/ChartsWrapper/ChartsWrapper.d.ts +5 -0
  23. package/ChartsWrapper/ChartsWrapper.js +87 -36
  24. package/ChartsXAxis/ChartsGroupedXAxisTicks.js +2 -2
  25. package/ChartsXAxis/ChartsXAxisImpl.js +3 -3
  26. package/ChartsXAxis/getVisibleLabels.js +5 -1
  27. package/ChartsXAxis/useAxisTicksProps.d.ts +3 -3
  28. package/ChartsYAxis/ChartsGroupedYAxisTicks.js +2 -2
  29. package/ChartsYAxis/ChartsYAxisImpl.js +3 -3
  30. package/ChartsYAxis/useAxisTicksProps.d.ts +3 -3
  31. package/LineChart/FocusedMark.d.ts +2 -0
  32. package/LineChart/FocusedMark.js +44 -0
  33. package/LineChart/LineChart.d.ts +2 -2
  34. package/LineChart/LineChart.js +3 -1
  35. package/LineChart/LineChart.plugins.d.ts +3 -2
  36. package/LineChart/LineChart.plugins.js +2 -1
  37. package/LineChart/index.d.ts +1 -0
  38. package/LineChart/index.js +12 -0
  39. package/LineChart/useAreaPlotData.js +2 -2
  40. package/LineChart/useLineChartProps.d.ts +2 -2
  41. package/LineChart/useLineChartProps.js +2 -1
  42. package/LineChart/useLinePlotData.js +2 -2
  43. package/PieChart/PieArc.d.ts +1 -0
  44. package/PieChart/PieArc.js +7 -3
  45. package/PieChart/PieArcPlot.js +1 -0
  46. package/PieChart/PieChart.js +2 -0
  47. package/PieChart/PieChart.plugins.d.ts +2 -1
  48. package/PieChart/PieChart.plugins.js +2 -1
  49. package/PieChart/dataTransform/useTransformData.d.ts +1 -0
  50. package/PieChart/dataTransform/useTransformData.js +9 -1
  51. package/PieChart/index.d.ts +1 -0
  52. package/PieChart/index.js +12 -0
  53. package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
  54. package/RadarChart/RadarChart.plugins.d.ts +1 -1
  55. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +3 -3
  56. package/RadarChart/index.d.ts +2 -1
  57. package/RadarChart/index.js +12 -0
  58. package/RadarChart/useRadarChartProps.d.ts +2 -2
  59. package/RadarChart/useRadarChartProps.js +2 -1
  60. package/ScatterChart/BatchScatter.d.ts +32 -0
  61. package/ScatterChart/BatchScatter.js +171 -0
  62. package/ScatterChart/Scatter.js +13 -5
  63. package/ScatterChart/ScatterChart.d.ts +4 -4
  64. package/ScatterChart/ScatterChart.js +13 -2
  65. package/ScatterChart/ScatterChart.plugins.d.ts +4 -3
  66. package/ScatterChart/ScatterChart.plugins.js +3 -2
  67. package/ScatterChart/ScatterPlot.d.ts +10 -0
  68. package/ScatterChart/ScatterPlot.js +14 -2
  69. package/ScatterChart/index.d.ts +1 -0
  70. package/ScatterChart/index.js +12 -0
  71. package/ScatterChart/useScatterChartProps.d.ts +2 -2
  72. package/ScatterChart/useScatterChartProps.js +10 -6
  73. package/SparkLineChart/SparkLineChart.js +10 -5
  74. package/colorPalettes/types.d.ts +1 -1
  75. package/context/ChartApi.d.ts +6 -6
  76. package/esm/BarChart/BarChart.d.ts +2 -2
  77. package/esm/BarChart/BarChart.js +1 -0
  78. package/esm/BarChart/BarChart.plugins.d.ts +3 -2
  79. package/esm/BarChart/BarChart.plugins.js +2 -1
  80. package/esm/BarChart/BarElement.js +10 -2
  81. package/esm/BarChart/index.d.ts +2 -0
  82. package/esm/BarChart/index.js +1 -0
  83. package/esm/BarChart/useBarChartProps.d.ts +2 -2
  84. package/esm/BarChart/useBarChartProps.js +4 -3
  85. package/esm/ChartContainer/ChartContainer.js +4 -2
  86. package/esm/ChartContainer/useChartContainerProps.js +4 -2
  87. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
  88. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
  89. package/esm/ChartsLegend/ChartsLegend.js +2 -1
  90. package/esm/ChartsLegend/ContinuousColorLegend.js +1 -0
  91. package/esm/ChartsLegend/PiecewiseColorLegend.d.ts +2 -2
  92. package/esm/ChartsLegend/PiecewiseColorLegend.js +33 -22
  93. package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +4 -0
  94. package/esm/ChartsLegend/piecewiseColorLegendClasses.js +2 -2
  95. package/esm/ChartsSurface/ChartsSurface.js +22 -2
  96. package/esm/ChartsWrapper/ChartsWrapper.d.ts +5 -0
  97. package/esm/ChartsWrapper/ChartsWrapper.js +87 -36
  98. package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.js +2 -2
  99. package/esm/ChartsXAxis/ChartsXAxisImpl.js +3 -3
  100. package/esm/ChartsXAxis/getVisibleLabels.js +5 -1
  101. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +3 -3
  102. package/esm/ChartsYAxis/ChartsGroupedYAxisTicks.js +2 -2
  103. package/esm/ChartsYAxis/ChartsYAxisImpl.js +3 -3
  104. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +3 -3
  105. package/esm/LineChart/FocusedMark.d.ts +2 -0
  106. package/esm/LineChart/FocusedMark.js +38 -0
  107. package/esm/LineChart/LineChart.d.ts +2 -2
  108. package/esm/LineChart/LineChart.js +3 -1
  109. package/esm/LineChart/LineChart.plugins.d.ts +3 -2
  110. package/esm/LineChart/LineChart.plugins.js +2 -1
  111. package/esm/LineChart/index.d.ts +1 -0
  112. package/esm/LineChart/index.js +1 -0
  113. package/esm/LineChart/useAreaPlotData.js +2 -2
  114. package/esm/LineChart/useLineChartProps.d.ts +2 -2
  115. package/esm/LineChart/useLineChartProps.js +2 -1
  116. package/esm/LineChart/useLinePlotData.js +2 -2
  117. package/esm/PieChart/PieArc.d.ts +1 -0
  118. package/esm/PieChart/PieArc.js +7 -3
  119. package/esm/PieChart/PieArcPlot.js +1 -0
  120. package/esm/PieChart/PieChart.js +2 -0
  121. package/esm/PieChart/PieChart.plugins.d.ts +2 -1
  122. package/esm/PieChart/PieChart.plugins.js +2 -1
  123. package/esm/PieChart/dataTransform/useTransformData.d.ts +1 -0
  124. package/esm/PieChart/dataTransform/useTransformData.js +9 -1
  125. package/esm/PieChart/index.d.ts +1 -0
  126. package/esm/PieChart/index.js +1 -0
  127. package/esm/RadarChart/RadarAxis/useRadarAxis.js +2 -2
  128. package/esm/RadarChart/RadarChart.plugins.d.ts +1 -1
  129. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +3 -3
  130. package/esm/RadarChart/index.d.ts +2 -1
  131. package/esm/RadarChart/index.js +2 -1
  132. package/esm/RadarChart/useRadarChartProps.d.ts +2 -2
  133. package/esm/RadarChart/useRadarChartProps.js +2 -1
  134. package/esm/ScatterChart/BatchScatter.d.ts +32 -0
  135. package/esm/ScatterChart/BatchScatter.js +165 -0
  136. package/esm/ScatterChart/Scatter.js +13 -5
  137. package/esm/ScatterChart/ScatterChart.d.ts +4 -4
  138. package/esm/ScatterChart/ScatterChart.js +13 -2
  139. package/esm/ScatterChart/ScatterChart.plugins.d.ts +4 -3
  140. package/esm/ScatterChart/ScatterChart.plugins.js +3 -2
  141. package/esm/ScatterChart/ScatterPlot.d.ts +10 -0
  142. package/esm/ScatterChart/ScatterPlot.js +14 -2
  143. package/esm/ScatterChart/index.d.ts +1 -0
  144. package/esm/ScatterChart/index.js +1 -0
  145. package/esm/ScatterChart/useScatterChartProps.d.ts +2 -2
  146. package/esm/ScatterChart/useScatterChartProps.js +10 -6
  147. package/esm/SparkLineChart/SparkLineChart.js +10 -5
  148. package/esm/colorPalettes/types.d.ts +1 -1
  149. package/esm/context/ChartApi.d.ts +6 -6
  150. package/esm/hooks/useAxis.d.ts +5 -5
  151. package/esm/hooks/useDrawingArea.d.ts +20 -2
  152. package/esm/hooks/useFocusedItem.d.ts +15 -0
  153. package/esm/hooks/useFocusedItem.js +20 -0
  154. package/esm/hooks/useIsItemFocused.d.ts +12 -0
  155. package/esm/hooks/useIsItemFocused.js +15 -0
  156. package/esm/hooks/useIsItemFocusedGetter.d.ts +8 -0
  157. package/esm/hooks/useIsItemFocusedGetter.js +14 -0
  158. package/esm/hooks/useScale.js +8 -2
  159. package/esm/hooks/useTicks.js +2 -2
  160. package/esm/hooks/useTicksGrouped.js +2 -2
  161. package/esm/index.d.ts +1 -0
  162. package/esm/index.js +2 -1
  163. package/esm/internals/animation/Transition.js +1 -3
  164. package/esm/internals/index.d.ts +4 -3
  165. package/esm/internals/index.js +4 -3
  166. package/esm/internals/invertScale.js +2 -2
  167. package/esm/internals/plugins/allPlugins.d.ts +5 -4
  168. package/esm/internals/plugins/allPlugins.js +3 -2
  169. package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
  170. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +2 -0
  171. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +66 -72
  172. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -19
  173. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +10 -18
  174. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
  175. package/{internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.d.ts → esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts} +1 -1
  176. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js +24 -0
  177. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +63 -0
  178. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +123 -0
  179. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -3
  180. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +8 -6
  181. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -0
  182. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +46 -4
  183. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -0
  184. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +32 -21
  185. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/index.d.ts +3 -0
  186. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/index.js +2 -0
  187. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +3 -0
  188. package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.js → useChartClosestPoint/useChartClosestPoint.js} +9 -7
  189. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +5 -0
  190. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +3 -0
  191. package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.d.ts → useChartClosestPoint/useChartClosestPoint.types.d.ts} +8 -4
  192. package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +16 -0
  193. package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +32 -0
  194. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -0
  195. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +5 -0
  196. package/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +3 -0
  197. package/esm/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.js +3 -0
  198. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +3 -0
  199. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +2 -0
  200. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +3 -0
  201. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +20 -0
  202. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +88 -0
  203. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +210 -0
  204. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +25 -0
  205. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +7 -0
  206. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +34 -0
  207. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.js +1 -0
  208. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +2 -2
  209. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +10 -8
  210. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +2 -1
  211. package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +1 -1
  212. package/esm/internals/scaleGuards.d.ts +11 -0
  213. package/esm/internals/scaleGuards.js +9 -0
  214. package/esm/locales/elGR.d.ts +96 -0
  215. package/esm/locales/elGR.js +100 -0
  216. package/esm/locales/enUS.d.ts +96 -0
  217. package/esm/locales/enUS.js +99 -1
  218. package/esm/locales/frFR.d.ts +96 -0
  219. package/esm/locales/frFR.js +100 -2
  220. package/esm/locales/ptBR.d.ts +96 -0
  221. package/esm/locales/ptBR.js +100 -0
  222. package/esm/locales/ptPT.d.ts +96 -0
  223. package/esm/locales/ptPT.js +100 -0
  224. package/esm/locales/svSE.d.ts +97 -1
  225. package/esm/locales/svSE.js +100 -0
  226. package/esm/locales/utils/chartsLocaleTextApi.d.ts +384 -0
  227. package/esm/locales/utils/getChartsLocalization.d.ts +96 -0
  228. package/esm/models/axis.d.ts +3 -0
  229. package/esm/plugins/index.d.ts +6 -0
  230. package/esm/plugins/index.js +12 -0
  231. package/hooks/useAxis.d.ts +5 -5
  232. package/hooks/useDrawingArea.d.ts +20 -2
  233. package/hooks/useFocusedItem.d.ts +15 -0
  234. package/hooks/useFocusedItem.js +26 -0
  235. package/hooks/useIsItemFocused.d.ts +12 -0
  236. package/hooks/useIsItemFocused.js +20 -0
  237. package/hooks/useIsItemFocusedGetter.d.ts +8 -0
  238. package/hooks/useIsItemFocusedGetter.js +18 -0
  239. package/hooks/useScale.js +8 -2
  240. package/hooks/useTicks.js +2 -2
  241. package/hooks/useTicksGrouped.js +2 -2
  242. package/index.d.ts +1 -0
  243. package/index.js +13 -1
  244. package/internals/animation/Transition.js +0 -2
  245. package/internals/index.d.ts +4 -3
  246. package/internals/index.js +24 -12
  247. package/internals/invertScale.js +2 -2
  248. package/internals/plugins/allPlugins.d.ts +5 -4
  249. package/internals/plugins/allPlugins.js +3 -2
  250. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
  251. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +2 -0
  252. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -69
  253. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +3 -19
  254. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +10 -18
  255. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +1 -1
  256. package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.d.ts → internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts} +1 -1
  257. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js +30 -0
  258. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +63 -0
  259. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +134 -0
  260. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -3
  261. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +8 -6
  262. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -0
  263. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +47 -5
  264. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -0
  265. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +33 -22
  266. package/internals/plugins/featurePlugins/useChartClosestPoint/index.d.ts +3 -0
  267. package/internals/plugins/featurePlugins/useChartClosestPoint/index.js +27 -0
  268. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.d.ts +3 -0
  269. package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.js → useChartClosestPoint/useChartClosestPoint.js} +11 -9
  270. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +5 -0
  271. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +9 -0
  272. package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.d.ts → useChartClosestPoint/useChartClosestPoint.types.d.ts} +8 -4
  273. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +16 -0
  274. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +41 -0
  275. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -0
  276. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +6 -1
  277. package/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.d.ts +3 -0
  278. package/internals/plugins/featurePlugins/useChartInteraction/checkHasInteractionPlugin.js +9 -0
  279. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +3 -0
  280. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +27 -0
  281. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.d.ts +3 -0
  282. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.d.ts +20 -0
  283. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.helpers.js +96 -0
  284. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +218 -0
  285. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +25 -0
  286. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +13 -0
  287. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +34 -0
  288. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.js +5 -0
  289. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +2 -2
  290. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +10 -8
  291. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.types.d.ts +2 -1
  292. package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +1 -1
  293. package/internals/scaleGuards.d.ts +11 -0
  294. package/internals/scaleGuards.js +17 -0
  295. package/locales/elGR.d.ts +96 -0
  296. package/locales/elGR.js +100 -0
  297. package/locales/enUS.d.ts +96 -0
  298. package/locales/enUS.js +99 -1
  299. package/locales/frFR.d.ts +96 -0
  300. package/locales/frFR.js +100 -2
  301. package/locales/ptBR.d.ts +96 -0
  302. package/locales/ptBR.js +100 -0
  303. package/locales/ptPT.d.ts +96 -0
  304. package/locales/ptPT.js +100 -0
  305. package/locales/svSE.d.ts +97 -1
  306. package/locales/svSE.js +100 -0
  307. package/locales/utils/chartsLocaleTextApi.d.ts +384 -0
  308. package/locales/utils/getChartsLocalization.d.ts +96 -0
  309. package/models/axis.d.ts +3 -0
  310. package/package.json +4 -4
  311. package/plugins/index.d.ts +6 -0
  312. package/plugins/index.js +47 -0
  313. package/esm/internals/isBandScale.d.ts +0 -5
  314. package/esm/internals/isBandScale.js +0 -3
  315. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js +0 -22
  316. package/esm/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +0 -3
  317. package/esm/internals/plugins/featurePlugins/useChartVoronoi/index.js +0 -2
  318. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.d.ts +0 -3
  319. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +0 -5
  320. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +0 -3
  321. package/internals/isBandScale.d.ts +0 -5
  322. package/internals/isBandScale.js +0 -9
  323. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js +0 -29
  324. package/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +0 -3
  325. package/internals/plugins/featurePlugins/useChartVoronoi/index.js +0 -27
  326. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.d.ts +0 -3
  327. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +0 -5
  328. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +0 -9
  329. /package/esm/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.js → useChartClosestPoint/useChartClosestPoint.types.js} +0 -0
  330. /package/internals/plugins/featurePlugins/{useChartVoronoi/useChartVoronoi.types.js → useChartClosestPoint/useChartClosestPoint.types.js} +0 -0
@@ -32,5 +32,389 @@ export interface ChartsLocaleText {
32
32
  * @returns {string} The localized string for an export image button.
33
33
  */
34
34
  toolbarExportImage: (mimeType: ChartImageExportMimeType | (string & {})) => string;
35
+ /**
36
+ * Label for the bar chart type.
37
+ */
38
+ chartTypeBar: string;
39
+ /**
40
+ * Label for the column chart type.
41
+ */
42
+ chartTypeColumn: string;
43
+ /**
44
+ * Label for the line chart type.
45
+ */
46
+ chartTypeLine: string;
47
+ /**
48
+ * Label for the area chart type.
49
+ */
50
+ chartTypeArea: string;
51
+ /**
52
+ * Label for the pie chart type.
53
+ */
54
+ chartTypePie: string;
55
+ /**
56
+ * Label for the color palette control.
57
+ */
58
+ chartPaletteLabel: string;
59
+ /**
60
+ * Label for the rainbow surge palette.
61
+ */
62
+ chartPaletteNameRainbowSurge: string;
63
+ /**
64
+ * Label for the blueberry twilight palette.
65
+ */
66
+ chartPaletteNameBlueberryTwilight: string;
67
+ /**
68
+ * Label for the mango fusion palette.
69
+ */
70
+ chartPaletteNameMangoFusion: string;
71
+ /**
72
+ * Label for the cheerful fiesta palette.
73
+ */
74
+ chartPaletteNameCheerfulFiesta: string;
75
+ /**
76
+ * Label for the strawberry sky palette.
77
+ */
78
+ chartPaletteNameStrawberrySky: string;
79
+ /**
80
+ * Label for the blue palette.
81
+ */
82
+ chartPaletteNameBlue: string;
83
+ /**
84
+ * Label for the green palette.
85
+ */
86
+ chartPaletteNameGreen: string;
87
+ /**
88
+ * Label for the purple palette.
89
+ */
90
+ chartPaletteNamePurple: string;
91
+ /**
92
+ * Label for the red palette.
93
+ */
94
+ chartPaletteNameRed: string;
95
+ /**
96
+ * Label for the orange palette.
97
+ */
98
+ chartPaletteNameOrange: string;
99
+ /**
100
+ * Label for the yellow palette.
101
+ */
102
+ chartPaletteNameYellow: string;
103
+ /**
104
+ * Label for the cyan palette.
105
+ */
106
+ chartPaletteNameCyan: string;
107
+ /**
108
+ * Label for the pink palette.
109
+ */
110
+ chartPaletteNamePink: string;
111
+ /**
112
+ * Label for the chart configuration section.
113
+ */
114
+ chartConfigurationSectionChart: string;
115
+ /**
116
+ * Label for the axes configuration section.
117
+ */
118
+ chartConfigurationSectionAxes: string;
119
+ /**
120
+ * Label for the tooltip configuration section.
121
+ */
122
+ chartConfigurationSectionTooltip: string;
123
+ /**
124
+ * Label for the legend configuration section.
125
+ */
126
+ chartConfigurationSectionLegend: string;
127
+ /**
128
+ * Label for the columns configuration section.
129
+ */
130
+ chartConfigurationSectionColumns: string;
131
+ /**
132
+ * Label for the bars configuration section.
133
+ */
134
+ chartConfigurationSectionBars: string;
135
+ /**
136
+ * Label for the lines configuration section.
137
+ */
138
+ chartConfigurationSectionLines: string;
139
+ /**
140
+ * Label for the areas configuration section.
141
+ */
142
+ chartConfigurationSectionAreas: string;
143
+ /**
144
+ * Label for the arcs configuration section.
145
+ */
146
+ chartConfigurationSectionArcs: string;
147
+ /**
148
+ * Label for the grid configuration control.
149
+ */
150
+ chartConfigurationGrid: string;
151
+ /**
152
+ * Label for the border radius configuration control.
153
+ */
154
+ chartConfigurationBorderRadius: string;
155
+ /**
156
+ * Label for the category gap ratio configuration control.
157
+ */
158
+ chartConfigurationCategoryGapRatio: string;
159
+ /**
160
+ * Label for the bar gap ratio configuration control.
161
+ */
162
+ chartConfigurationBarGapRatio: string;
163
+ /**
164
+ * Label for the stacked configuration control.
165
+ */
166
+ chartConfigurationStacked: string;
167
+ /**
168
+ * Label for the skip animation configuration control.
169
+ */
170
+ chartConfigurationShowToolbar: string;
171
+ /**
172
+ * Label for the skip animation configuration control.
173
+ */
174
+ chartConfigurationSkipAnimation: string;
175
+ /**
176
+ * Label for the inner radius configuration control.
177
+ */
178
+ chartConfigurationInnerRadius: string;
179
+ /**
180
+ * Label for the outer radius configuration control.
181
+ */
182
+ chartConfigurationOuterRadius: string;
183
+ /**
184
+ * Label for the colors configuration control.
185
+ */
186
+ chartConfigurationColors: string;
187
+ /**
188
+ * Label for the hide legend configuration control.
189
+ */
190
+ chartConfigurationHideLegend: string;
191
+ /**
192
+ * Label for the show mark configuration control.
193
+ */
194
+ chartConfigurationShowMark: string;
195
+ /**
196
+ * Label for the height configuration control.
197
+ */
198
+ chartConfigurationHeight: string;
199
+ /**
200
+ * Label for the width configuration control.
201
+ */
202
+ chartConfigurationWidth: string;
203
+ /**
204
+ * Label for the series gap configuration control.
205
+ */
206
+ chartConfigurationSeriesGap: string;
207
+ /**
208
+ * Label for the tick placement configuration control.
209
+ */
210
+ chartConfigurationTickPlacement: string;
211
+ /**
212
+ * Label for the tick label placement configuration control.
213
+ */
214
+ chartConfigurationTickLabelPlacement: string;
215
+ /**
216
+ * Label for the categories axis label configuration control.
217
+ */
218
+ chartConfigurationCategoriesAxisLabel: string;
219
+ /**
220
+ * Label for the series axis label configuration control.
221
+ */
222
+ chartConfigurationSeriesAxisLabel: string;
223
+ /**
224
+ * Label for the X-axis position configuration control.
225
+ */
226
+ chartConfigurationXAxisPosition: string;
227
+ /**
228
+ * Label for the Y-axis position configuration control.
229
+ */
230
+ chartConfigurationYAxisPosition: string;
231
+ /**
232
+ * Label for the reverse series axis configuration control.
233
+ */
234
+ chartConfigurationSeriesAxisReverse: string;
235
+ /**
236
+ * Label for the tooltip placement configuration control.
237
+ */
238
+ chartConfigurationTooltipPlacement: string;
239
+ /**
240
+ * Label for the tooltip trigger configuration control.
241
+ */
242
+ chartConfigurationTooltipTrigger: string;
243
+ /**
244
+ * Label for the legend position configuration control.
245
+ */
246
+ chartConfigurationLegendPosition: string;
247
+ /**
248
+ * Label for the legend direction configuration control.
249
+ */
250
+ chartConfigurationLegendDirection: string;
251
+ /**
252
+ * Label for the bar labels configuration control.
253
+ */
254
+ chartConfigurationBarLabels: string;
255
+ /**
256
+ * Label for the column labels configuration control.
257
+ */
258
+ chartConfigurationColumnLabels: string;
259
+ /**
260
+ * Label for the interpolation configuration control.
261
+ */
262
+ chartConfigurationInterpolation: string;
263
+ /**
264
+ * Label for the padding angle configuration control.
265
+ */
266
+ chartConfigurationPaddingAngle: string;
267
+ /**
268
+ * Label for the corner radius configuration control.
269
+ */
270
+ chartConfigurationCornerRadius: string;
271
+ /**
272
+ * Label for the arc labels configuration control.
273
+ */
274
+ chartConfigurationArcLabels: string;
275
+ /**
276
+ * Label for the start angle configuration control.
277
+ */
278
+ chartConfigurationStartAngle: string;
279
+ /**
280
+ * Label for the end angle configuration control.
281
+ */
282
+ chartConfigurationEndAngle: string;
283
+ /**
284
+ * Label for the pie tooltip trigger configuration control.
285
+ */
286
+ chartConfigurationPieTooltipTrigger: string;
287
+ /**
288
+ * Label for the pie legend position configuration control.
289
+ */
290
+ chartConfigurationPieLegendPosition: string;
291
+ /**
292
+ * Label for the pie legend direction configuration control.
293
+ */
294
+ chartConfigurationPieLegendDirection: string;
295
+ /**
296
+ * Label for the "None" option.
297
+ */
298
+ chartConfigurationOptionNone: string;
299
+ /**
300
+ * Label for the "Value" option.
301
+ */
302
+ chartConfigurationOptionValue: string;
303
+ /**
304
+ * Label for the "Auto" option.
305
+ */
306
+ chartConfigurationOptionAuto: string;
307
+ /**
308
+ * Label for the "Top" option.
309
+ */
310
+ chartConfigurationOptionTop: string;
311
+ /**
312
+ * Label for the "Top Left" option.
313
+ */
314
+ chartConfigurationOptionTopLeft: string;
315
+ /**
316
+ * Label for the "Top Right" option.
317
+ */
318
+ chartConfigurationOptionTopRight: string;
319
+ /**
320
+ * Label for the "Bottom" option.
321
+ */
322
+ chartConfigurationOptionBottom: string;
323
+ /**
324
+ * Label for the "Bottom Left" option.
325
+ */
326
+ chartConfigurationOptionBottomLeft: string;
327
+ /**
328
+ * Label for the "Bottom Right" option.
329
+ */
330
+ chartConfigurationOptionBottomRight: string;
331
+ /**
332
+ * Label for the "Left" option.
333
+ */
334
+ chartConfigurationOptionLeft: string;
335
+ /**
336
+ * Label for the "Right" option.
337
+ */
338
+ chartConfigurationOptionRight: string;
339
+ /**
340
+ * Label for the "Axis" option.
341
+ */
342
+ chartConfigurationOptionAxis: string;
343
+ /**
344
+ * Label for the "Item" option.
345
+ */
346
+ chartConfigurationOptionItem: string;
347
+ /**
348
+ * Label for the "Horizontal" option.
349
+ */
350
+ chartConfigurationOptionHorizontal: string;
351
+ /**
352
+ * Label for the "Vertical" option.
353
+ */
354
+ chartConfigurationOptionVertical: string;
355
+ /**
356
+ * Label for the "Both" grid configuration option.
357
+ */
358
+ chartConfigurationOptionBoth: string;
359
+ /**
360
+ * Label for the "Start" option.
361
+ */
362
+ chartConfigurationOptionStart: string;
363
+ /**
364
+ * Label for the "Middle" option.
365
+ */
366
+ chartConfigurationOptionMiddle: string;
367
+ /**
368
+ * Label for the "End" option.
369
+ */
370
+ chartConfigurationOptionEnd: string;
371
+ /**
372
+ * Label for the "Extremities" option.
373
+ */
374
+ chartConfigurationOptionExtremities: string;
375
+ /**
376
+ * Label for the "Tick" option.
377
+ */
378
+ chartConfigurationOptionTick: string;
379
+ /**
380
+ * Label for the "Monotone X" interpolation option.
381
+ */
382
+ chartConfigurationOptionMonotoneX: string;
383
+ /**
384
+ * Label for the "Monotone Y" interpolation option.
385
+ */
386
+ chartConfigurationOptionMonotoneY: string;
387
+ /**
388
+ * Label for the "Catmull-Rom" interpolation option.
389
+ */
390
+ chartConfigurationOptionCatmullRom: string;
391
+ /**
392
+ * Label for the "Linear" interpolation option.
393
+ */
394
+ chartConfigurationOptionLinear: string;
395
+ /**
396
+ * Label for the "Natural" interpolation option.
397
+ */
398
+ chartConfigurationOptionNatural: string;
399
+ /**
400
+ * Label for the "Step" interpolation option.
401
+ */
402
+ chartConfigurationOptionStep: string;
403
+ /**
404
+ * Label for the "Step Before" interpolation option.
405
+ */
406
+ chartConfigurationOptionStepBefore: string;
407
+ /**
408
+ * Label for the "Step After" interpolation option.
409
+ */
410
+ chartConfigurationOptionStepAfter: string;
411
+ /**
412
+ * Label for the "Bump X" interpolation option.
413
+ */
414
+ chartConfigurationOptionBumpX: string;
415
+ /**
416
+ * Label for the "Bump Y" interpolation option.
417
+ */
418
+ chartConfigurationOptionBumpY: string;
35
419
  }
36
420
  export type ChartsTranslationKeys = keyof ChartsLocaleText;
@@ -16,6 +16,102 @@ export declare const getChartsLocalization: (chartsTranslations: Partial<ChartsL
16
16
  toolbarExport?: string | undefined;
17
17
  toolbarExportPrint?: string | undefined;
18
18
  toolbarExportImage?: ((mimeType: import("./imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
19
+ chartTypeBar?: string | undefined;
20
+ chartTypeColumn?: string | undefined;
21
+ chartTypeLine?: string | undefined;
22
+ chartTypeArea?: string | undefined;
23
+ chartTypePie?: string | undefined;
24
+ chartPaletteLabel?: string | undefined;
25
+ chartPaletteNameRainbowSurge?: string | undefined;
26
+ chartPaletteNameBlueberryTwilight?: string | undefined;
27
+ chartPaletteNameMangoFusion?: string | undefined;
28
+ chartPaletteNameCheerfulFiesta?: string | undefined;
29
+ chartPaletteNameStrawberrySky?: string | undefined;
30
+ chartPaletteNameBlue?: string | undefined;
31
+ chartPaletteNameGreen?: string | undefined;
32
+ chartPaletteNamePurple?: string | undefined;
33
+ chartPaletteNameRed?: string | undefined;
34
+ chartPaletteNameOrange?: string | undefined;
35
+ chartPaletteNameYellow?: string | undefined;
36
+ chartPaletteNameCyan?: string | undefined;
37
+ chartPaletteNamePink?: string | undefined;
38
+ chartConfigurationSectionChart?: string | undefined;
39
+ chartConfigurationSectionAxes?: string | undefined;
40
+ chartConfigurationSectionTooltip?: string | undefined;
41
+ chartConfigurationSectionLegend?: string | undefined;
42
+ chartConfigurationSectionColumns?: string | undefined;
43
+ chartConfigurationSectionBars?: string | undefined;
44
+ chartConfigurationSectionLines?: string | undefined;
45
+ chartConfigurationSectionAreas?: string | undefined;
46
+ chartConfigurationSectionArcs?: string | undefined;
47
+ chartConfigurationGrid?: string | undefined;
48
+ chartConfigurationBorderRadius?: string | undefined;
49
+ chartConfigurationCategoryGapRatio?: string | undefined;
50
+ chartConfigurationBarGapRatio?: string | undefined;
51
+ chartConfigurationStacked?: string | undefined;
52
+ chartConfigurationShowToolbar?: string | undefined;
53
+ chartConfigurationSkipAnimation?: string | undefined;
54
+ chartConfigurationInnerRadius?: string | undefined;
55
+ chartConfigurationOuterRadius?: string | undefined;
56
+ chartConfigurationColors?: string | undefined;
57
+ chartConfigurationHideLegend?: string | undefined;
58
+ chartConfigurationShowMark?: string | undefined;
59
+ chartConfigurationHeight?: string | undefined;
60
+ chartConfigurationWidth?: string | undefined;
61
+ chartConfigurationSeriesGap?: string | undefined;
62
+ chartConfigurationTickPlacement?: string | undefined;
63
+ chartConfigurationTickLabelPlacement?: string | undefined;
64
+ chartConfigurationCategoriesAxisLabel?: string | undefined;
65
+ chartConfigurationSeriesAxisLabel?: string | undefined;
66
+ chartConfigurationXAxisPosition?: string | undefined;
67
+ chartConfigurationYAxisPosition?: string | undefined;
68
+ chartConfigurationSeriesAxisReverse?: string | undefined;
69
+ chartConfigurationTooltipPlacement?: string | undefined;
70
+ chartConfigurationTooltipTrigger?: string | undefined;
71
+ chartConfigurationLegendPosition?: string | undefined;
72
+ chartConfigurationLegendDirection?: string | undefined;
73
+ chartConfigurationBarLabels?: string | undefined;
74
+ chartConfigurationColumnLabels?: string | undefined;
75
+ chartConfigurationInterpolation?: string | undefined;
76
+ chartConfigurationPaddingAngle?: string | undefined;
77
+ chartConfigurationCornerRadius?: string | undefined;
78
+ chartConfigurationArcLabels?: string | undefined;
79
+ chartConfigurationStartAngle?: string | undefined;
80
+ chartConfigurationEndAngle?: string | undefined;
81
+ chartConfigurationPieTooltipTrigger?: string | undefined;
82
+ chartConfigurationPieLegendPosition?: string | undefined;
83
+ chartConfigurationPieLegendDirection?: string | undefined;
84
+ chartConfigurationOptionNone?: string | undefined;
85
+ chartConfigurationOptionValue?: string | undefined;
86
+ chartConfigurationOptionAuto?: string | undefined;
87
+ chartConfigurationOptionTop?: string | undefined;
88
+ chartConfigurationOptionTopLeft?: string | undefined;
89
+ chartConfigurationOptionTopRight?: string | undefined;
90
+ chartConfigurationOptionBottom?: string | undefined;
91
+ chartConfigurationOptionBottomLeft?: string | undefined;
92
+ chartConfigurationOptionBottomRight?: string | undefined;
93
+ chartConfigurationOptionLeft?: string | undefined;
94
+ chartConfigurationOptionRight?: string | undefined;
95
+ chartConfigurationOptionAxis?: string | undefined;
96
+ chartConfigurationOptionItem?: string | undefined;
97
+ chartConfigurationOptionHorizontal?: string | undefined;
98
+ chartConfigurationOptionVertical?: string | undefined;
99
+ chartConfigurationOptionBoth?: string | undefined;
100
+ chartConfigurationOptionStart?: string | undefined;
101
+ chartConfigurationOptionMiddle?: string | undefined;
102
+ chartConfigurationOptionEnd?: string | undefined;
103
+ chartConfigurationOptionExtremities?: string | undefined;
104
+ chartConfigurationOptionTick?: string | undefined;
105
+ chartConfigurationOptionMonotoneX?: string | undefined;
106
+ chartConfigurationOptionMonotoneY?: string | undefined;
107
+ chartConfigurationOptionCatmullRom?: string | undefined;
108
+ chartConfigurationOptionLinear?: string | undefined;
109
+ chartConfigurationOptionNatural?: string | undefined;
110
+ chartConfigurationOptionStep?: string | undefined;
111
+ chartConfigurationOptionStepBefore?: string | undefined;
112
+ chartConfigurationOptionStepAfter?: string | undefined;
113
+ chartConfigurationOptionBumpX?: string | undefined;
114
+ chartConfigurationOptionBumpY?: string | undefined;
19
115
  };
20
116
  };
21
117
  };
@@ -11,6 +11,9 @@ export type D3Scale<Domain extends {
11
11
  toString(): string;
12
12
  } = number | Date | string, Range = number, Output = number> = ScaleBand<Domain> | ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePoint<Domain> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
13
13
  export type D3ContinuousScale<Range = number, Output = number> = ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
14
+ export type D3OrdinalScale<Domain extends {
15
+ toString(): string;
16
+ } = number | Date | string> = ScaleBand<Domain> | ScalePoint<Domain>;
14
17
  export interface ChartsAxisSlots {
15
18
  /**
16
19
  * Custom component for the axis main line.
@@ -0,0 +1,6 @@
1
+ export { useChartCartesianAxis, type UseChartCartesianAxisSignature } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
2
+ export { useChartHighlight, type UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
3
+ export { useChartInteraction, type UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
4
+ export { useChartPolarAxis, type UseChartPolarAxisSignature } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
5
+ export { useChartClosestPoint, type UseChartClosestPointSignature } from "../internals/plugins/featurePlugins/useChartClosestPoint/index.js";
6
+ export { useChartZAxis, type UseChartZAxisSignature } from "../internals/plugins/featurePlugins/useChartZAxis/index.js";
@@ -0,0 +1,12 @@
1
+ // Core plugins
2
+
3
+ // We don't export the core plugins since they are run in the useCharts() in any case.
4
+ // Plus there is a naming conflict with `useChartId()`: The plugin managing chart id, or the hook used to retrieve this same id.
5
+
6
+ // Feature plugins
7
+ export { useChartCartesianAxis } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
8
+ export { useChartHighlight } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
9
+ export { useChartInteraction } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
10
+ export { useChartPolarAxis } from "../internals/plugins/featurePlugins/useChartPolarAxis/index.js";
11
+ export { useChartClosestPoint } from "../internals/plugins/featurePlugins/useChartClosestPoint/index.js";
12
+ export { useChartZAxis } from "../internals/plugins/featurePlugins/useChartZAxis/index.js";
@@ -1,4 +1,4 @@
1
- import { AxisId, ChartsRadiusAxisProps, ChartsRotationAxisProps, PolarAxisDefaultized, ScaleName } from "../models/axis.js";
1
+ import { AxisId, ChartsRadiusAxisProps, ChartsRotationAxisProps, PolarAxisDefaultized, ScaleName, type AxisScaleConfig, type ChartsXAxisProps, type ChartsYAxisProps, type ComputedAxis } from "../models/axis.js";
2
2
  /**
3
3
  * Get all the x-axes.
4
4
  *
@@ -10,7 +10,7 @@ import { AxisId, ChartsRadiusAxisProps, ChartsRotationAxisProps, PolarAxisDefaul
10
10
  * @returns `{ xAxis, xAxisIds }` - The x-axes and their IDs.
11
11
  */
12
12
  export declare function useXAxes(): {
13
- xAxis: import("../internals/index.js").ComputedAxisConfig<import("../index.js").ChartsXAxisProps>;
13
+ xAxis: import("../internals/index.js").ComputedAxisConfig<ChartsXAxisProps>;
14
14
  xAxisIds: AxisId[];
15
15
  };
16
16
  /**
@@ -24,7 +24,7 @@ export declare function useXAxes(): {
24
24
  * @returns `{ yAxis, yAxisIds }` - The y-axes and their IDs.
25
25
  */
26
26
  export declare function useYAxes(): {
27
- yAxis: import("../internals/index.js").ComputedAxisConfig<import("../index.js").ChartsYAxisProps>;
27
+ yAxis: import("../internals/index.js").ComputedAxisConfig<ChartsYAxisProps>;
28
28
  yAxisIds: AxisId[];
29
29
  };
30
30
  /**
@@ -32,13 +32,13 @@ export declare function useYAxes(): {
32
32
  * @param {AxisId | undefined} axisId - If provided returns the x axis with axisId, else returns the values for the default x axis.
33
33
  * @returns The X axis.
34
34
  */
35
- export declare function useXAxis(axisId?: AxisId): import("../internals/index.js").ComputedAxis<keyof import("../internals/index.js").AxisScaleConfig, any, import("../index.js").ChartsXAxisProps>;
35
+ export declare function useXAxis<T extends keyof AxisScaleConfig>(axisId?: AxisId): ComputedAxis<T, any, ChartsXAxisProps>;
36
36
  /**
37
37
  * Get the Y axis.
38
38
  * @param {AxisId | undefined} axisId - If provided returns the y axis with axisId, else returns the values for the default y axis.
39
39
  * @returns The Y axis.
40
40
  */
41
- export declare function useYAxis(axisId?: AxisId): import("../internals/index.js").ComputedAxis<keyof import("../internals/index.js").AxisScaleConfig, any, import("../index.js").ChartsYAxisProps>;
41
+ export declare function useYAxis<T extends keyof AxisScaleConfig>(axisId?: AxisId): ComputedAxis<T, any, ChartsYAxisProps>;
42
42
  export declare function useRotationAxes(): {
43
43
  rotationAxis: import("../internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js").DefaultizedAxisConfig<ChartsRotationAxisProps>;
44
44
  rotationAxisIds: string[];
@@ -1,9 +1,27 @@
1
1
  export type ChartDrawingArea = {
2
- top: number;
2
+ /**
3
+ * The gap between the left border of the SVG and the drawing area.
4
+ */
3
5
  left: number;
4
- right: number;
6
+ /**
7
+ * The gap between the top border of the SVG and the drawing area.
8
+ */
9
+ top: number;
10
+ /**
11
+ * The gap between the bottom border of the SVG and the drawing area.
12
+ */
5
13
  bottom: number;
14
+ /**
15
+ * The gap between the right border of the SVG and the drawing area.
16
+ */
17
+ right: number;
18
+ /**
19
+ * The width of the drawing area.
20
+ */
6
21
  width: number;
22
+ /**
23
+ * The height of the drawing area.
24
+ */
7
25
  height: number;
8
26
  };
9
27
  /**
@@ -0,0 +1,15 @@
1
+ import { ChartSeriesType } from "../models/seriesType/config.js";
2
+ import { SeriesId } from "../models/seriesType/common.js";
3
+ export type FocusedItemData = {
4
+ seriesType: ChartSeriesType;
5
+ seriesId: SeriesId;
6
+ dataIndex: number;
7
+ };
8
+ /**
9
+ * Get the focused item from keyboard navigation.
10
+ */
11
+ export declare function useFocusedItem(): {
12
+ seriesType: keyof import("../internals/index.js").ChartsSeriesConfig;
13
+ seriesId: SeriesId;
14
+ dataIndex: number;
15
+ } | null;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useFocusedItem = useFocusedItem;
9
+ var React = _interopRequireWildcard(require("react"));
10
+ var _useStore = require("../internals/store/useStore");
11
+ var _useSelector = require("../internals/store/useSelector");
12
+ var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
13
+ /**
14
+ * Get the focused item from keyboard navigation.
15
+ */
16
+ function useFocusedItem() {
17
+ const store = (0, _useStore.useStore)();
18
+ const focusedSeriesType = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsFocusedSeriesType);
19
+ const focusedSeriesId = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsFocusedSeriesId);
20
+ const focusedDataIndex = (0, _useSelector.useSelector)(store, _useChartKeyboardNavigation.selectorChartsFocusedDataIndex);
21
+ return React.useMemo(() => focusedSeriesType === undefined || focusedSeriesId === undefined || focusedDataIndex === undefined ? null : {
22
+ seriesType: focusedSeriesType,
23
+ seriesId: focusedSeriesId,
24
+ dataIndex: focusedDataIndex
25
+ }, [focusedSeriesType, focusedSeriesId, focusedDataIndex]);
26
+ }
@@ -0,0 +1,12 @@
1
+ import { FocusedItemData } from "./useFocusedItem.js";
2
+ type UseItemFocusedParams = FocusedItemData;
3
+ /**
4
+ * A hook to check if an item has the focus.
5
+ *
6
+ * If you need to process multiple points, use the `useIsItemFocusedGetter` hook instead.
7
+ *
8
+ * @param {FocusedItemData} item is the item to check
9
+ * @returns {boolean} the focus state
10
+ */
11
+ export declare function useIsItemFocused(item: UseItemFocusedParams): boolean;
12
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useIsItemFocused = useIsItemFocused;
8
+ var _useFocusedItem = require("./useFocusedItem");
9
+ /**
10
+ * A hook to check if an item has the focus.
11
+ *
12
+ * If you need to process multiple points, use the `useIsItemFocusedGetter` hook instead.
13
+ *
14
+ * @param {FocusedItemData} item is the item to check
15
+ * @returns {boolean} the focus state
16
+ */
17
+ function useIsItemFocused(item) {
18
+ const focusedItem = (0, _useFocusedItem.useFocusedItem)();
19
+ return focusedItem !== null && focusedItem.seriesType === item.seriesType && focusedItem.seriesId === item.seriesId && focusedItem.dataIndex === item.dataIndex;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { FocusedItemData } from "./useFocusedItem.js";
2
+ /**
3
+ * A hook to check focus state of multiple items.
4
+ * If you're interested by a single one, consider using `useIsItemFocused`.
5
+ *
6
+ * @returns {(item: FocusedItemData) => boolean} callback to get the state of the item.
7
+ */
8
+ export declare function useIsItemFocusedGetter(): (item: FocusedItemData) => boolean;