@mui/x-charts 8.16.0 → 8.18.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 (485) hide show
  1. package/BarChart/AnimatedBarElement.d.ts +1 -1
  2. package/BarChart/BarChart.js +1 -0
  3. package/BarChart/BarClipPath.d.ts +1 -1
  4. package/BarChart/BarElement.d.ts +1 -1
  5. package/BarChart/BarElement.js +6 -8
  6. package/BarChart/BarLabel/BarLabel.d.ts +6 -0
  7. package/BarChart/BarLabel/BarLabel.js +41 -4
  8. package/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
  9. package/BarChart/BarLabel/BarLabelItem.js +4 -2
  10. package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
  11. package/BarChart/BarLabel/BarLabelPlot.js +42 -38
  12. package/BarChart/BarPlot.d.ts +13 -3
  13. package/BarChart/BarPlot.js +8 -3
  14. package/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
  15. package/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
  16. package/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
  17. package/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
  18. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
  19. package/BarChart/seriesConfig/bar/legend.d.ts +3 -0
  20. package/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
  21. package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
  22. package/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
  23. package/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
  24. package/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
  25. package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
  26. package/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
  27. package/BarChart/seriesConfig/index.d.ts +1 -1
  28. package/BarChart/seriesConfig/index.js +9 -9
  29. package/BarChart/types.d.ts +2 -0
  30. package/BarChart/useBarPlotData.js +5 -3
  31. package/CHANGELOG.md +208 -1
  32. package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  33. package/ChartsAxis/ChartsAxis.d.ts +1 -2
  34. package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
  35. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
  36. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
  37. package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
  38. package/ChartsClipPath/ChartsClipPath.d.ts +1 -2
  39. package/ChartsClipPath/ChartsClipPath.js +0 -2
  40. package/ChartsGrid/ChartsGrid.d.ts +1 -2
  41. package/ChartsGrid/ChartsGrid.js +0 -2
  42. package/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
  43. package/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
  44. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  45. package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
  46. package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
  47. package/ChartsOverlay/ChartsLoadingOverlay.js +0 -2
  48. package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
  49. package/ChartsOverlay/ChartsNoDataOverlay.js +0 -2
  50. package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
  51. package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
  52. package/ChartsReferenceLine/ChartsReferenceLine.js +0 -2
  53. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
  54. package/ChartsReferenceLine/ChartsXReferenceLine.js +0 -2
  55. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
  56. package/ChartsReferenceLine/ChartsYReferenceLine.js +0 -2
  57. package/ChartsSurface/ChartsSurface.js +8 -9
  58. package/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
  59. package/ChartsSurface/chartsSurfaceClasses.js +21 -0
  60. package/ChartsSurface/index.d.ts +2 -1
  61. package/ChartsSurface/index.js +12 -1
  62. package/ChartsText/ChartsText.d.ts +1 -1
  63. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
  64. package/ChartsTooltip/ChartsAxisTooltipContent.js +0 -2
  65. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
  66. package/ChartsTooltip/ChartsItemTooltipContent.js +0 -2
  67. package/ChartsTooltip/ChartsTooltip.d.ts +1 -2
  68. package/ChartsTooltip/ChartsTooltip.js +0 -2
  69. package/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
  70. package/ChartsTooltip/ChartsTooltipContainer.js +13 -14
  71. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  72. package/ChartsWrapper/ChartsWrapper.d.ts +1 -1
  73. package/ChartsWrapper/ChartsWrapper.js +3 -5
  74. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
  75. package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
  76. package/ChartsXAxis/ChartsXAxis.d.ts +1 -2
  77. package/ChartsXAxis/ChartsXAxis.js +0 -2
  78. package/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
  79. package/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
  80. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
  81. package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
  82. package/ChartsYAxis/ChartsYAxis.d.ts +1 -2
  83. package/ChartsYAxis/ChartsYAxis.js +0 -2
  84. package/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
  85. package/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
  86. package/Gauge/GaugeProvider.d.ts +1 -1
  87. package/Gauge/GaugeReferenceArc.d.ts +1 -1
  88. package/Gauge/GaugeValueArc.d.ts +1 -1
  89. package/Gauge/GaugeValueText.d.ts +1 -2
  90. package/Gauge/GaugeValueText.js +0 -2
  91. package/LineChart/AnimatedArea.d.ts +1 -1
  92. package/LineChart/AppearingMask.d.ts +1 -1
  93. package/LineChart/AreaElement.d.ts +1 -1
  94. package/LineChart/AreaPlot.d.ts +1 -1
  95. package/LineChart/CircleMarkElement.d.ts +1 -1
  96. package/LineChart/FocusedMark.d.ts +1 -2
  97. package/LineChart/FocusedMark.js +0 -2
  98. package/LineChart/LineElement.d.ts +1 -1
  99. package/LineChart/LineHighlightElement.d.ts +1 -1
  100. package/LineChart/LineHighlightPlot.d.ts +1 -1
  101. package/LineChart/LinePlot.d.ts +1 -1
  102. package/LineChart/MarkElement.d.ts +1 -1
  103. package/LineChart/MarkPlot.d.ts +1 -1
  104. package/LineChart/seriesConfig/getColor.js +28 -5
  105. package/LineChart/seriesConfig/index.d.ts +1 -1
  106. package/LineChart/seriesConfig/index.js +2 -2
  107. package/PieChart/PieArcLabelPlot.d.ts +1 -1
  108. package/PieChart/PieArcPlot.d.ts +1 -1
  109. package/PieChart/PiePlot.d.ts +1 -2
  110. package/PieChart/PiePlot.js +0 -2
  111. package/PieChart/seriesConfig/index.d.ts +1 -1
  112. package/PieChart/seriesConfig/index.js +2 -2
  113. package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  114. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  115. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
  116. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -3
  117. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
  118. package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
  119. package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
  120. package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
  121. package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
  122. package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
  123. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
  124. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
  125. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
  126. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
  127. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
  128. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -3
  129. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
  130. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
  131. package/RadarChart/seriesConfig/getColor.js +12 -1
  132. package/ScatterChart/BatchScatter.d.ts +1 -2
  133. package/ScatterChart/BatchScatter.js +4 -4
  134. package/ScatterChart/Scatter.d.ts +7 -2
  135. package/ScatterChart/Scatter.js +7 -3
  136. package/ScatterChart/ScatterMarker.d.ts +1 -1
  137. package/ScatterChart/ScatterPlot.d.ts +1 -1
  138. package/ScatterChart/ScatterPlot.js +1 -1
  139. package/ScatterChart/seriesConfig/getColor.js +36 -7
  140. package/ScatterChart/seriesConfig/index.d.ts +1 -1
  141. package/ScatterChart/seriesConfig/index.js +2 -2
  142. package/context/ChartProvider/ChartProvider.d.ts +1 -1
  143. package/context/ChartProvider/ChartProvider.js +4 -4
  144. package/context/ChartProvider/ChartProvider.types.d.ts +3 -3
  145. package/context/ChartsSlotsContext.d.ts +1 -1
  146. package/esm/BarChart/AnimatedBarElement.d.ts +1 -1
  147. package/esm/BarChart/BarChart.js +1 -0
  148. package/esm/BarChart/BarClipPath.d.ts +1 -1
  149. package/esm/BarChart/BarElement.d.ts +1 -1
  150. package/esm/BarChart/BarElement.js +6 -8
  151. package/esm/BarChart/BarLabel/BarLabel.d.ts +6 -0
  152. package/esm/BarChart/BarLabel/BarLabel.js +41 -4
  153. package/esm/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
  154. package/esm/BarChart/BarLabel/BarLabelItem.js +4 -2
  155. package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
  156. package/esm/BarChart/BarLabel/BarLabelPlot.js +42 -37
  157. package/esm/BarChart/BarPlot.d.ts +13 -3
  158. package/esm/BarChart/BarPlot.js +8 -3
  159. package/esm/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
  160. package/esm/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
  161. package/esm/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
  162. package/esm/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
  163. package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
  164. package/esm/BarChart/seriesConfig/bar/legend.d.ts +3 -0
  165. package/esm/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
  166. package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
  167. package/esm/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
  168. package/esm/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
  169. package/esm/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
  170. package/esm/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
  171. package/esm/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
  172. package/esm/BarChart/seriesConfig/index.d.ts +1 -1
  173. package/esm/BarChart/seriesConfig/index.js +8 -8
  174. package/esm/BarChart/types.d.ts +2 -0
  175. package/esm/BarChart/useBarPlotData.js +5 -3
  176. package/esm/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  177. package/esm/ChartsAxis/ChartsAxis.d.ts +1 -2
  178. package/esm/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
  179. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
  180. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
  181. package/esm/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
  182. package/esm/ChartsClipPath/ChartsClipPath.d.ts +1 -2
  183. package/esm/ChartsClipPath/ChartsClipPath.js +0 -1
  184. package/esm/ChartsGrid/ChartsGrid.d.ts +1 -2
  185. package/esm/ChartsGrid/ChartsGrid.js +0 -1
  186. package/esm/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
  187. package/esm/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
  188. package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  189. package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
  190. package/esm/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
  191. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +0 -1
  192. package/esm/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
  193. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +0 -1
  194. package/esm/ChartsOverlay/ChartsOverlay.d.ts +1 -1
  195. package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
  196. package/esm/ChartsReferenceLine/ChartsReferenceLine.js +0 -1
  197. package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
  198. package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +0 -1
  199. package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
  200. package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +0 -1
  201. package/esm/ChartsSurface/ChartsSurface.js +9 -10
  202. package/esm/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
  203. package/esm/ChartsSurface/chartsSurfaceClasses.js +13 -0
  204. package/esm/ChartsSurface/index.d.ts +2 -1
  205. package/esm/ChartsSurface/index.js +2 -1
  206. package/esm/ChartsText/ChartsText.d.ts +1 -1
  207. package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
  208. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
  209. package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
  210. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
  211. package/esm/ChartsTooltip/ChartsTooltip.d.ts +1 -2
  212. package/esm/ChartsTooltip/ChartsTooltip.js +0 -1
  213. package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
  214. package/esm/ChartsTooltip/ChartsTooltipContainer.js +13 -14
  215. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  216. package/esm/ChartsWrapper/ChartsWrapper.d.ts +1 -1
  217. package/esm/ChartsWrapper/ChartsWrapper.js +4 -6
  218. package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
  219. package/esm/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
  220. package/esm/ChartsXAxis/ChartsXAxis.d.ts +1 -2
  221. package/esm/ChartsXAxis/ChartsXAxis.js +0 -1
  222. package/esm/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
  223. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
  224. package/esm/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
  225. package/esm/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
  226. package/esm/ChartsYAxis/ChartsYAxis.d.ts +1 -2
  227. package/esm/ChartsYAxis/ChartsYAxis.js +0 -1
  228. package/esm/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
  229. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
  230. package/esm/Gauge/GaugeProvider.d.ts +1 -1
  231. package/esm/Gauge/GaugeReferenceArc.d.ts +1 -1
  232. package/esm/Gauge/GaugeValueArc.d.ts +1 -1
  233. package/esm/Gauge/GaugeValueText.d.ts +1 -2
  234. package/esm/Gauge/GaugeValueText.js +0 -1
  235. package/esm/LineChart/AnimatedArea.d.ts +1 -1
  236. package/esm/LineChart/AppearingMask.d.ts +1 -1
  237. package/esm/LineChart/AreaElement.d.ts +1 -1
  238. package/esm/LineChart/AreaPlot.d.ts +1 -1
  239. package/esm/LineChart/CircleMarkElement.d.ts +1 -1
  240. package/esm/LineChart/FocusedMark.d.ts +1 -2
  241. package/esm/LineChart/FocusedMark.js +0 -1
  242. package/esm/LineChart/LineElement.d.ts +1 -1
  243. package/esm/LineChart/LineHighlightElement.d.ts +1 -1
  244. package/esm/LineChart/LineHighlightPlot.d.ts +1 -1
  245. package/esm/LineChart/LinePlot.d.ts +1 -1
  246. package/esm/LineChart/MarkElement.d.ts +1 -1
  247. package/esm/LineChart/MarkPlot.d.ts +1 -1
  248. package/esm/LineChart/seriesConfig/getColor.js +28 -5
  249. package/esm/LineChart/seriesConfig/index.d.ts +1 -1
  250. package/esm/LineChart/seriesConfig/index.js +1 -1
  251. package/esm/PieChart/PieArcLabelPlot.d.ts +1 -1
  252. package/esm/PieChart/PieArcPlot.d.ts +1 -1
  253. package/esm/PieChart/PiePlot.d.ts +1 -2
  254. package/esm/PieChart/PiePlot.js +0 -1
  255. package/esm/PieChart/seriesConfig/index.d.ts +1 -1
  256. package/esm/PieChart/seriesConfig/index.js +1 -1
  257. package/esm/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  258. package/esm/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  259. package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
  260. package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -2
  261. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
  262. package/esm/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
  263. package/esm/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
  264. package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
  265. package/esm/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
  266. package/esm/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
  267. package/esm/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
  268. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
  269. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
  270. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
  271. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
  272. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -2
  273. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
  274. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
  275. package/esm/RadarChart/seriesConfig/getColor.js +12 -1
  276. package/esm/ScatterChart/BatchScatter.d.ts +1 -2
  277. package/esm/ScatterChart/BatchScatter.js +4 -4
  278. package/esm/ScatterChart/Scatter.d.ts +7 -2
  279. package/esm/ScatterChart/Scatter.js +7 -3
  280. package/esm/ScatterChart/ScatterMarker.d.ts +1 -1
  281. package/esm/ScatterChart/ScatterPlot.d.ts +1 -1
  282. package/esm/ScatterChart/ScatterPlot.js +1 -1
  283. package/esm/ScatterChart/seriesConfig/getColor.js +36 -7
  284. package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
  285. package/esm/ScatterChart/seriesConfig/index.js +1 -1
  286. package/esm/context/ChartProvider/ChartProvider.d.ts +1 -1
  287. package/esm/context/ChartProvider/ChartProvider.js +4 -4
  288. package/esm/context/ChartProvider/ChartProvider.types.d.ts +3 -3
  289. package/esm/context/ChartsSlotsContext.d.ts +1 -1
  290. package/esm/hooks/animation/useAnimateBarLabel.d.ts +1 -1
  291. package/esm/hooks/animation/useAnimateBarLabel.js +61 -12
  292. package/esm/hooks/index.d.ts +1 -0
  293. package/esm/hooks/index.js +1 -0
  294. package/esm/hooks/useAxis.d.ts +116 -16
  295. package/esm/hooks/useAxis.js +122 -18
  296. package/esm/hooks/useDataset.d.ts +6 -0
  297. package/esm/hooks/useDataset.js +13 -0
  298. package/esm/hooks/useInteractionItemProps.js +2 -5
  299. package/esm/hooks/useIsItemFocused.js +5 -3
  300. package/esm/hooks/useItemHighlighted.js +2 -2
  301. package/esm/hooks/useItemHighlightedGetter.js +0 -1
  302. package/esm/hooks/useScale.d.ts +25 -6
  303. package/esm/hooks/useScale.js +29 -8
  304. package/esm/index.js +1 -1
  305. package/esm/internals/colorScale.d.ts +1 -1
  306. package/esm/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
  307. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
  308. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -1
  309. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
  310. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -1
  311. package/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
  312. package/esm/internals/createSeriesSelectorOfType.js +5 -3
  313. package/esm/internals/getSeriesColorFn.d.ts +5 -0
  314. package/esm/internals/getSeriesColorFn.js +3 -0
  315. package/esm/internals/index.d.ts +1 -1
  316. package/esm/internals/index.js +1 -1
  317. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
  318. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
  319. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
  320. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
  321. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
  322. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
  323. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
  324. package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
  325. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
  326. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
  327. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
  328. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
  329. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +8 -1
  330. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
  331. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
  332. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
  333. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
  334. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
  335. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +21 -5
  336. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
  337. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
  338. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +15 -9
  339. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
  340. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +69 -45
  341. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
  342. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
  343. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
  344. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -22
  345. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
  346. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
  347. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
  348. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
  349. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
  350. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
  351. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
  352. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
  353. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
  354. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
  355. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +3 -0
  356. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
  357. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
  358. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
  359. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +11 -10
  360. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
  361. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
  362. package/esm/internals/plugins/models/plugin.d.ts +3 -2
  363. package/esm/internals/plugins/utils/selectors.d.ts +13 -17
  364. package/esm/internals/plugins/utils/selectors.js +3 -35
  365. package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
  366. package/esm/internals/plugins/utils/useLazySelectorEffect.js +2 -2
  367. package/esm/internals/store/useCharts.d.ts +3 -4
  368. package/esm/internals/store/useCharts.js +2 -2
  369. package/esm/internals/store/useSelector.d.ts +2 -4
  370. package/esm/internals/store/useSelector.js +2 -8
  371. package/esm/internals/store/useStore.d.ts +3 -5
  372. package/esm/locales/index.d.ts +2 -1
  373. package/esm/locales/index.js +1 -0
  374. package/esm/locales/nbNO.d.ts +115 -0
  375. package/esm/locales/nbNO.js +113 -0
  376. package/esm/models/seriesType/bar.d.ts +16 -0
  377. package/esm/models/seriesType/common.d.ts +22 -6
  378. package/esm/models/seriesType/config.d.ts +7 -16
  379. package/hooks/animation/useAnimateBarLabel.d.ts +1 -1
  380. package/hooks/animation/useAnimateBarLabel.js +61 -12
  381. package/hooks/index.d.ts +1 -0
  382. package/hooks/index.js +12 -0
  383. package/hooks/useAxis.d.ts +116 -16
  384. package/hooks/useAxis.js +122 -18
  385. package/hooks/useDataset.d.ts +6 -0
  386. package/hooks/useDataset.js +18 -0
  387. package/hooks/useInteractionItemProps.js +2 -5
  388. package/hooks/useIsItemFocused.js +5 -3
  389. package/hooks/useItemHighlighted.js +2 -2
  390. package/hooks/useScale.d.ts +25 -6
  391. package/hooks/useScale.js +29 -8
  392. package/index.js +1 -1
  393. package/internals/colorScale.d.ts +1 -1
  394. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
  395. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
  396. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -2
  397. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
  398. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -2
  399. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
  400. package/internals/createSeriesSelectorOfType.js +6 -3
  401. package/internals/getSeriesColorFn.d.ts +5 -0
  402. package/internals/getSeriesColorFn.js +9 -0
  403. package/internals/index.d.ts +1 -1
  404. package/internals/index.js +1 -1
  405. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
  406. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
  407. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
  408. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
  409. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
  410. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
  411. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
  412. package/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
  413. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
  414. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
  415. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
  416. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
  417. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +9 -2
  418. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
  419. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
  420. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
  421. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
  422. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
  423. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +22 -6
  424. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
  425. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
  426. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +14 -8
  427. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
  428. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +70 -46
  429. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
  430. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
  431. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
  432. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -23
  433. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
  434. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
  435. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
  436. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
  437. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
  438. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
  439. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
  440. package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
  441. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
  442. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
  443. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +4 -1
  444. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
  445. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
  446. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
  447. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +12 -10
  448. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
  449. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
  450. package/internals/plugins/models/plugin.d.ts +3 -2
  451. package/internals/plugins/utils/selectors.d.ts +13 -17
  452. package/internals/plugins/utils/selectors.js +3 -35
  453. package/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
  454. package/internals/plugins/utils/useLazySelectorEffect.js +2 -2
  455. package/internals/store/useCharts.d.ts +3 -4
  456. package/internals/store/useCharts.js +2 -2
  457. package/internals/store/useSelector.d.ts +2 -4
  458. package/internals/store/useSelector.js +2 -10
  459. package/internals/store/useStore.d.ts +3 -5
  460. package/locales/index.d.ts +2 -1
  461. package/locales/index.js +11 -0
  462. package/locales/nbNO.d.ts +115 -0
  463. package/locales/nbNO.js +119 -0
  464. package/models/seriesType/bar.d.ts +16 -0
  465. package/models/seriesType/common.d.ts +22 -6
  466. package/models/seriesType/config.d.ts +7 -16
  467. package/package.json +5 -5
  468. package/BarChart/seriesConfig/getColor.d.ts +0 -3
  469. package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  470. package/BarChart/seriesConfig/legend.d.ts +0 -3
  471. package/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
  472. package/BarChart/seriesConfig/tooltip.d.ts +0 -4
  473. package/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
  474. package/esm/BarChart/seriesConfig/getColor.d.ts +0 -3
  475. package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  476. package/esm/BarChart/seriesConfig/legend.d.ts +0 -3
  477. package/esm/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
  478. package/esm/BarChart/seriesConfig/tooltip.d.ts +0 -4
  479. package/esm/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
  480. package/esm/internals/plugins/utils/ChartStore.d.ts +0 -13
  481. package/esm/internals/plugins/utils/ChartStore.js +0 -22
  482. package/internals/plugins/utils/ChartStore.d.ts +0 -13
  483. package/internals/plugins/utils/ChartStore.js +0 -29
  484. /package/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
  485. /package/esm/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
