@mui/x-charts 9.7.0 → 9.9.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 (334) hide show
  1. package/BarChart/AnimatedBarElement.d.mts +1 -1
  2. package/BarChart/AnimatedBarElement.d.ts +1 -1
  3. package/BarChart/BarClipPath.d.mts +1 -1
  4. package/BarChart/BarClipPath.d.ts +1 -1
  5. package/BarChart/BarElement.d.mts +1 -1
  6. package/BarChart/BarElement.d.ts +1 -1
  7. package/BarChart/BarLabel/BarLabelItem.d.mts +1 -1
  8. package/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
  9. package/BarChart/BarLabel/BarLabelPlot.d.mts +2 -1
  10. package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -1
  11. package/BarChart/BatchBarPlot/BarGroup.d.mts +1 -1
  12. package/BarChart/BatchBarPlot/BarGroup.d.ts +1 -1
  13. package/BarChart/BatchBarPlot/BatchBarPlot.d.mts +2 -1
  14. package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +2 -1
  15. package/BarChart/FocusedBar.d.mts +1 -1
  16. package/BarChart/FocusedBar.d.ts +1 -1
  17. package/BarChart/IndividualBarPlot.d.mts +2 -1
  18. package/BarChart/IndividualBarPlot.d.ts +2 -1
  19. package/BarChart/seriesConfig/bar/tooltipPosition.d.mts +2 -3
  20. package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +2 -3
  21. package/BarChart/seriesConfig/bar/tooltipPosition.js +19 -15
  22. package/BarChart/seriesConfig/bar/tooltipPosition.mjs +18 -14
  23. package/BarChart/seriesConfig/index.js +2 -2
  24. package/BarChart/seriesConfig/index.mjs +2 -2
  25. package/BarChart/useBarPlotData.d.mts +5 -1
  26. package/BarChart/useBarPlotData.d.ts +5 -1
  27. package/BarChart/useBarPlotData.js +102 -25
  28. package/BarChart/useBarPlotData.mjs +102 -26
  29. package/CHANGELOG.md +249 -1
  30. package/ChartsAxis/ChartsAxis.d.mts +2 -1
  31. package/ChartsAxis/ChartsAxis.d.ts +2 -1
  32. package/ChartsAxisHighlight/ChartsAxisHighlight.d.mts +2 -1
  33. package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +2 -1
  34. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.mts +2 -1
  35. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +2 -1
  36. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +22 -5
  37. package/ChartsAxisHighlight/ChartsXAxisHighlight.mjs +23 -6
  38. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.mts +2 -1
  39. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +2 -1
  40. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +22 -5
  41. package/ChartsAxisHighlight/ChartsYAxisHighlight.mjs +23 -6
  42. package/ChartsAxisHighlight/getSampledBandHighlight.d.mts +27 -0
  43. package/ChartsAxisHighlight/getSampledBandHighlight.d.ts +27 -0
  44. package/ChartsAxisHighlight/getSampledBandHighlight.js +35 -0
  45. package/ChartsAxisHighlight/getSampledBandHighlight.mjs +29 -0
  46. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +1 -1
  47. package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +1 -1
  48. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +2 -1
  49. package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +2 -1
  50. package/ChartsBrushOverlay/ChartsBrushOverlay.d.mts +2 -1
  51. package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +2 -1
  52. package/ChartsClipPath/ChartsClipPath.d.mts +1 -1
  53. package/ChartsClipPath/ChartsClipPath.d.ts +1 -1
  54. package/ChartsDataProvider/ChartsDataProvider.d.mts +1 -1
  55. package/ChartsDataProvider/ChartsDataProvider.d.ts +1 -1
  56. package/ChartsGrid/ChartsGrid.d.mts +1 -1
  57. package/ChartsGrid/ChartsGrid.d.ts +1 -1
  58. package/ChartsGrid/ChartsHorizontalGrid.d.mts +2 -1
  59. package/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -1
  60. package/ChartsGrid/ChartsVerticalGrid.d.mts +2 -1
  61. package/ChartsGrid/ChartsVerticalGrid.d.ts +2 -1
  62. package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.mts +1 -1
  63. package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
  64. package/ChartsOverlay/ChartsLoadingOverlay.d.mts +1 -1
  65. package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -1
  66. package/ChartsOverlay/ChartsNoDataOverlay.d.mts +1 -1
  67. package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -1
  68. package/ChartsOverlay/ChartsOverlay.d.mts +1 -1
  69. package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
  70. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +2 -1
  71. package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +2 -1
  72. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +2 -1
  73. package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +2 -1
  74. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +2 -1
  75. package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +2 -1
  76. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +1 -1
  77. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +1 -1
  78. package/ChartsRadialGrid/ChartsRadialGrid.d.mts +1 -1
  79. package/ChartsRadialGrid/ChartsRadialGrid.d.ts +1 -1
  80. package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +2 -1
  81. package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +2 -1
  82. package/ChartsRadialGrid/ChartsRotationGrid.d.mts +2 -1
  83. package/ChartsRadialGrid/ChartsRotationGrid.d.ts +2 -1
  84. package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -1
  85. package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -1
  86. package/ChartsReferenceLine/ChartsReferenceLine.d.mts +1 -1
  87. package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
  88. package/ChartsReferenceLine/ChartsXReferenceLine.d.mts +1 -1
  89. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
  90. package/ChartsReferenceLine/ChartsYReferenceLine.d.mts +1 -1
  91. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
  92. package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -1
  93. package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -1
  94. package/ChartsText/ChartsText.d.mts +1 -1
  95. package/ChartsText/ChartsText.d.ts +1 -1
  96. package/ChartsTooltip/ChartsAxisTooltipContent.d.mts +1 -1
  97. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -1
  98. package/ChartsTooltip/ChartsItemTooltipContent.d.mts +2 -1
  99. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +2 -1
  100. package/ChartsTooltip/ChartsTooltip.d.mts +1 -1
  101. package/ChartsTooltip/ChartsTooltip.d.ts +1 -1
  102. package/ChartsTooltip/ChartsTooltipContainer.d.mts +1 -1
  103. package/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
  104. package/ChartsTooltip/ChartsTooltipContainer.js +10 -3
  105. package/ChartsTooltip/ChartsTooltipContainer.mjs +11 -4
  106. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.mts +2 -1
  107. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +2 -1
  108. package/ChartsXAxis/ChartsGroupedXAxisTicks.js +3 -13
  109. package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +2 -12
  110. package/ChartsXAxis/ChartsSingleXAxisTicks.d.mts +2 -1
  111. package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +2 -1
  112. package/ChartsXAxis/ChartsXAxis.d.mts +1 -1
  113. package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
  114. package/ChartsXAxis/ChartsXAxisImpl.d.mts +2 -1
  115. package/ChartsXAxis/ChartsXAxisImpl.d.ts +2 -1
  116. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.mts +2 -1
  117. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +2 -1
  118. package/ChartsYAxis/ChartsGroupedYAxisTicks.js +4 -16
  119. package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +3 -13
  120. package/ChartsYAxis/ChartsSingleYAxisTicks.d.mts +2 -1
  121. package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +2 -1
  122. package/ChartsYAxis/ChartsYAxis.d.mts +1 -1
  123. package/ChartsYAxis/ChartsYAxis.d.ts +1 -1
  124. package/ChartsYAxis/ChartsYAxisImpl.d.mts +2 -1
  125. package/ChartsYAxis/ChartsYAxisImpl.d.ts +2 -1
  126. package/Gauge/GaugeProvider.d.mts +1 -1
  127. package/Gauge/GaugeProvider.d.ts +1 -1
  128. package/Gauge/GaugeReferenceArc.d.mts +1 -1
  129. package/Gauge/GaugeReferenceArc.d.ts +1 -1
  130. package/Gauge/GaugeValueArc.d.mts +1 -1
  131. package/Gauge/GaugeValueArc.d.ts +1 -1
  132. package/Gauge/GaugeValueText.d.mts +1 -1
  133. package/Gauge/GaugeValueText.d.ts +1 -1
  134. package/LineChart/AnimatedArea.d.mts +1 -1
  135. package/LineChart/AnimatedArea.d.ts +1 -1
  136. package/LineChart/AppearingMask.d.mts +1 -1
  137. package/LineChart/AppearingMask.d.ts +1 -1
  138. package/LineChart/AreaElement.d.mts +1 -1
  139. package/LineChart/AreaElement.d.ts +1 -1
  140. package/LineChart/AreaPlot.d.mts +1 -1
  141. package/LineChart/AreaPlot.d.ts +1 -1
  142. package/LineChart/CircleMarkElement.d.mts +1 -1
  143. package/LineChart/CircleMarkElement.d.ts +1 -1
  144. package/LineChart/FocusedLineMark.d.mts +1 -1
  145. package/LineChart/FocusedLineMark.d.ts +1 -1
  146. package/LineChart/LineElement.d.mts +1 -1
  147. package/LineChart/LineElement.d.ts +1 -1
  148. package/LineChart/LineHighlightElement.d.mts +1 -1
  149. package/LineChart/LineHighlightElement.d.ts +1 -1
  150. package/LineChart/LineHighlightPlot.d.mts +1 -1
  151. package/LineChart/LineHighlightPlot.d.ts +1 -1
  152. package/LineChart/LinePlot.d.mts +1 -1
  153. package/LineChart/LinePlot.d.ts +1 -1
  154. package/LineChart/LinePlot.js +3 -2
  155. package/LineChart/LinePlot.mjs +3 -2
  156. package/LineChart/MarkElement.d.mts +1 -1
  157. package/LineChart/MarkElement.d.ts +1 -1
  158. package/LineChart/MarkPlot.d.mts +1 -1
  159. package/LineChart/MarkPlot.d.ts +1 -1
  160. package/LineChart/seriesConfig/index.js +2 -2
  161. package/LineChart/seriesConfig/index.mjs +2 -2
  162. package/LineChart/seriesConfig/tooltipPosition.d.mts +2 -3
  163. package/LineChart/seriesConfig/tooltipPosition.d.ts +2 -3
  164. package/LineChart/seriesConfig/tooltipPosition.js +14 -14
  165. package/LineChart/seriesConfig/tooltipPosition.mjs +13 -13
  166. package/LineChart/useLinePlotData.d.mts +13 -1
  167. package/LineChart/useLinePlotData.d.ts +13 -1
  168. package/LineChart/useLinePlotData.js +90 -33
  169. package/LineChart/useLinePlotData.mjs +92 -34
  170. package/PieChart/FocusedPieArc.d.mts +1 -1
  171. package/PieChart/FocusedPieArc.d.ts +1 -1
  172. package/PieChart/PieArcLabelPlot.d.mts +1 -1
  173. package/PieChart/PieArcLabelPlot.d.ts +1 -1
  174. package/PieChart/PieArcPlot.d.mts +1 -1
  175. package/PieChart/PieArcPlot.d.ts +1 -1
  176. package/PieChart/PiePlot.d.mts +1 -1
  177. package/PieChart/PiePlot.d.ts +1 -1
  178. package/PieChart/seriesConfig/index.js +2 -2
  179. package/PieChart/seriesConfig/index.mjs +2 -2
  180. package/PieChart/seriesConfig/tooltipPosition.d.mts +2 -3
  181. package/PieChart/seriesConfig/tooltipPosition.d.ts +2 -3
  182. package/PieChart/seriesConfig/tooltipPosition.js +7 -11
  183. package/PieChart/seriesConfig/tooltipPosition.mjs +6 -10
  184. package/RadarChart/FocusedRadarMark.d.mts +1 -1
  185. package/RadarChart/FocusedRadarMark.d.ts +1 -1
  186. package/RadarChart/RadarAxis/RadarAxis.d.mts +1 -1
  187. package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  188. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.mts +1 -1
  189. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -1
  190. package/RadarChart/RadarDataProvider/RadarDataProvider.d.mts +2 -1
  191. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +2 -1
  192. package/RadarChart/RadarGrid/CircularRadarGrid.d.mts +2 -1
  193. package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +2 -1
  194. package/RadarChart/RadarGrid/CircularRadarStripes.d.mts +2 -1
  195. package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +2 -1
  196. package/RadarChart/RadarGrid/RadarGrid.d.mts +2 -1
  197. package/RadarChart/RadarGrid/RadarGrid.d.ts +2 -1
  198. package/RadarChart/RadarGrid/SharpRadarGrid.d.mts +2 -1
  199. package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +2 -1
  200. package/RadarChart/RadarGrid/SharpRadarStripes.d.mts +2 -1
  201. package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +2 -1
  202. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.mts +2 -1
  203. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +2 -1
  204. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +2 -1
  205. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +2 -1
  206. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -1
  207. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -1
  208. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.mts +1 -1
  209. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -1
  210. package/RadarChart/seriesConfig/index.js +2 -2
  211. package/RadarChart/seriesConfig/index.mjs +2 -2
  212. package/RadarChart/seriesConfig/tooltipPosition.d.mts +2 -3
  213. package/RadarChart/seriesConfig/tooltipPosition.d.ts +2 -3
  214. package/RadarChart/seriesConfig/tooltipPosition.js +9 -16
  215. package/RadarChart/seriesConfig/tooltipPosition.mjs +8 -15
  216. package/ScatterChart/BatchScatter.d.mts +2 -1
  217. package/ScatterChart/BatchScatter.d.ts +2 -1
  218. package/ScatterChart/FocusedScatterMark.d.mts +1 -1
  219. package/ScatterChart/FocusedScatterMark.d.ts +1 -1
  220. package/ScatterChart/HighlightedScatterMark.d.mts +1 -1
  221. package/ScatterChart/HighlightedScatterMark.d.ts +1 -1
  222. package/ScatterChart/Scatter.d.mts +1 -1
  223. package/ScatterChart/Scatter.d.ts +1 -1
  224. package/ScatterChart/ScatterMarker.d.mts +1 -1
  225. package/ScatterChart/ScatterMarker.d.ts +1 -1
  226. package/ScatterChart/ScatterPlot.d.mts +1 -1
  227. package/ScatterChart/ScatterPlot.d.ts +1 -1
  228. package/ScatterChart/async/ScatterAsync.d.mts +2 -1
  229. package/ScatterChart/async/ScatterAsync.d.ts +2 -1
  230. package/ScatterChart/async/ScatterAsyncBatch.d.mts +1 -1
  231. package/ScatterChart/async/ScatterAsyncBatch.d.ts +1 -1
  232. package/ScatterChart/seriesConfig/index.js +2 -2
  233. package/ScatterChart/seriesConfig/index.mjs +2 -2
  234. package/ScatterChart/seriesConfig/tooltipPosition.d.mts +2 -3
  235. package/ScatterChart/seriesConfig/tooltipPosition.d.ts +2 -3
  236. package/ScatterChart/seriesConfig/tooltipPosition.js +13 -13
  237. package/ScatterChart/seriesConfig/tooltipPosition.mjs +12 -12
  238. package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
  239. package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
  240. package/context/ChartsSlotsContext.d.mts +1 -1
  241. package/context/ChartsSlotsContext.d.ts +1 -1
  242. package/hooks/index.d.mts +2 -1
  243. package/hooks/index.d.ts +2 -1
  244. package/hooks/index.js +10 -2
  245. package/hooks/index.mjs +2 -1
  246. package/hooks/usePolarGeometry.d.mts +51 -0
  247. package/hooks/usePolarGeometry.d.ts +51 -0
  248. package/hooks/usePolarGeometry.js +47 -0
  249. package/hooks/usePolarGeometry.mjs +41 -0
  250. package/index.js +1 -1
  251. package/index.mjs +1 -1
  252. package/internals/animation/animation.d.mts +1 -1
  253. package/internals/animation/animation.d.ts +1 -1
  254. package/internals/commonNextFocusItem.d.mts +15 -5
  255. package/internals/commonNextFocusItem.d.ts +15 -5
  256. package/internals/commonNextFocusItem.js +6 -0
  257. package/internals/commonNextFocusItem.mjs +7 -0
  258. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +2 -1
  259. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +2 -1
  260. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.mts +2 -1
  261. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +2 -1
  262. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.mts +1 -1
  263. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
  264. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.mts +1 -1
  265. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -1
  266. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.mts +2 -1
  267. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +2 -1
  268. package/internals/createCommonKeyboardFocusHandler.d.mts +5 -1
  269. package/internals/createCommonKeyboardFocusHandler.d.ts +5 -1
  270. package/internals/createGetBarDimensions.d.mts +14 -1
  271. package/internals/createGetBarDimensions.d.ts +14 -1
  272. package/internals/createGetBarDimensions.js +45 -0
  273. package/internals/createGetBarDimensions.mjs +45 -0
  274. package/internals/geometry.js +1 -1
  275. package/internals/geometry.mjs +1 -1
  276. package/internals/getGroupingConfig.d.mts +6 -0
  277. package/internals/getGroupingConfig.d.ts +6 -0
  278. package/internals/getGroupingConfig.js +20 -0
  279. package/internals/getGroupingConfig.mjs +12 -0
  280. package/internals/index.d.mts +1 -2
  281. package/internals/index.d.ts +1 -2
  282. package/internals/index.js +12 -8
  283. package/internals/index.mjs +1 -2
  284. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +2 -1
  285. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -1
  286. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +1 -1
  287. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +1 -1
  288. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -1
  289. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -1
  290. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +4 -4
  291. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -1
  292. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +13 -2
  293. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +13 -2
  294. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.mts +18 -0
  295. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.ts +18 -0
  296. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +2 -0
  297. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  298. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
  299. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
  300. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.mts +26 -0
  301. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.ts +26 -0
  302. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.js +89 -0
  303. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.mjs +81 -0
  304. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.mts +93 -0
  305. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.ts +93 -0
  306. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts +5 -0
  307. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +5 -0
  308. package/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.mts +1 -1
  309. package/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +1 -1
  310. package/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.mts +1 -1
  311. package/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +1 -1
  312. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +3 -8
  313. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +3 -8
  314. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -57
  315. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +2 -57
  316. package/internals/shallowEqual.d.mts +1 -1
  317. package/internals/shallowEqual.d.ts +1 -1
  318. package/internals/shallowEqual.js +1 -1
  319. package/internals/shallowEqual.mjs +1 -1
  320. package/models/seriesType/config.d.mts +6 -2
  321. package/models/seriesType/config.d.ts +6 -2
  322. package/package.json +6 -6
  323. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +0 -34
  324. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +0 -34
  325. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.mts +0 -49
  326. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.ts +0 -49
  327. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js +0 -124
  328. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs +0 -117
  329. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.mts +0 -64
  330. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.ts +0 -64
  331. /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.js → tooltipItemPositionSelector.types.js} +0 -0
  332. /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.mjs → tooltipItemPositionSelector.types.mjs} +0 -0
  333. /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.js → useChartCartesianAxis/sampling.types.js} +0 -0
  334. /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.mjs → useChartCartesianAxis/sampling.types.mjs} +0 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getFullRangeZoom = getFullRangeZoom;