@@ -24,15 +24,14 @@ export const useChartSeries = ({
24
24
  isFirstRender.current = false;
25
25
  return;
26
26
  }
27
- store.update(prev => _extends({}, prev, {
28
- series: _extends({}, prev.series, {
29
- processedSeries: preprocessSeries({
30
- series,
31
- colors: typeof colors === 'function' ? colors(theme) : colors,
32
- seriesConfig,
33
- dataset
34
- })
35
- })
27
+ store.set('series', _extends({}, store.state.series, {
28
+ processedSeries: preprocessSeries({
29
+ series,
30
+ colors: typeof colors === 'function' ? colors(theme) : colors,
31
+ seriesConfig,
32
+ dataset
33
+ }),
34
+ dataset
36
35
  }));
37
36
  }, [colors, dataset, series, theme, seriesConfig, store]);
38
37
  return {};
@@ -65,7 +64,8 @@ useChartSeries.getInitialState = ({
65
64
  colors: typeof colors === 'function' ? colors(theme) : colors,
66
65
  seriesConfig,
67
66
  dataset
68
- })
67
+ }),
68
+ dataset
69
69
  }
70
70
  };
71
71
  };
@@ -1,13 +1,17 @@
1
1
  import { ChartRootSelector } from "../../utils/selectors.js";
2
2
  import { UseChartSeriesSignature } from "./useChartSeries.types.js";
3
3
  export declare const selectorChartSeriesState: ChartRootSelector<UseChartSeriesSignature>;
4
- export declare const selectorChartSeriesProcessed: import("reselect").Selector<import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
4
+ export declare const selectorChartSeriesProcessed: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
5
5
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
6
- } & {
6
+ }) => import("./useChartSeries.types.js").ProcessedSeries<keyof import("../../../index.js").ChartsSeriesConfig>;
7
+ export declare const selectorChartSeriesConfig: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
7
8
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
8
- }, import("./useChartSeries.types.js").ProcessedSeries<keyof import("../../../index.js").ChartsSeriesConfig>, any[]>;
9
- export declare const selectorChartSeriesConfig: import("reselect").Selector<import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
9
+ }) => import("../../models/index.js").ChartSeriesConfig<keyof import("../../../index.js").ChartsSeriesConfig>;
10
+ /**
11
+ * Get the dataset from the series state.
12
+ * @param {ChartState<[UseChartSeriesSignature]>} state The state of the chart.
13
+ * @returns {DatasetType | undefined} The dataset.
14
+ */
15
+ export declare const selectorChartDataset: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
10
16
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
11
- } & {
12
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
13
- }, import("../../models/index.js").ChartSeriesConfig<keyof import("../../../index.js").ChartsSeriesConfig>, any[]>;
17
+ }) => readonly import("../../../index.js").DatasetElementType<string | number | Date | null | undefined>[] | undefined;
@@ -1,4 +1,11 @@
1
1
  import { createSelector } from "../../utils/selectors.js";