7
+ exports.selectorChartSamplingState = exports.selectorChartSamplingPyramids = exports.selectorChartHighlightBucketSize = void 0;
8
+ var _store = require("@mui/x-internals/store");
9
+ var _useChartSeries = require("../../corePlugins/useChartSeries");
10
+ var _useChartSeriesConfig = require("../../corePlugins/useChartSeriesConfig");
11
+ var _useChartDimensions = require("../../corePlugins/useChartDimensions");
12
+ var _useChartCartesianAxisRendering = require("./useChartCartesianAxisRendering.selectors");
13
+ const EMPTY_PYRAMIDS = {};
14
+ const EMPTY_BUCKET_SIZES = new Map();
15
+
16
+ /**
17
+ * Full-range zoom (span 100%) for a non-zoomable axis. Sampling gates on a zoom entry; a static axis
18
+ * has none, so we sample it at full range — the `MAX_RENDERED_POINTS` cap still applies. Mirrors the
19
+ * full-range zoom the zoom-slider preview uses to keep its density stable.
20
+ */
21
+ function getFullRangeZoom(axisId) {
22
+ return {
23
+ axisId,
24
+ start: 0,
25
+ end: 100
26
+ };
27
+ }
28
+ const selectorChartSamplingState = state => state.sampling;
29
+
30
+ /**
31
+ * Built sampling structures keyed by series id. Memoized, so rebuilt only on data change. Builds
32
+ * only for series types that are enabled and register a `sampler`; the plot hook reads them back.
33
+ */
34
+ exports.selectorChartSamplingState = selectorChartSamplingState;
35
+ const selectorChartSamplingPyramids = exports.selectorChartSamplingPyramids = (0, _store.createSelectorMemoized)(selectorChartSamplingState, _useChartSeries.selectorChartSeriesProcessed, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartSamplingPyramids(samplingState, processedSeries, seriesConfig) {
36
+ if (!samplingState?.enabled) {
37
+ return EMPTY_PYRAMIDS;
38
+ }
39
+ let sampled;
40
+ Object.keys(processedSeries).forEach(seriesType => {
41
+ const method = samplingState.methods[seriesType];
42
+ if (!method || method === 'none') {
43
+ return;
44
+ }
45
+ const sampler = seriesConfig[seriesType]?.sampler;
46
+ const typeData = processedSeries[seriesType];
47
+ if (!sampler || !typeData) {
48
+ return;
49
+ }
50
+ for (const seriesId of typeData.seriesOrder) {
51
+ const built = sampler.build(typeData.series[seriesId]);
52
+ if (built) {
53
+ sampled ?? (sampled = {});
54
+ sampled[seriesId] = built;
55
+ }
56
+ }
57
+ });
58
+ return sampled ?? EMPTY_PYRAMIDS;
59
+ });
60
+
61
+ /**
62
+ * Merged bucket size per band axis, to widen the axis highlight over a sampled bucket. Empty when
63
+ * sampling is off or no sampler is registered. The math lives in pro; community reads the integers.
64
+ */
65
+ const selectorChartHighlightBucketSize = exports.selectorChartHighlightBucketSize = (0, _store.createSelectorMemoized)(selectorChartSamplingState, _useChartCartesianAxisRendering.selectorChartZoomMap, _useChartCartesianAxisRendering.selectorChartXAxis, _useChartCartesianAxisRendering.selectorChartYAxis, _useChartDimensions.selectorChartDrawingArea, _useChartCartesianAxisRendering.selectorChartZoomOptionsLookup, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartHighlightBucketSize(samplingState, zoomMap, xAxis, yAxis, drawingArea, zoomOptions, seriesConfig) {
66
+ if (!samplingState?.enabled) {
67
+ return EMPTY_BUCKET_SIZES;
68
+ }
69
+ const bucketSizeAt = seriesConfig.bar?.sampler?.bucketSizeAt ?? seriesConfig.line?.sampler?.bucketSizeAt;
70
+ if (!bucketSizeAt) {
71
+ return EMPTY_BUCKET_SIZES;
72
+ }
73
+ const bucketSizes = new Map();
74
+ [[xAxis, drawingArea.width], [yAxis, drawingArea.height]].forEach(([axes, availableSize]) => {
75
+ axes.axisIds.forEach(axisId => {
76
+ const data = axes.axis[axisId].data;
77
+ const zoom = zoomMap?.get(axisId) ?? getFullRangeZoom(axisId);
78
+ const minSpan = zoomOptions[axisId]?.minSpan ?? 0;
79
+ if (data) {
80
+ bucketSizes.set(axisId, bucketSizeAt(zoom.end - zoom.start, {
81
+ dataLength: data.length,
82
+ availableSize,
83
+ minSpan
84
+ }));
85
+ }
86
+ });
87
+ });
88
+ return bucketSizes;
89
+ });
@@ -0,0 +1,81 @@
1
+ import { createSelectorMemoized } from '@mui/x-internals/store';
2
+ import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.mjs";
3
+ import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.mjs";
4
+ import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/index.mjs";
5
+ import { selectorChartXAxis, selectorChartYAxis, selectorChartZoomMap, selectorChartZoomOptionsLookup } from "./useChartCartesianAxisRendering.selectors.mjs";
6
+ const EMPTY_PYRAMIDS = {};
7
+ const EMPTY_BUCKET_SIZES = new Map();
8
+
9
+ /**
10
+ * Full-range zoom (span 100%) for a non-zoomable axis. Sampling gates on a zoom entry; a static axis
11
+ * has none, so we sample it at full range — the `MAX_RENDERED_POINTS` cap still applies. Mirrors the
12
+ * full-range zoom the zoom-slider preview uses to keep its density stable.
13
+ */
14
+ export function getFullRangeZoom(axisId) {
15
+ return {
16
+ axisId,
17
+ start: 0,
18
+ end: 100
19
+ };
20
+ }
21
+ export const selectorChartSamplingState = state => state.sampling;
22
+
23
+ /**
24
+ * Built sampling structures keyed by series id. Memoized, so rebuilt only on data change. Builds
25
+ * only for series types that are enabled and register a `sampler`; the plot hook reads them back.
26
+ */
27
+ export const selectorChartSamplingPyramids = createSelectorMemoized(selectorChartSamplingState, selectorChartSeriesProcessed, selectorChartSeriesConfig, function selectorChartSamplingPyramids(samplingState, processedSeries, seriesConfig) {
28
+ if (!samplingState?.enabled) {
29
+ return EMPTY_PYRAMIDS;
30
+ }
31
+ let sampled;
32
+ Object.keys(processedSeries).forEach(seriesType => {
33
+ const method = samplingState.methods[seriesType];
34
+ if (!method || method === 'none') {
35
+ return;
36
+ }
37
+ const sampler = seriesConfig[seriesType]?.sampler;
38
+ const typeData = processedSeries[seriesType];
39
+ if (!sampler || !typeData) {
40
+ return;
41
+ }
42
+ for (const seriesId of typeData.seriesOrder) {
43
+ const built = sampler.build(typeData.series[seriesId]);
44
+ if (built) {
45
+ sampled ??= {};
46
+ sampled[seriesId] = built;
47
+ }
48
+ }
49
+ });
50
+ return sampled ?? EMPTY_PYRAMIDS;
51
+ });
52
+
53
+ /**
54
+ * Merged bucket size per band axis, to widen the axis highlight over a sampled bucket. Empty when
55
+ * sampling is off or no sampler is registered. The math lives in pro; community reads the integers.
56
+ */
57
+ export const selectorChartHighlightBucketSize = createSelectorMemoized(selectorChartSamplingState, selectorChartZoomMap, selectorChartXAxis, selectorChartYAxis, selectorChartDrawingArea, selectorChartZoomOptionsLookup, selectorChartSeriesConfig, function selectorChartHighlightBucketSize(samplingState, zoomMap, xAxis, yAxis, drawingArea, zoomOptions, seriesConfig) {
58
+ if (!samplingState?.enabled) {
59
+ return EMPTY_BUCKET_SIZES;
60
+ }
61
+ const bucketSizeAt = seriesConfig.bar?.sampler?.bucketSizeAt ?? seriesConfig.line?.sampler?.bucketSizeAt;
62
+ if (!bucketSizeAt) {
63
+ return EMPTY_BUCKET_SIZES;
64
+ }
65
+ const bucketSizes = new Map();
66
+ [[xAxis, drawingArea.width], [yAxis, drawingArea.height]].forEach(([axes, availableSize]) => {
67
+ axes.axisIds.forEach(axisId => {
68
+ const data = axes.axis[axisId].data;
69
+ const zoom = zoomMap?.get(axisId) ?? getFullRangeZoom(axisId);
70
+ const minSpan = zoomOptions[axisId]?.minSpan ?? 0;
71
+ if (data) {
72
+ bucketSizes.set(axisId, bucketSizeAt(zoom.end - zoom.start, {
73
+ dataLength: data.length,
74
+ availableSize,
75
+ minSpan
76
+ }));
77
+ }
78
+ });
79
+ });
80
+ return bucketSizes;
81
+ });
@@ -0,0 +1,93 @@
1
+ import type { SeriesId } from "../../../../models/seriesType/common.mjs";
2
+ import type { ChartSeriesType, ChartSeriesDefaultized, ChartsSeriesConfig } from "../../../../models/seriesType/config.mjs";
3
+ import type { ZoomData } from "./zoom.types.mjs";
4
+ /** Line sampling algorithms. `m4` pixel-accurate; `minmax` its 2-point subset; `lttb` keeps shape. */
5
+ export type LineSamplingAlgorithm = 'm4' | 'minmax' | 'lttb';
6
+ /** `sampling` prop method. `'none'` (default) disables; for lines it also picks the algorithm. */
7
+ export type SamplingMethod = 'none' | LineSamplingAlgorithm;
8
+ /** Bar `sampling` method. Bars always use a min/max envelope, so line-only algorithms are excluded. */
9
+ export type BarSamplingMethod = 'none' | 'minmax';
10
+ /**
11
+ * Per-series-type `sampling` prop on `ChartsDataProviderPro`. Derived from each type's
12
+ * `samplingMethod`, contributed by pro via the per-type series-config extensions (e.g.
13
+ * `BarSeriesExtension`). Empty in community-only builds.
14
+ */
15
+ export type SamplingConfig = { [K in keyof ChartsSeriesConfig as ChartsSeriesConfig[K] extends {
16
+ samplingMethod: any;
17
+ } ? K : never]?: ChartsSeriesConfig[K] extends {
18
+ samplingMethod: infer M;
19
+ } ? M : never };
20
+ /** State set by the pro `useChartProSampling` plugin; absent in community. */
21
+ export interface SamplingState {
22
+ /** True when at least one series type is sampled. */
23
+ enabled: boolean;
24
+ /** Method per series type; absent/`'none'` = not sampled. */
25
+ methods: Partial<Record<ChartSeriesType, SamplingMethod>>;
26
+ }
27
+ /** Built sampling structures keyed by series id (type depends on the strategy). */
28
+ export type SampledSeriesLookup = Record<SeriesId, unknown>;
29
+ /**
30
+ * One bucket of the active level of detail: the index range it covers plus the indices to render.
31
+ * Lines flatten `indices` into a polyline; bars draw one merged rect over `[startIndex, endIndex]`.
32
+ */
33
+ export interface SampledBucket {
34
+ /** First original index covered. */
35
+ startIndex: number;
36
+ /** Last original index covered (inclusive). */
37
+ endIndex: number;
38
+ /** Ascending original indices to render. */
39
+ indices: Int32Array;
40
+ }
41
+ /** Sampler inputs for one series. Bars omit `algorithm`/`getValues` (min/max envelope). */
42
+ export interface SampleContext {
43
+ /** Opaque built structure (the strategy's `TBuilt`; the pyramid lives in pro). */
44
+ built: unknown;
45
+ /** Zoom of the sampled axis; `undefined` => sampler returns `null`. */
46
+ zoom: ZoomData | undefined;
47
+ /** Pixel extent along the sampled axis (band axis for bars, x-axis for lines). */
48
+ availableSize: number;
49
+ /** Axis zoom `minSpan`; level 0 (`span ≈ minSpan`) renders raw. */
50
+ minSpan: number;
51
+ /** Line algorithm. Omitted for bars, which always use the default min/max envelope. */
52
+ algorithm?: LineSamplingAlgorithm;
53
+ /**
54
+ * Lazy raw values, read only for `lttb`.
55
+ * @returns {ArrayLike<number>} The raw values.
56
+ */
57
+ getValues?: () => ArrayLike<number>;
58
+ }
59
+ /** Axis-level math inputs (no per-series built struct). */
60
+ export interface AxisSamplingContext {
61
+ /** `axis.data.length`. */
62
+ dataLength: number;
63
+ /** Pixel extent along the band axis: width (x) / height (y). */
64
+ availableSize: number;
65
+ /** Axis zoom `minSpan`. */
66
+ minSpan: number;
67
+ }
68
+ /**
69
+ * Per-series-type sampling strategy, registered on `seriesConfig.sampler`. Owns both building the
70
+ * LOD structure and consuming it, so all algorithm code lives in pro; community calls through the
71
+ * pro-injected reference. `TBuilt` is opaque to community; pro narrows it per method.
72
+ */
73
+ export interface SamplingStrategy<SeriesType extends ChartSeriesType = ChartSeriesType, TBuilt = unknown> {
74
+ /**
75
+ * Build the sampled structure for one series.
76
+ * @param {ChartSeriesDefaultized<SeriesType>} series The processed series.
77
+ * @returns {TBuilt | null} The built structure, or `null` if it can't be sampled.
78
+ */
79
+ build: (series: ChartSeriesDefaultized<SeriesType>) => TBuilt | null;
80
+ /**
81
+ * Active level of detail as buckets for the current zoom.
82
+ * @param {SampleContext} context The sampling inputs.
83
+ * @returns {SampledBucket[] | null} The buckets, or `null` to render raw.
84
+ */
85
+ sample?: (context: SampleContext) => SampledBucket[] | null;
86
+ /**
87
+ * Merged bucket size at a zoom span (`>= 1`; `1` = no merge), for axis-highlight widening.
88
+ * @param {number} span The zoom span (`end - start`).
89
+ * @param {AxisSamplingContext} context The axis inputs.
90
+ * @returns {number} The bucket size.
91
+ */
92
+ bucketSizeAt?: (span: number, context: AxisSamplingContext) => number;
93
+ }
@@ -0,0 +1,93 @@
1
+ import type { SeriesId } from "../../../../models/seriesType/common.js";
2
+ import type { ChartSeriesType, ChartSeriesDefaultized, ChartsSeriesConfig } from "../../../../models/seriesType/config.js";
3
+ import type { ZoomData } from "./zoom.types.js";
4
+ /** Line sampling algorithms. `m4` pixel-accurate; `minmax` its 2-point subset; `lttb` keeps shape. */
5
+ export type LineSamplingAlgorithm = 'm4' | 'minmax' | 'lttb';
6
+ /** `sampling` prop method. `'none'` (default) disables; for lines it also picks the algorithm. */
7
+ export type SamplingMethod = 'none' | LineSamplingAlgorithm;
8
+ /** Bar `sampling` method. Bars always use a min/max envelope, so line-only algorithms are excluded. */
9
+ export type BarSamplingMethod = 'none' | 'minmax';
10
+ /**
11
+ * Per-series-type `sampling` prop on `ChartsDataProviderPro`. Derived from each type's
12
+ * `samplingMethod`, contributed by pro via the per-type series-config extensions (e.g.
13
+ * `BarSeriesExtension`). Empty in community-only builds.
14
+ */
15
+ export type SamplingConfig = { [K in keyof ChartsSeriesConfig as ChartsSeriesConfig[K] extends {
16
+ samplingMethod: any;
17
+ } ? K : never]?: ChartsSeriesConfig[K] extends {
18
+ samplingMethod: infer M;
19
+ } ? M : never };
20
+ /** State set by the pro `useChartProSampling` plugin; absent in community. */
21
+ export interface SamplingState {
22
+ /** True when at least one series type is sampled. */
23
+ enabled: boolean;
24
+ /** Method per series type; absent/`'none'` = not sampled. */
25
+ methods: Partial<Record<ChartSeriesType, SamplingMethod>>;
26
+ }
27
+ /** Built sampling structures keyed by series id (type depends on the strategy). */
28
+ export type SampledSeriesLookup = Record<SeriesId, unknown>;
29
+ /**
30
+ * One bucket of the active level of detail: the index range it covers plus the indices to render.
31
+ * Lines flatten `indices` into a polyline; bars draw one merged rect over `[startIndex, endIndex]`.
32
+ */
33
+ export interface SampledBucket {
34
+ /** First original index covered. */
35
+ startIndex: number;
36
+ /** Last original index covered (inclusive). */
37
+ endIndex: number;
38
+ /** Ascending original indices to render. */
39
+ indices: Int32Array;
40
+ }
41
+ /** Sampler inputs for one series. Bars omit `algorithm`/`getValues` (min/max envelope). */
42
+ export interface SampleContext {
43
+ /** Opaque built structure (the strategy's `TBuilt`; the pyramid lives in pro). */
44
+ built: unknown;
45
+ /** Zoom of the sampled axis; `undefined` => sampler returns `null`. */
46
+ zoom: ZoomData | undefined;
47
+ /** Pixel extent along the sampled axis (band axis for bars, x-axis for lines). */
48
+ availableSize: number;
49
+ /** Axis zoom `minSpan`; level 0 (`span ≈ minSpan`) renders raw. */
50
+ minSpan: number;
51
+ /** Line algorithm. Omitted for bars, which always use the default min/max envelope. */
52
+ algorithm?: LineSamplingAlgorithm;
53
+ /**
54
+ * Lazy raw values, read only for `lttb`.
55
+ * @returns {ArrayLike<number>} The raw values.
56
+ */
57
+ getValues?: () => ArrayLike<number>;
58
+ }
59
+ /** Axis-level math inputs (no per-series built struct). */
60
+ export interface AxisSamplingContext {
61
+ /** `axis.data.length`. */
62
+ dataLength: number;
63
+ /** Pixel extent along the band axis: width (x) / height (y). */
64
+ availableSize: number;
65
+ /** Axis zoom `minSpan`. */
66
+ minSpan: number;
67
+ }
68
+ /**
69
+ * Per-series-type sampling strategy, registered on `seriesConfig.sampler`. Owns both building the
70
+ * LOD structure and consuming it, so all algorithm code lives in pro; community calls through the
71
+ * pro-injected reference. `TBuilt` is opaque to community; pro narrows it per method.
72
+ */
73
+ export interface SamplingStrategy<SeriesType extends ChartSeriesType = ChartSeriesType, TBuilt = unknown> {
74
+ /**
75
+ * Build the sampled structure for one series.
76
+ * @param {ChartSeriesDefaultized<SeriesType>} series The processed series.
77
+ * @returns {TBuilt | null} The built structure, or `null` if it can't be sampled.
78
+ */
79
+ build: (series: ChartSeriesDefaultized<SeriesType>) => TBuilt | null;
80
+ /**
81
+ * Active level of detail as buckets for the current zoom.
82
+ * @param {SampleContext} context The sampling inputs.
83
+ * @returns {SampledBucket[] | null} The buckets, or `null` to render raw.
84
+ */
85
+ sample?: (context: SampleContext) => SampledBucket[] | null;
86
+ /**
87
+ * Merged bucket size at a zoom span (`>= 1`; `1` = no merge), for axis-highlight widening.
88
+ * @param {number} span The zoom span (`end - start`).
89
+ * @param {AxisSamplingContext} context The axis inputs.
90
+ * @returns {number} The bucket size.
91
+ */
92
+ bucketSizeAt?: (span: number, context: AxisSamplingContext) => number;
93
+ }
@@ -6,6 +6,7 @@ import type { ZoomData, ZoomOptions, ZoomSliderPreviewOptions, ZoomSliderShowToo
6
6
  import type { UseChartInteractionSignature } from "../useChartInteraction/index.mjs";
7
7
  import type { ChartsAxisProps } from "../../../../ChartsAxis/index.mjs";
8
8
  import type { UseChartBrushSignature } from "../useChartBrush/index.mjs";
9
+ import type { SamplingState } from "./sampling.types.mjs";
9
10
  /**
10
11
  * The axes' configuration after computing.
11
12
  * An axis in this state already contains a scale function and all the necessary properties to be rendered.
@@ -97,6 +98,10 @@ export interface UseChartCartesianAxisState {
97
98
  isInteracting: boolean;
98
99
  zoomData: readonly ZoomData[];
99
100
  };
101
+ /**
102
+ * @ignore - state populated by the useChartProSampling plugin
103
+ */
104
+ sampling?: SamplingState;
100
105
  cartesianAxis: {
101
106
  axesGap: number;
102
107
  x: DefaultedXAxis[];
@@ -6,6 +6,7 @@ import type { ZoomData, ZoomOptions, ZoomSliderPreviewOptions, ZoomSliderShowToo
6
6
  import type { UseChartInteractionSignature } from "../useChartInteraction/index.js";
7
7
  import type { ChartsAxisProps } from "../../../../ChartsAxis/index.js";
8
8
  import type { UseChartBrushSignature } from "../useChartBrush/index.js";
9
+ import type { SamplingState } from "./sampling.types.js";
9
10
  /**
10
11
  * The axes' configuration after computing.
11
12
  * An axis in this state already contains a scale function and all the necessary properties to be rendered.
@@ -97,6 +98,10 @@ export interface UseChartCartesianAxisState {
97
98
  isInteracting: boolean;
98
99
  zoomData: readonly ZoomData[];
99
100
  };
101
+ /**
102
+ * @ignore - state populated by the useChartProSampling plugin
103
+ */
104
+ sampling?: SamplingState;
100
105
  cartesianAxis: {
101
106
  axesGap: number;
102
107
  x: DefaultedXAxis[];
@@ -4,4 +4,4 @@ import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesT
4
4
  /**
5
5
  * The isFade logic for main charts (those that are identified by an id and a dataIndex)
6
6
  */
7
- export declare function createIsFaded<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifier<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
7
+ export declare function createIsFaded<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap' | 'mapShape'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifier<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
@@ -4,4 +4,4 @@ import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesT
4
4
  /**
5
5
  * The isFade logic for main charts (those that are identified by an id and a dataIndex)
6
6
  */
7
- export declare function createIsFaded<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifier<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
7
+ export declare function createIsFaded<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap' | 'mapShape'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifier<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
@@ -4,4 +4,4 @@ import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesT
4
4
  /**
5
5
  * The isHighlighted logic for main charts (those that are identified by an id and a dataIndex)
6
6
  */
7
- export declare function createIsHighlighted<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifierWithType<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
7
+ export declare function createIsHighlighted<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap' | 'mapShape'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifierWithType<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
@@ -4,4 +4,4 @@ import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesT
4
4
  /**
5
5
  * The isHighlighted logic for main charts (those that are identified by an id and a dataIndex)
6
6
  */
7
- export declare function createIsHighlighted<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifierWithType<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
7
+ export declare function createIsHighlighted<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap' | 'mapShape'>>(highlightScope: HighlightScope<SeriesType> | null | undefined, highlightedItem: HighlightItemIdentifierWithType<SeriesType> | null): <TestedSeriesType extends ComposableChartSeriesType<SeriesType>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
@@ -1,3 +1,4 @@
1
+ import type { SeriesItemIdentifierWithType } from "../../../../models/index.mjs";
1
2
  export declare const selectorChartsTooltipPointerItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartTooltip.types.mjs").UseChartTooltipState<keyof import("../../../index.mjs").ChartsSeriesConfig>> & {
2
3
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
3
4
  }) => import("../../../index.mjs").LineItemIdentifier | import("../../../index.mjs").BarItemIdentifier | import("../../../../index.mjs").ScatterItemIdentifier | import("../../../../index.mjs").PieItemIdentifier | import("../../../../index.mjs").RadarItemIdentifier | null;
@@ -6,13 +7,7 @@ export declare const selectorChartsTooltipPointerItemIsDefined: (args_0: import(
6
7
  }) => boolean;
7
8
  export declare const selectorChartsTooltipItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
8
9
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
9
- }) => import("../../../index.mjs").LineItemIdentifier | import("../../../index.mjs").BarItemIdentifier | import("../../../../index.mjs").ScatterItemIdentifier | import("../../../../index.mjs").PieItemIdentifier | import("../../../../index.mjs").RadarItemIdentifier | null;
10
+ }) => SeriesItemIdentifierWithType<keyof import("../../../index.mjs").ChartsSeriesConfig> | null;
10
11
  export declare const selectorChartsTooltipItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