2
2
  export const selectorChartSeriesState = state => state.series;
3
3
  export const selectorChartSeriesProcessed = createSelector([selectorChartSeriesState], seriesState => seriesState.processedSeries);
4
- export const selectorChartSeriesConfig = createSelector([selectorChartSeriesState], seriesState => seriesState.seriesConfig);
4
+ export const selectorChartSeriesConfig = createSelector([selectorChartSeriesState], seriesState => seriesState.seriesConfig);
5
+
6
+ /**
7
+ * Get the dataset from the series state.
8
+ * @param {ChartState<[UseChartSeriesSignature]>} state The state of the chart.
9
+ * @returns {DatasetType | undefined} The dataset.
10
+ */
11
+ export const selectorChartDataset = createSelector([selectorChartSeriesState], seriesState => seriesState.dataset);
@@ -40,6 +40,7 @@ export interface UseChartSeriesState<T extends ChartSeriesType = ChartSeriesType
40
40
  series: {
41
41
  processedSeries: ProcessedSeries<T>;
42
42
  seriesConfig: ChartSeriesConfig<T>;
43
+ dataset?: Readonly<DatasetType>;
43
44
  };
44
45
  }
45
46
  export interface UseChartSeriesInstance {}
@@ -15,47 +15,31 @@ export const useChartBrush = ({
15
15
  }) => {
16
16
  const isEnabled = useSelector(store, selectorIsBrushEnabled);
17
17
  useEnhancedEffect(() => {
18
- store.update(prev => {
19
- return _extends({}, prev, {
20
- brush: _extends({}, prev.brush, {
21
- enabled: params.brushConfig.enabled,
22
- preventTooltip: params.brushConfig.preventTooltip,
23
- preventHighlight: params.brushConfig.preventHighlight
24
- })
25
- });
26
- });
18
+ store.set('brush', _extends({}, store.state.brush, {
19
+ enabled: params.brushConfig.enabled,
20
+ preventTooltip: params.brushConfig.preventTooltip,
21
+ preventHighlight: params.brushConfig.preventHighlight
22
+ }));
27
23
  }, [store, params.brushConfig.enabled, params.brushConfig.preventTooltip, params.brushConfig.preventHighlight]);
28
24
  const setBrushCoordinates = useEventCallback(function setBrushCoordinates(point) {
29
- store.update(prev => {
30
- return _extends({}, prev, {
31
- brush: _extends({}, prev.brush, {
32
- start: prev.brush.start ?? point,
33
- current: point
34
- })
35
- });
36
- });
25
+ store.set('brush', _extends({}, store.state.brush, {
26
+ start: store.state.brush.start ?? point,
27
+ current: point
28
+ }));
37
29
  });
38
30
  const clearBrush = useEventCallback(function clearBrush() {
39
- store.update(prev => {
40
- return _extends({}, prev, {
41
- brush: _extends({}, prev.brush, {
42
- start: null,
43
- current: null
44
- })
45
- });
46
- });
31
+ store.set('brush', _extends({}, store.state.brush, {
32
+ start: null,
33
+ current: null
34
+ }));
47
35
  });
48
36
  const setZoomBrushEnabled = useEventCallback(function setZoomBrushEnabled(enabled) {
49
- store.update(prev => {
50
- if (prev.brush.isZoomBrushEnabled === enabled) {
51
- return prev;
52
- }
53
- return _extends({}, prev, {
54
- brush: _extends({}, prev.brush, {
55
- isZoomBrushEnabled: enabled
56
- })
57
- });
58
- });
37
+ if (store.state.brush.isZoomBrushEnabled === enabled) {
38
+ return;
39
+ }
40
+ store.set('brush', _extends({}, store.state.brush, {
41
+ isZoomBrushEnabled: enabled
42
+ }));
59
43
  });
60
44
  React.useEffect(() => {
61
45
  const element = svgRef.current;
@@ -1,41 +1,27 @@
1
1
  import { type ChartOptionalRootSelector } from "../../utils/selectors.js";
2
2
  import type { UseChartBrushSignature } from "./useChartBrush.types.js";
3
3
  export declare const selectorBrush: ChartOptionalRootSelector<UseChartBrushSignature>;
4
- export declare const selectorBrushStart: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
4
+ export declare const selectorBrushStart: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
5
5
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
6
- } & {
6
+ }) => import("./useChartBrush.types.js").Point | null | undefined;
7
+ export declare const selectorBrushCurrent: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
7
8
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
8
- }, import("./useChartBrush.types.js").Point | null | undefined, any[]>;
9
- export declare const selectorBrushCurrent: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
9
+ }) => import("./useChartBrush.types.js").Point | null | undefined;
10
+ export declare const selectorBrushStartX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
10
11
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
11
- } & {
12
+ }) => number | null;
13
+ export declare const selectorBrushStartY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
12
14
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
13
- }, import("./useChartBrush.types.js").Point | null | undefined, any[]>;
14
- export declare const selectorBrushStartX: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
15
+ }) => number | null;
16
+ export declare const selectorBrushCurrentX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
15
17
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
16
- } & {
18
+ }) => number | null;
19
+ export declare const selectorBrushCurrentY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
17
20
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
18
- }, number | null, any[]>;
19
- export declare const selectorBrushStartY: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
21
+ }) => number | null;
22
+ export declare const selectorBrushState: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
20
23
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
21
- } & {
22
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
23
- }, number | null, any[]>;
24
- export declare const selectorBrushCurrentX: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
25
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
26
- } & {
27
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
28
- }, number | null, any[]>;
29
- export declare const selectorBrushCurrentY: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
30
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
31
- } & {
32
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
33
- }, number | null, any[]>;
34
- export declare const selectorBrushState: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
35
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
36
- } & {
37
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
38
- }, {
24
+ }) => {
39
25
  start: {
40
26
  x: number;
41
27
  y: number;
@@ -44,39 +30,25 @@ export declare const selectorBrushState: import("reselect").Selector<import("../
44
30
  x: number;
45
31
  y: number;
46
32
  };
47
- } | null, any[]>;
48
- export declare const selectorBrushConfigNoZoom: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
49
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
50
- } & {
51
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
52
- }, "x" | "y" | "xy", any[]>;
53
- export declare const selectorBrushConfigZoom: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & {
54
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
55
- } & {
56
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
57
- }, "x" | "y" | "xy" | null, []>;
58
- export declare const selectorBrushConfig: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
59
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
60
- } & {
61
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
62
- } & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState>, "x" | "y" | "xy", any[]>;
63
- export declare const selectorIsBrushEnabled: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
64
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
65
- } & {
33
+ } | null;
34
+ export declare const selectorBrushConfigNoZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
66
35
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
67
- }, boolean | undefined, any[]>;
68
- export declare const selectorIsBrushSelectionActive: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
36
+ }) => "x" | "y" | "xy";
37
+ export declare const selectorBrushConfigZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & {
69
38
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
70
- } & {
39
+ }) => "x" | "y" | "xy" | null;
40
+ export declare const selectorBrushConfig: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
71
41
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
72
- }, boolean | undefined, any[]>;
73
- export declare const selectorBrushShouldPreventAxisHighlight: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
42
+ }) => "x" | "y" | "xy";
43
+ export declare const selectorIsBrushEnabled: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
74
44
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
75
- } & {
45
+ }) => boolean | undefined;
46
+ export declare const selectorIsBrushSelectionActive: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
76
47
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
77
- }, boolean | undefined, any[]>;
78
- export declare const selectorBrushShouldPreventTooltip: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
48
+ }) => boolean | undefined;
49
+ export declare const selectorBrushShouldPreventAxisHighlight: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
79
50
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
80
- } & {
51
+ }) => boolean | undefined;
52
+ export declare const selectorBrushShouldPreventTooltip: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
81
53
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
82
- }, boolean | undefined, any[]>;
54
+ }) => boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  import { createSelector } from "../../utils/selectors.js";
2
- import { selectorChartZoomOptionsLookup } from "../useChartCartesianAxis/index.js";
2
+ import { selectorChartZoomOptionsLookup } from "../useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js";
3
3
  import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