11
12
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
12
- }) => boolean;
13
- export declare const selectorChartsTooltipItemPosition: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.mjs").UseChartInteractionState> & {
14
- cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
15
- }, placement: "bottom" | "left" | "right" | "top") => {
16
- x: number;
17
- y: number;
18
- } | null;
13
+ }) => boolean;
@@ -1,3 +1,4 @@
1
+ import type { SeriesItemIdentifierWithType } from "../../../../models/index.js";
1
2
  export declare const selectorChartsTooltipPointerItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & 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("./useChartTooltip.types.js").UseChartTooltipState<keyof import("../../../index.js").ChartsSeriesConfig>> & {
2
3
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
3
4
  }) => import("../../../index.js").LineItemIdentifier | import("../../../index.js").BarItemIdentifier | import("../../../../index.js").ScatterItemIdentifier | import("../../../../index.js").PieItemIdentifier | import("../../../../index.js").RadarItemIdentifier | null;
@@ -6,13 +7,7 @@ export declare const selectorChartsTooltipPointerItemIsDefined: (args_0: import(
6
7
  }) => boolean;
7
8
  export declare const selectorChartsTooltipItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & 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("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
8
9
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
9
- }) => import("../../../index.js").LineItemIdentifier | import("../../../index.js").BarItemIdentifier | import("../../../../index.js").ScatterItemIdentifier | import("../../../../index.js").PieItemIdentifier | import("../../../../index.js").RadarItemIdentifier | null;
10
+ }) => SeriesItemIdentifierWithType<keyof import("../../../index.js").ChartsSeriesConfig> | null;
10
11
  export declare const selectorChartsTooltipItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & 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("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
11
12
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
12
- }) => boolean;
13
- export declare const selectorChartsTooltipItemPosition: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & 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("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
14
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
15
- }, placement: "bottom" | "left" | "right" | "top") => {
16
- x: number;
17
- y: number;
18
- } | null;
13
+ }) => boolean;
@@ -3,67 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.selectorChartsTooltipPointerItemIsDefined = exports.selectorChartsTooltipPointerItem = exports.selectorChartsTooltipItemPosition = exports.selectorChartsTooltipItemIsDefined = exports.selectorChartsTooltipItem = void 0;
6
+ exports.selectorChartsTooltipPointerItemIsDefined = exports.selectorChartsTooltipPointerItem = exports.selectorChartsTooltipItemIsDefined = exports.selectorChartsTooltipItem = void 0;
7
7
  var _store = require("@mui/x-internals/store");
8
- var _useChartSeries = require("../../corePlugins/useChartSeries");
9
- var _useChartSeriesConfig = require("../../corePlugins/useChartSeriesConfig");
10
- var _useChartCartesianAxisRendering = require("../useChartCartesianAxis/useChartCartesianAxisRendering.selectors");
11
8
  var _useChartKeyboardNavigation = require("../useChartKeyboardNavigation");
12
9
  var _useChartInteraction = require("../useChartInteraction/useChartInteraction.selectors");
13
- var _useChartDimensions = require("../../corePlugins/useChartDimensions/useChartDimensions.selectors");
14
- var _isCartesian = require("../../../isCartesian");
15
- var _useChartPolarAxis = require("../useChartPolarAxis/useChartPolarAxis.selectors");
16
- var _useGeoProjection = require("../useGeoProjection/useGeoProjection.selectors");
17
10
  const selectTooltip = state => state.tooltip;
18
11
  const selectorChartsTooltipPointerItem = exports.selectorChartsTooltipPointerItem = (0, _store.createSelector)(selectTooltip, tooltip => tooltip?.item ?? null);
19
12
  const selectorChartsTooltipPointerItemIsDefined = exports.selectorChartsTooltipPointerItemIsDefined = (0, _store.createSelector)(selectorChartsTooltipPointerItem, item => item !== null);