4
4
  export const selectorBrush = state => state.brush;
5
5
  export const selectorBrushStart = createSelector([selectorBrush], brush => brush?.start);
@@ -44,7 +44,7 @@ export const selectorBrushConfigNoZoom = createSelector([selectorChartSeriesProc
44
44
  }
45
45
  return 'x';
46
46
  });
47
- export const selectorBrushConfigZoom = createSelector([selectorChartZoomOptionsLookup], optionsLookup => {
47
+ export const selectorBrushConfigZoom = createSelector([selectorChartZoomOptionsLookup], function selectorBrushConfigZoom(optionsLookup) {
48
48
  let hasX = false;
49
49
  let hasY = false;
50
50
  Object.values(optionsLookup).forEach(options => {
@@ -1,20 +1,20 @@
1
- export declare const selectorChartLeftAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
1
+ export declare const selectorChartLeftAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
2
2
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
3
- } & {
3
+ }) => number;
4
+ export declare const selectorChartRightAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
4
5
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
5
- }, number, []>;
6
- export declare const selectorChartRightAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
6
+ }) => number;
7
+ export declare const selectorChartTopAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
7
8
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
8
- } & {
9
+ }) => number;
10
+ export declare const selectorChartBottomAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
9
11
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
10
- }, number, []>;
11
- export declare const selectorChartTopAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
12
+ }) => number;
13
+ export declare const selectorChartAxisSizes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
12
14
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
13
- } & {
14
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
15
- }, number, []>;
16
- export declare const selectorChartBottomAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
17
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
18
- } & {
19
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
20
- }, number, []>;
15
+ }) => {
16
+ left: number;
17
+ right: number;
18
+ top: number;
19
+ bottom: number;
20
+ };
@@ -1,6 +1,22 @@
1
+ import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
1
2
  import { selectorChartRawXAxis, selectorChartRawYAxis } from "./useChartCartesianAxisLayout.selectors.js";