20
13
  const selectorChartsTooltipItem = exports.selectorChartsTooltipItem = (0, _store.createSelector)(_useChartInteraction.selectorChartsLastInteraction, selectorChartsTooltipPointerItem, _useChartKeyboardNavigation.selectorChartsKeyboardItem, (lastInteraction, pointerItem, keyboardItem) => lastInteraction === 'keyboard' ? keyboardItem : pointerItem ?? null);
21
- const selectorChartsTooltipItemIsDefined = exports.selectorChartsTooltipItemIsDefined = (0, _store.createSelector)(_useChartInteraction.selectorChartsLastInteraction, selectorChartsTooltipPointerItemIsDefined, _useChartKeyboardNavigation.selectorChartsHasFocusedItem, (lastInteraction, pointerItemIsDefined, keyboardItemIsDefined) => lastInteraction === 'keyboard' ? keyboardItemIsDefined : pointerItemIsDefined);
22
- const selectorChartsTooltipAxisConfig = (0, _store.createSelectorMemoized)(selectorChartsTooltipItem, _useChartCartesianAxisRendering.selectorChartXAxis, _useChartCartesianAxisRendering.selectorChartYAxis, _useChartPolarAxis.selectorChartRotationAxis, _useChartPolarAxis.selectorChartRadiusAxis, _useChartSeries.selectorChartSeriesProcessed, _useGeoProjection.selectorGeoTooltipPosition, function selectorChartsTooltipAxisConfig(identifier, {
23
- axis: xAxis,
24
- axisIds: xAxisIds
25
- }, {
26
- axis: yAxis,
27
- axisIds: yAxisIds
28
- }, rotationAxes, radiusAxes, series, geo) {
29
- if (!identifier) {
30
- return {};
31
- }
32
- const itemSeries = series[identifier.type]?.series[identifier.seriesId];
33
- if (!itemSeries) {
34
- return {};
35
- }
36
- const axesConfig = {
37
- rotationAxes,
38
- radiusAxes
39
- };
40
- const xAxisId = (0, _isCartesian.isCartesianSeries)(itemSeries) ? itemSeries.xAxisId ?? xAxisIds[0] : undefined;
41
- const yAxisId = (0, _isCartesian.isCartesianSeries)(itemSeries) ? itemSeries.yAxisId ?? yAxisIds[0] : undefined;
42
- if (xAxisId !== undefined) {
43
- axesConfig.x = xAxis[xAxisId];
44
- }
45
- if (yAxisId !== undefined) {
46
- axesConfig.y = yAxis[yAxisId];
47
- }
48
- if (geo) {
49
- axesConfig.geo = geo;
50
- }
51
- return axesConfig;
52
- });
53
- const selectorChartsTooltipItemPosition = exports.selectorChartsTooltipItemPosition = (0, _store.createSelectorMemoized)(selectorChartsTooltipItem, _useChartDimensions.selectorChartDrawingArea, _useChartSeriesConfig.selectorChartSeriesConfig, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesLayout, selectorChartsTooltipAxisConfig, function selectorChartsTooltipItemPosition(identifier, drawingArea, seriesConfig, series, seriesLayout, axesConfig, placement) {
54
- if (!identifier) {
55
- return null;
56
- }
57
- const itemSeries = series[identifier.type]?.series[identifier.seriesId];
58
- if (!itemSeries) {
59
- return null;
60
- }
61
- return seriesConfig[itemSeries.type].tooltipItemPositionGetter?.({
62
- series,
63
- seriesLayout,
64
- drawingArea,
65
- axesConfig,
66
- identifier,
67
- placement
68
- }) ?? null;
69
- });
14
+ const selectorChartsTooltipItemIsDefined = exports.selectorChartsTooltipItemIsDefined = (0, _store.createSelector)(_useChartInteraction.selectorChartsLastInteraction, selectorChartsTooltipPointerItemIsDefined, _useChartKeyboardNavigation.selectorChartsHasFocusedItem, (lastInteraction, pointerItemIsDefined, keyboardItemIsDefined) => lastInteraction === 'keyboard' ? keyboardItemIsDefined : pointerItemIsDefined);
@@ -1,63 +1,8 @@
1
- import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
2
- import { selectorChartSeriesProcessed, selectorChartSeriesLayout } from "../../corePlugins/useChartSeries/index.mjs";
3
- import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.mjs";
4
- import { selectorChartXAxis, selectorChartYAxis } from "../useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs";
1
+ import { createSelector } from '@mui/x-internals/store';
5
2
  import { selectorChartsKeyboardItem, selectorChartsHasFocusedItem } from "../useChartKeyboardNavigation/index.mjs";
6
3
  import { selectorChartsLastInteraction } from "../useChartInteraction/useChartInteraction.selectors.mjs";
7
- import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/useChartDimensions.selectors.mjs";
8
- import { isCartesianSeries } from "../../../isCartesian.mjs";
9
- import { selectorChartRadiusAxis, selectorChartRotationAxis } from "../useChartPolarAxis/useChartPolarAxis.selectors.mjs";
10
- import { selectorGeoTooltipPosition } from "../useGeoProjection/useGeoProjection.selectors.mjs";
11
4
  const selectTooltip = state => state.tooltip;
12
5
  export const selectorChartsTooltipPointerItem = createSelector(selectTooltip, tooltip => tooltip?.item ?? null);
13
6
  export const selectorChartsTooltipPointerItemIsDefined = createSelector(selectorChartsTooltipPointerItem, item => item !== null);
14
7
  export const selectorChartsTooltipItem = createSelector(selectorChartsLastInteraction, selectorChartsTooltipPointerItem, selectorChartsKeyboardItem, (lastInteraction, pointerItem, keyboardItem) => lastInteraction === 'keyboard' ? keyboardItem : pointerItem ?? null);
15
- export const selectorChartsTooltipItemIsDefined = createSelector(selectorChartsLastInteraction, selectorChartsTooltipPointerItemIsDefined, selectorChartsHasFocusedItem, (lastInteraction, pointerItemIsDefined, keyboardItemIsDefined) => lastInteraction === 'keyboard' ? keyboardItemIsDefined : pointerItemIsDefined);
16
- const selectorChartsTooltipAxisConfig = createSelectorMemoized(selectorChartsTooltipItem, selectorChartXAxis, selectorChartYAxis, selectorChartRotationAxis, selectorChartRadiusAxis, selectorChartSeriesProcessed, selectorGeoTooltipPosition, function selectorChartsTooltipAxisConfig(identifier, {
17
- axis: xAxis,
18
- axisIds: xAxisIds
19
- }, {
20
- axis: yAxis,
21
- axisIds: yAxisIds
22
- }, rotationAxes, radiusAxes, series, geo) {
23
- if (!identifier) {
24
- return {};
25
- }
26
- const itemSeries = series[identifier.type]?.series[identifier.seriesId];
27
- if (!itemSeries) {
28
- return {};
29
- }
30
- const axesConfig = {
31
- rotationAxes,
32
- radiusAxes
33
- };
34
- const xAxisId = isCartesianSeries(itemSeries) ? itemSeries.xAxisId ?? xAxisIds[0] : undefined;
35
- const yAxisId = isCartesianSeries(itemSeries) ? itemSeries.yAxisId ?? yAxisIds[0] : undefined;
36
- if (xAxisId !== undefined) {
37
- axesConfig.x = xAxis[xAxisId];
38
- }
39
- if (yAxisId !== undefined) {
40
- axesConfig.y = yAxis[yAxisId];
41
- }
42
- if (geo) {
43
- axesConfig.geo = geo;
44
- }
45
- return axesConfig;
46
- });
47
- export const selectorChartsTooltipItemPosition = createSelectorMemoized(selectorChartsTooltipItem, selectorChartDrawingArea, selectorChartSeriesConfig, selectorChartSeriesProcessed, selectorChartSeriesLayout, selectorChartsTooltipAxisConfig, function selectorChartsTooltipItemPosition(identifier, drawingArea, seriesConfig, series, seriesLayout, axesConfig, placement) {
48
- if (!identifier) {
49
- return null;
50
- }
51
- const itemSeries = series[identifier.type]?.series[identifier.seriesId];
52
- if (!itemSeries) {
53
- return null;
54
- }
55
- return seriesConfig[itemSeries.type].tooltipItemPositionGetter?.({
56
- series,
57
- seriesLayout,
58
- drawingArea,
59
- axesConfig,
60
- identifier,
61
- placement
62
- }) ?? null;
63
- });
8
+ export const selectorChartsTooltipItemIsDefined = createSelector(selectorChartsLastInteraction, selectorChartsTooltipPointerItemIsDefined, selectorChartsHasFocusedItem, (lastInteraction, pointerItemIsDefined, keyboardItemIsDefined) => lastInteraction === 'keyboard' ? keyboardItemIsDefined : pointerItemIsDefined);
@@ -3,6 +3,6 @@
3
3
  * when any key has values which are not strictly equal between the arguments.
4
4
  * Returns true when the values of all keys are strictly equal.
5
5
  *
6
- * Source: https://github.com/facebook/react/blob/c2a196174763e0b4f16ed1c512ed4442b062395e/packages/shared/shallowEqual.js#L18
6
+ * Source: https://github.com/react/react/blob/c2a196174763e0b4f16ed1c512ed4442b062395e/packages/shared/shallowEqual.js#L18
7
7
  */
8
8
  export declare function shallowEqual(objA: unknown, objB: unknown): boolean;