2
- import { createSelector } from "../../utils/selectors.js";
3
- export const selectorChartLeftAxisSize = createSelector([selectorChartRawYAxis], yAxis => (yAxis ?? []).reduce((acc, axis) => axis.position === 'left' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0));
4
- export const selectorChartRightAxisSize = createSelector([selectorChartRawYAxis], yAxis => (yAxis ?? []).reduce((acc, axis) => axis.position === 'right' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0));
5
- export const selectorChartTopAxisSize = createSelector([selectorChartRawXAxis], xAxis => (xAxis ?? []).reduce((acc, axis) => axis.position === 'top' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0));
6
- export const selectorChartBottomAxisSize = createSelector([selectorChartRawXAxis], xAxis => (xAxis ?? []).reduce((acc, axis) => axis.position === 'bottom' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0));
3
+ export const selectorChartLeftAxisSize = createSelector(selectorChartRawYAxis, function selectorChartLeftAxisSize(yAxis) {
4
+ return (yAxis ?? []).reduce((acc, axis) => axis.position === 'left' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);
5
+ });
6
+ export const selectorChartRightAxisSize = createSelector(selectorChartRawYAxis, function selectorChartRightAxisSize(yAxis) {
7
+ return (yAxis ?? []).reduce((acc, axis) => axis.position === 'right' ? acc + (axis.width || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);
8
+ });
9
+ export const selectorChartTopAxisSize = createSelector(selectorChartRawXAxis, function selectorChartTopAxisSize(xAxis) {
10
+ return (xAxis ?? []).reduce((acc, axis) => axis.position === 'top' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);
11
+ });
12
+ export const selectorChartBottomAxisSize = createSelector(selectorChartRawXAxis, function selectorChartBottomAxisSize(xAxis) {
13
+ return (xAxis ?? []).reduce((acc, axis) => axis.position === 'bottom' ? acc + (axis.height || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0) : acc, 0);
14
+ });
15
+ export const selectorChartAxisSizes = createSelectorMemoized(selectorChartLeftAxisSize, selectorChartRightAxisSize, selectorChartTopAxisSize, selectorChartBottomAxisSize, function selectorChartAxisSizes(left, right, top, bottom) {
16
+ return {
17
+ left,
18
+ right,
19
+ top,
20
+ bottom
21
+ };
22
+ });
@@ -3,6 +3,7 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
6
+ import { useStoreEffect } from '@mui/x-internals/store';
6
7
  import { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';
7
8
  import { warnOnce } from '@mui/x-internals/warning';
8
9
  import { rainbowSurgePalette } from "../../../../colorPalettes/index.js";
@@ -15,7 +16,6 @@ import { getAxisIndex } from "./getAxisValue.js";
15
16
  import { getSVGPoint } from "../../../getSVGPoint.js";
16
17
  import { selectorChartsInteractionIsInitialized } from "../useChartInteraction/index.js";
17
18
  import { selectorChartAxisInteraction } from "./useChartCartesianInteraction.selectors.js";
18
- import { useLazySelectorEffect } from "../../utils/useLazySelectorEffect.js";
19
19
  import { checkHasInteractionPlugin } from "../useChartInteraction/checkHasInteractionPlugin.js";
20
20
  export const useChartCartesianAxis = ({
21
21
  params,
@@ -57,14 +57,7 @@ export const useChartCartesianAxis = ({
57
57
  });
58
58
  useEnhancedEffect(() => {
59
59
  if (params.highlightedAxis !== undefined) {
60
- store.update(prevState => {
61
- if (prevState.controlledCartesianAxisHighlight === params.highlightedAxis) {
62
- return prevState;
63
- }
64
- return _extends({}, prevState, {
65
- controlledCartesianAxisHighlight: params.highlightedAxis
66
- });
67
- });
60
+ store.set('controlledCartesianAxisHighlight', params.highlightedAxis);
68
61
  }
69
62
  }, [store, params.highlightedAxis]);
70
63
 
@@ -76,16 +69,17 @@ export const useChartCartesianAxis = ({
76
69
  isFirstRender.current = false;
77
70
  return;
78
71
  }
79
- store.update(prev => _extends({}, prev, {
80
- cartesianAxis: _extends({}, prev.cartesianAxis, {
81
- x: defaultizeXAxis(xAxis, dataset),
82
- y: defaultizeYAxis(yAxis, dataset)
83
- })
84
- }));
72
+ store.set('cartesianAxis', {
73
+ x: defaultizeXAxis(xAxis, dataset),
74
+ y: defaultizeYAxis(yAxis, dataset)
75
+ });
85
76
  }, [seriesConfig, drawingArea, xAxis, yAxis, dataset, store]);
86
77
  const usedXAxis = xAxisIds[0];
87
78
  const usedYAxis = yAxisIds[0];
88
- useLazySelectorEffect(store, selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {
79
+ useStoreEffect(store, selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {
80
+ if (!onHighlightedAxisChange) {
81
+ return;
82
+ }
89
83
  if (Object.is(prevAxisInteraction, nextAxisInteraction)) {
90
84
  return;
91
85
  }
@@ -99,7 +93,7 @@ export const useChartCartesianAxis = ({
99
93
  }, itemIndex) => nextAxisInteraction[itemIndex].axisId !== axisId || nextAxisInteraction[itemIndex].dataIndex !== dataIndex)) {
100
94
  onHighlightedAxisChange(nextAxisInteraction);
101
95
  }
102
- }, !onHighlightedAxisChange);
96
+ });
103
97
  const hasInteractionPlugin = checkHasInteractionPlugin(instance);
104
98
  React.useEffect(() => {
105
99
  const element = svgRef.current;
@@ -1,5 +1,13 @@
1
1
  import { AxisId, D3Scale } from "../../../../models/axis.js";
2
- export declare const selectorChartPreviewXScales: import("reselect").Selector<any, Record<AxisId, D3Scale>, [axisId: AxisId]>;
3
- export declare const selectorChartPreviewComputedXAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsXAxisProps>, [axisId: AxisId]>;
4
- export declare const selectorChartPreviewYScales: import("reselect").Selector<any, Record<AxisId, D3Scale>, [axisId: AxisId]>;
5
- export declare const selectorChartPreviewComputedYAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsYAxisProps>, [axisId: AxisId]>;
2
+ export declare const selectorChartPreviewXScales: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
3
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
4
+ }, axisId: AxisId) => Record<AxisId, D3Scale>;
5
+ export declare const selectorChartPreviewComputedXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
6
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
7
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsXAxisProps>;
8
+ export declare const selectorChartPreviewYScales: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
9
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
10
+ }, axisId: AxisId) => Record<AxisId, D3Scale>;
11
+ export declare const selectorChartPreviewComputedYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
12
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
13
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsYAxisProps>;
@@ -2,7 +2,7 @@ import { createSelector } from "../../utils/selectors.js";
2
2
  import { selectorChartRawXAxis, selectorChartRawYAxis } from "./useChartCartesianAxisLayout.selectors.js";
3
3
  import { selectorChartSeriesConfig, selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
4
4
  import { computeAxisValue } from "./computeAxisValue.js";
5
- import { selectorChartNormalizedXScales, selectorChartNormalizedYScales, selectorChartXDomains, selectorChartYDomains, selectorChartZoomOptionsLookup } from "./useChartCartesianAxisRendering.selectors.js";
5
+ import { selectorChartNormalizedXScales, selectorChartNormalizedYScales, selectorChartXAxisWithDomains, selectorChartYAxisWithDomains, selectorChartZoomOptionsLookup } from "./useChartCartesianAxisRendering.selectors.js";
6
6
  import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/index.js";
7
7
  import { ZOOM_SLIDER_PREVIEW_SIZE } from "../../../constants.js";
8
8
  import { getRange } from "./getAxisScale.js";
@@ -25,7 +25,7 @@ function createPreviewDrawingArea(axisDirection, mainChartDrawingArea) {
25
25
  bottom: mainChartDrawingArea.height
26
26
  };
27
27
  }
28
- export const selectorChartPreviewXScales = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedXScales, (_, axisId) => axisId], function selectorChartPreviewXScales(xAxes, chartDrawingArea, zoomOptions, normalizedXScales, axisId) {
28
+ export const selectorChartPreviewXScales = createSelector([selectorChartRawXAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedXScales], function selectorChartPreviewXScales(xAxes, chartDrawingArea, zoomOptions, normalizedXScales, axisId) {
29
29
  const hasAxis = xAxes?.some(axis => axis.id === axisId);
30
30
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'x' : 'y', chartDrawingArea);
31
31
  const options = zoomOptions[axisId];
@@ -40,8 +40,11 @@ export const selectorChartPreviewXScales = createSelector([selectorChartRawXAxis
40
40
  });
41
41
  return scales;
42
42
  });
43
- export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRawXAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewXScales, selectorChartXDomains, (_, axisId) => axisId], (xAxes, formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, domains, axisId) => {
44
- const hasAxis = xAxes?.some(axis => axis.id === axisId);
43
+ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewXScales, selectorChartXAxisWithDomains], (formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, {
44
+ axes,
45
+ domains
46
+ }, axisId) => {
47
+ const hasAxis = axes?.some(axis => axis.id === axisId);
45
48
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'x' : 'y', chartDrawingArea);
46
49
  const options = zoomOptions[axisId];
47
50
  const zoomMap = new Map([[axisId, {
@@ -53,7 +56,7 @@ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRa
53
56
  scales,
54
57
  drawingArea,
55
58
  formattedSeries,
56
- axis: xAxes,
59
+ axis: axes,
57
60
  seriesConfig,
58
61
  axisDirection: 'x',
59
62
  zoomMap,
@@ -66,7 +69,7 @@ export const selectorChartPreviewComputedXAxis = createSelector([selectorChartRa
66
69
  }
67
70
  return computedAxes.axis;
68
71
  });
69
- export const selectorChartPreviewYScales = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedYScales, (_, axisId) => axisId], function selectorChartPreviewYScales(yAxes, chartDrawingArea, zoomOptions, normalizedYScales, axisId) {
72
+ export const selectorChartPreviewYScales = createSelector([selectorChartRawYAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartNormalizedYScales], function selectorChartPreviewYScales(yAxes, chartDrawingArea, zoomOptions, normalizedYScales, axisId) {
70
73
  const hasAxis = yAxes?.some(axis => axis.id === axisId);
71
74
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'y' : 'x', chartDrawingArea);
72
75
  const options = zoomOptions[axisId];
@@ -84,8 +87,11 @@ export const selectorChartPreviewYScales = createSelector([selectorChartRawYAxis
84
87
  });
85
88
  return scales;
86
89
  });
87
- export const selectorChartPreviewComputedYAxis = createSelector([selectorChartRawYAxis, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewYScales, selectorChartYDomains, (_, axisId) => axisId], (yAxes, formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, domains, axisId) => {
88
- const hasAxis = yAxes?.some(axis => axis.id === axisId);
90
+ export const selectorChartPreviewComputedYAxis = createSelector([selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorChartZoomOptionsLookup, selectorChartDrawingArea, selectorChartPreviewYScales, selectorChartYAxisWithDomains], (formattedSeries, seriesConfig, zoomOptions, chartDrawingArea, scales, {
91
+ axes,
92
+ domains
93
+ }, axisId) => {
94
+ const hasAxis = axes?.some(axis => axis.id === axisId);
89
95
  const drawingArea = createPreviewDrawingArea(hasAxis ? 'y' : 'x', chartDrawingArea);
90
96
  const options = zoomOptions[axisId];
91
97
  const zoomMap = new Map([[axisId, {
@@ -97,7 +103,7 @@ export const selectorChartPreviewComputedYAxis = createSelector([selectorChartRa
97
103
  scales,
98
104
  drawingArea,
99
105
  formattedSeries,
100
- axis: yAxes,
106
+ axis: axes,
101
107
  seriesConfig,
102
108
  axisDirection: 'y',
103
109
  zoomMap,