@mui/x-charts 9.8.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 (300) 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 +119 -0
  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 +1 -5
  105. package/ChartsTooltip/ChartsTooltipContainer.mjs +2 -6
  106. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.mts +2 -1
  107. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +2 -1
  108. package/ChartsXAxis/ChartsSingleXAxisTicks.d.mts +2 -1
  109. package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +2 -1
  110. package/ChartsXAxis/ChartsXAxis.d.mts +1 -1
  111. package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
  112. package/ChartsXAxis/ChartsXAxisImpl.d.mts +2 -1
  113. package/ChartsXAxis/ChartsXAxisImpl.d.ts +2 -1
  114. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.mts +2 -1
  115. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +2 -1
  116. package/ChartsYAxis/ChartsSingleYAxisTicks.d.mts +2 -1
  117. package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +2 -1
  118. package/ChartsYAxis/ChartsYAxis.d.mts +1 -1
  119. package/ChartsYAxis/ChartsYAxis.d.ts +1 -1
  120. package/ChartsYAxis/ChartsYAxisImpl.d.mts +2 -1
  121. package/ChartsYAxis/ChartsYAxisImpl.d.ts +2 -1
  122. package/Gauge/GaugeProvider.d.mts +1 -1
  123. package/Gauge/GaugeProvider.d.ts +1 -1
  124. package/Gauge/GaugeReferenceArc.d.mts +1 -1
  125. package/Gauge/GaugeReferenceArc.d.ts +1 -1
  126. package/Gauge/GaugeValueArc.d.mts +1 -1
  127. package/Gauge/GaugeValueArc.d.ts +1 -1
  128. package/Gauge/GaugeValueText.d.mts +1 -1
  129. package/Gauge/GaugeValueText.d.ts +1 -1
  130. package/LineChart/AnimatedArea.d.mts +1 -1
  131. package/LineChart/AnimatedArea.d.ts +1 -1
  132. package/LineChart/AppearingMask.d.mts +1 -1
  133. package/LineChart/AppearingMask.d.ts +1 -1
  134. package/LineChart/AreaElement.d.mts +1 -1
  135. package/LineChart/AreaElement.d.ts +1 -1
  136. package/LineChart/AreaPlot.d.mts +1 -1
  137. package/LineChart/AreaPlot.d.ts +1 -1
  138. package/LineChart/CircleMarkElement.d.mts +1 -1
  139. package/LineChart/CircleMarkElement.d.ts +1 -1
  140. package/LineChart/FocusedLineMark.d.mts +1 -1
  141. package/LineChart/FocusedLineMark.d.ts +1 -1
  142. package/LineChart/LineElement.d.mts +1 -1
  143. package/LineChart/LineElement.d.ts +1 -1
  144. package/LineChart/LineHighlightElement.d.mts +1 -1
  145. package/LineChart/LineHighlightElement.d.ts +1 -1
  146. package/LineChart/LineHighlightPlot.d.mts +1 -1
  147. package/LineChart/LineHighlightPlot.d.ts +1 -1
  148. package/LineChart/LinePlot.d.mts +1 -1
  149. package/LineChart/LinePlot.d.ts +1 -1
  150. package/LineChart/LinePlot.js +3 -2
  151. package/LineChart/LinePlot.mjs +3 -2
  152. package/LineChart/MarkElement.d.mts +1 -1
  153. package/LineChart/MarkElement.d.ts +1 -1
  154. package/LineChart/MarkPlot.d.mts +1 -1
  155. package/LineChart/MarkPlot.d.ts +1 -1
  156. package/LineChart/seriesConfig/index.js +2 -2
  157. package/LineChart/seriesConfig/index.mjs +2 -2
  158. package/LineChart/seriesConfig/tooltipPosition.d.mts +2 -3
  159. package/LineChart/seriesConfig/tooltipPosition.d.ts +2 -3
  160. package/LineChart/seriesConfig/tooltipPosition.js +14 -14
  161. package/LineChart/seriesConfig/tooltipPosition.mjs +13 -13
  162. package/LineChart/useLinePlotData.d.mts +13 -1
  163. package/LineChart/useLinePlotData.d.ts +13 -1
  164. package/LineChart/useLinePlotData.js +90 -33
  165. package/LineChart/useLinePlotData.mjs +92 -34
  166. package/PieChart/FocusedPieArc.d.mts +1 -1
  167. package/PieChart/FocusedPieArc.d.ts +1 -1
  168. package/PieChart/PieArcLabelPlot.d.mts +1 -1
  169. package/PieChart/PieArcLabelPlot.d.ts +1 -1
  170. package/PieChart/PieArcPlot.d.mts +1 -1
  171. package/PieChart/PieArcPlot.d.ts +1 -1
  172. package/PieChart/PiePlot.d.mts +1 -1
  173. package/PieChart/PiePlot.d.ts +1 -1
  174. package/PieChart/seriesConfig/index.js +2 -2
  175. package/PieChart/seriesConfig/index.mjs +2 -2
  176. package/PieChart/seriesConfig/tooltipPosition.d.mts +2 -3
  177. package/PieChart/seriesConfig/tooltipPosition.d.ts +2 -3
  178. package/PieChart/seriesConfig/tooltipPosition.js +7 -11
  179. package/PieChart/seriesConfig/tooltipPosition.mjs +6 -10
  180. package/RadarChart/FocusedRadarMark.d.mts +1 -1
  181. package/RadarChart/FocusedRadarMark.d.ts +1 -1
  182. package/RadarChart/RadarAxis/RadarAxis.d.mts +1 -1
  183. package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  184. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.mts +1 -1
  185. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -1
  186. package/RadarChart/RadarDataProvider/RadarDataProvider.d.mts +2 -1
  187. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +2 -1
  188. package/RadarChart/RadarGrid/CircularRadarGrid.d.mts +2 -1
  189. package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +2 -1
  190. package/RadarChart/RadarGrid/CircularRadarStripes.d.mts +2 -1
  191. package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +2 -1
  192. package/RadarChart/RadarGrid/RadarGrid.d.mts +2 -1
  193. package/RadarChart/RadarGrid/RadarGrid.d.ts +2 -1
  194. package/RadarChart/RadarGrid/SharpRadarGrid.d.mts +2 -1
  195. package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +2 -1
  196. package/RadarChart/RadarGrid/SharpRadarStripes.d.mts +2 -1
  197. package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +2 -1
  198. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.mts +2 -1
  199. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +2 -1
  200. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +2 -1
  201. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +2 -1
  202. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -1
  203. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -1
  204. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.mts +1 -1
  205. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -1
  206. package/RadarChart/seriesConfig/index.js +2 -2
  207. package/RadarChart/seriesConfig/index.mjs +2 -2
  208. package/RadarChart/seriesConfig/tooltipPosition.d.mts +2 -3
  209. package/RadarChart/seriesConfig/tooltipPosition.d.ts +2 -3
  210. package/RadarChart/seriesConfig/tooltipPosition.js +9 -16
  211. package/RadarChart/seriesConfig/tooltipPosition.mjs +8 -15
  212. package/ScatterChart/BatchScatter.d.mts +2 -1
  213. package/ScatterChart/BatchScatter.d.ts +2 -1
  214. package/ScatterChart/FocusedScatterMark.d.mts +1 -1
  215. package/ScatterChart/FocusedScatterMark.d.ts +1 -1
  216. package/ScatterChart/HighlightedScatterMark.d.mts +1 -1
  217. package/ScatterChart/HighlightedScatterMark.d.ts +1 -1
  218. package/ScatterChart/Scatter.d.mts +1 -1
  219. package/ScatterChart/Scatter.d.ts +1 -1
  220. package/ScatterChart/ScatterMarker.d.mts +1 -1
  221. package/ScatterChart/ScatterMarker.d.ts +1 -1
  222. package/ScatterChart/ScatterPlot.d.mts +1 -1
  223. package/ScatterChart/ScatterPlot.d.ts +1 -1
  224. package/ScatterChart/async/ScatterAsync.d.mts +2 -1
  225. package/ScatterChart/async/ScatterAsync.d.ts +2 -1
  226. package/ScatterChart/async/ScatterAsyncBatch.d.mts +1 -1
  227. package/ScatterChart/async/ScatterAsyncBatch.d.ts +1 -1
  228. package/ScatterChart/seriesConfig/index.js +2 -2
  229. package/ScatterChart/seriesConfig/index.mjs +2 -2
  230. package/ScatterChart/seriesConfig/tooltipPosition.d.mts +2 -3
  231. package/ScatterChart/seriesConfig/tooltipPosition.d.ts +2 -3
  232. package/ScatterChart/seriesConfig/tooltipPosition.js +13 -13
  233. package/ScatterChart/seriesConfig/tooltipPosition.mjs +12 -12
  234. package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
  235. package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
  236. package/context/ChartsSlotsContext.d.mts +1 -1
  237. package/context/ChartsSlotsContext.d.ts +1 -1
  238. package/index.js +1 -1
  239. package/index.mjs +1 -1
  240. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +2 -1
  241. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +2 -1
  242. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.mts +2 -1
  243. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +2 -1
  244. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.mts +1 -1
  245. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
  246. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.mts +1 -1
  247. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -1
  248. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.mts +2 -1
  249. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +2 -1
  250. package/internals/createGetBarDimensions.d.mts +14 -1
  251. package/internals/createGetBarDimensions.d.ts +14 -1
  252. package/internals/createGetBarDimensions.js +45 -0
  253. package/internals/createGetBarDimensions.mjs +45 -0
  254. package/internals/geometry.js +1 -1
  255. package/internals/geometry.mjs +1 -1
  256. package/internals/index.d.mts +1 -2
  257. package/internals/index.d.ts +1 -2
  258. package/internals/index.js +12 -8
  259. package/internals/index.mjs +1 -2
  260. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +2 -2
  261. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
  262. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -1
  263. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -1
  264. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +4 -4
  265. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -1
  266. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +11 -6
  267. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +11 -6
  268. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.mts +18 -0
  269. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.ts +18 -0
  270. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +2 -0
  271. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
  272. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
  273. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
  274. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.mts +26 -0
  275. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.ts +26 -0
  276. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.js +89 -0
  277. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.mjs +81 -0
  278. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.mts +93 -0
  279. package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.ts +93 -0
  280. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts +5 -0
  281. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +5 -0
  282. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +3 -8
  283. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +3 -8
  284. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -53
  285. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +2 -53
  286. package/models/seriesType/config.d.mts +6 -2
  287. package/models/seriesType/config.d.ts +6 -2
  288. package/package.json +5 -5
  289. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +0 -45
  290. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +0 -45
  291. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.mts +0 -48
  292. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.ts +0 -48
  293. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js +0 -124
  294. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs +0 -117
  295. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.mts +0 -73
  296. package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.ts +0 -73
  297. /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.js → tooltipItemPositionSelector.types.js} +0 -0
  298. /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.mjs → tooltipItemPositionSelector.types.mjs} +0 -0
  299. /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.js → useChartCartesianAxis/sampling.types.js} +0 -0
  300. /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.mjs → useChartCartesianAxis/sampling.types.mjs} +0 -0
@@ -22,6 +22,7 @@ export * from "../ChartsContainer/useChartsContainerProps.mjs";
22
22
  export * from "../ChartsDataProvider/useChartsDataProviderProps.mjs";
23
23
  export * from "../ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs";
24
24
  export * from "./seriesSelectorOfType.mjs";
25
+ export * from "./createGetBarDimensions.mjs";
25
26
  export { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
26
27
  export { useRegisterPointerInteractions } from "./plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs";
27
28
 
@@ -41,8 +42,6 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.mjs";
41
42
  export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
42
43
  export * from "./plugins/featurePlugins/useChartClosestPoint/index.mjs";
43
44
  export * from "./plugins/featurePlugins/useChartBrush/index.mjs";
44
- export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs";
45
- export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs";
46
45
  export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
47
46
  export * from "./plugins/featurePlugins/useProgressiveRendering/index.mjs";
48
47
  export * from "./plugins/utils/selectors.mjs";
@@ -32,13 +32,13 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
32
32
  legendGetter: import("../useChartSeriesConfig/index.mjs").LegendGetter<"pie">;
33
33
  tooltipGetter: import("../useChartSeriesConfig/index.mjs").TooltipGetter<"pie">;
34
34
  ItemTooltipContent?: import("react").ComponentType<import("../useChartSeriesConfig/index.mjs").ItemTooltipContentProps<"pie">> | undefined;
35
- tooltipItemPositionGetter?: import("../useChartSeriesConfig/index.mjs").TooltipItemPositionGetter<"pie"> | undefined;
36
- selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.mjs").TooltipItemPositionSelector;
35
+ selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.mjs").TooltipItemPositionSelector<"pie"> | undefined;
37
36
  getSeriesWithDefaultValues: import("../useChartSeriesConfig/index.mjs").GetSeriesWithDefaultValues<"pie">;
38
37
  keyboardFocusHandler?: import("../../../index.mjs").KeyboardFocusHandler<"pie"> | undefined;
39
38
  identifierSerializer: import("../useChartSeriesConfig/index.mjs").IdentifierSerializer<"pie">;
40
39
  identifierCleaner: import("../useChartSeriesConfig/index.mjs").IdentifierCleaner<"pie">;
41
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.mjs").GetItemAtPosition<"pie"> | undefined;
41
+ sampler?: import("../../../index.mjs").SamplingStrategy<"pie", unknown> | undefined;
42
42
  descriptionGetter: import("../useChartSeriesConfig/index.mjs").DescriptionGetter<"pie">;
43
43
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
44
44
  isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
@@ -32,13 +32,13 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
32
32
  legendGetter: import("../useChartSeriesConfig/index.js").LegendGetter<"pie">;
33
33
  tooltipGetter: import("../useChartSeriesConfig/index.js").TooltipGetter<"pie">;
34
34
  ItemTooltipContent?: import("react").ComponentType<import("../useChartSeriesConfig/index.js").ItemTooltipContentProps<"pie">> | undefined;
35
- tooltipItemPositionGetter?: import("../useChartSeriesConfig/index.js").TooltipItemPositionGetter<"pie"> | undefined;
36
- selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.js").TooltipItemPositionSelector;
35
+ selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.js").TooltipItemPositionSelector<"pie"> | undefined;
37
36
  getSeriesWithDefaultValues: import("../useChartSeriesConfig/index.js").GetSeriesWithDefaultValues<"pie">;
38
37
  keyboardFocusHandler?: import("../../../index.js").KeyboardFocusHandler<"pie"> | undefined;
39
38
  identifierSerializer: import("../useChartSeriesConfig/index.js").IdentifierSerializer<"pie">;
40
39
  identifierCleaner: import("../useChartSeriesConfig/index.js").IdentifierCleaner<"pie">;
41
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.js").GetItemAtPosition<"pie"> | undefined;
41
+ sampler?: import("../../../index.js").SamplingStrategy<"pie", unknown> | undefined;
42
42
  descriptionGetter: import("../useChartSeriesConfig/index.js").DescriptionGetter<"pie">;
43
43
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
44
44
  isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
@@ -5,7 +5,7 @@ export * from "./seriesConfig.types.mjs";
5
5
  export * from "./seriesProcessor.types.mjs";
6
6
  export * from "./seriesLayout.types.mjs";
7
7
  export * from "./tooltipGetter.types.mjs";
8
- export * from "./tooltipItemPositionGetter.types.mjs";
8
+ export * from "./tooltipItemPositionSelector.types.mjs";
9
9
  export * from "./legendGetter.types.mjs";
10
10
  export * from "./getSeriesWithDefaultValues.types.mjs";
11
11
  export * from "./identifierSerializer.types.mjs";
@@ -5,7 +5,7 @@ export * from "./seriesConfig.types.js";
5
5
  export * from "./seriesProcessor.types.js";
6
6
  export * from "./seriesLayout.types.js";
7
7
  export * from "./tooltipGetter.types.js";
8
- export * from "./tooltipItemPositionGetter.types.js";
8
+ export * from "./tooltipItemPositionSelector.types.js";
9
9
  export * from "./legendGetter.types.js";
10
10
  export * from "./getSeriesWithDefaultValues.types.js";
11
11
  export * from "./identifierSerializer.types.js";
@@ -80,14 +80,14 @@ Object.keys(_tooltipGetter).forEach(function (key) {
80
80
  }
81
81
  });
82
82
  });
83
- var _tooltipItemPositionGetter = require("./tooltipItemPositionGetter.types");
84
- Object.keys(_tooltipItemPositionGetter).forEach(function (key) {
83
+ var _tooltipItemPositionSelector = require("./tooltipItemPositionSelector.types");
84
+ Object.keys(_tooltipItemPositionSelector).forEach(function (key) {
85
85
  if (key === "default" || key === "__esModule") return;
86
- if (key in exports && exports[key] === _tooltipItemPositionGetter[key]) return;
86
+ if (key in exports && exports[key] === _tooltipItemPositionSelector[key]) return;
87
87
  Object.defineProperty(exports, key, {
88
88
  enumerable: true,
89
89
  get: function () {
90
- return _tooltipItemPositionGetter[key];
90
+ return _tooltipItemPositionSelector[key];
91
91
  }
92
92
  });
93
93
  });
@@ -5,7 +5,7 @@ export * from "./seriesConfig.types.mjs";
5
5
  export * from "./seriesProcessor.types.mjs";
6
6
  export * from "./seriesLayout.types.mjs";
7
7
  export * from "./tooltipGetter.types.mjs";
8
- export * from "./tooltipItemPositionGetter.types.mjs";
8
+ export * from "./tooltipItemPositionSelector.types.mjs";
9
9
  export * from "./legendGetter.types.mjs";
10
10
  export * from "./getSeriesWithDefaultValues.types.mjs";
11
11
  export * from "./identifierSerializer.types.mjs";
@@ -7,7 +7,7 @@ import type { LegendGetter } from "./legendGetter.types.mjs";
7
7
  import type { AxisTooltipGetter, TooltipGetter } from "./tooltipGetter.types.mjs";
8
8
  import type { PolarExtremumGetter } from "./polarExtremumGetter.types.mjs";
9
9
  import type { GetSeriesWithDefaultValues } from "./getSeriesWithDefaultValues.types.mjs";
10
- import type { TooltipItemPositionGetter, TooltipItemPositionSelector } from "./tooltipItemPositionGetter.types.mjs";
10
+ import type { TooltipItemPositionSelector } from "./tooltipItemPositionSelector.types.mjs";
11
11
  import type { SeriesLayoutGetter } from "./seriesLayout.types.mjs";
12
12
  import type { KeyboardFocusHandler } from "../../../featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.mjs";
13
13
  import type { IdentifierSerializer } from "./identifierSerializer.types.mjs";
@@ -18,6 +18,7 @@ import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/use
18
18
  import type { UseChartPolarAxisSignature } from "../../../featurePlugins/useChartPolarAxis/index.mjs";
19
19
  import type { HighlightCreator } from "../../../featurePlugins/useChartHighlight/highlightCreator.types.mjs";
20
20
  import type { AxisTooltipContentProps, ItemTooltipContentProps } from "./TooltipContent.types.mjs";
21
+ import type { SamplingStrategy } from "../../../featurePlugins/useChartCartesianAxis/sampling.types.mjs";
21
22
  export type ChartSeriesTypeRequiredPlugins<SeriesType extends ChartSeriesType> = ChartsSeriesConfig[SeriesType] extends {
22
23
  axisType: 'cartesian';
23
24
  } ? [UseChartCartesianAxisSignature] : ChartsSeriesConfig[SeriesType] extends {
@@ -33,13 +34,12 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
33
34
  legendGetter: LegendGetter<SeriesType>;
34
35
  tooltipGetter: TooltipGetter<SeriesType>;
35
36
  ItemTooltipContent?: React.ComponentType<ItemTooltipContentProps<SeriesType>>;
36
- tooltipItemPositionGetter?: TooltipItemPositionGetter<SeriesType>;
37
37
  /**
38
- * Computes the item tooltip position from the chart state, for series types
39
- * whose position depends on state the core tooltip plugin doesn't track.
40
- * Takes precedence over `tooltipItemPositionGetter`.
38
+ * Computes the item tooltip anchor position from the chart state. Provided by
39
+ * the series type so it reads only the state it needs (axes, layout, geo
40
+ * projection, …). When omitted, the item tooltip follows the pointer.
41
41
  */
42
- selectorTooltipItemPosition?: TooltipItemPositionSelector;
42
+ selectorTooltipItemPosition?: TooltipItemPositionSelector<SeriesType>;
43
43
  getSeriesWithDefaultValues: GetSeriesWithDefaultValues<SeriesType>;
44
44
  keyboardFocusHandler?: KeyboardFocusHandler<SeriesType>;
45
45
  /**
@@ -56,6 +56,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
56
56
  */
57
57
  identifierCleaner: IdentifierCleaner<SeriesType>;
58
58
  getItemAtPosition?: GetItemAtPosition<SeriesType>;
59
+ /**
60
+ * Optional sampling strategy used to render large datasets. When set and sampling is enabled,
61
+ * the series is reduced to a zoom-appropriate level of detail before rendering.
62
+ */
63
+ sampler?: SamplingStrategy<SeriesType>;
59
64
  descriptionGetter: DescriptionGetter<SeriesType>;
60
65
  isHighlightedCreator: HighlightCreator<SeriesType>;
61
66
  isFadedCreator: HighlightCreator<SeriesType>;
@@ -7,7 +7,7 @@ import type { LegendGetter } from "./legendGetter.types.js";
7
7
  import type { AxisTooltipGetter, TooltipGetter } from "./tooltipGetter.types.js";
8
8
  import type { PolarExtremumGetter } from "./polarExtremumGetter.types.js";
9
9
  import type { GetSeriesWithDefaultValues } from "./getSeriesWithDefaultValues.types.js";
10
- import type { TooltipItemPositionGetter, TooltipItemPositionSelector } from "./tooltipItemPositionGetter.types.js";
10
+ import type { TooltipItemPositionSelector } from "./tooltipItemPositionSelector.types.js";
11
11
  import type { SeriesLayoutGetter } from "./seriesLayout.types.js";
12
12
  import type { KeyboardFocusHandler } from "../../../featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.js";
13
13
  import type { IdentifierSerializer } from "./identifierSerializer.types.js";
@@ -18,6 +18,7 @@ import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/use
18
18
  import type { UseChartPolarAxisSignature } from "../../../featurePlugins/useChartPolarAxis/index.js";
19
19
  import type { HighlightCreator } from "../../../featurePlugins/useChartHighlight/highlightCreator.types.js";
20
20
  import type { AxisTooltipContentProps, ItemTooltipContentProps } from "./TooltipContent.types.js";
21
+ import type { SamplingStrategy } from "../../../featurePlugins/useChartCartesianAxis/sampling.types.js";
21
22
  export type ChartSeriesTypeRequiredPlugins<SeriesType extends ChartSeriesType> = ChartsSeriesConfig[SeriesType] extends {
22
23
  axisType: 'cartesian';
23
24
  } ? [UseChartCartesianAxisSignature] : ChartsSeriesConfig[SeriesType] extends {
@@ -33,13 +34,12 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
33
34
  legendGetter: LegendGetter<SeriesType>;
34
35
  tooltipGetter: TooltipGetter<SeriesType>;
35
36
  ItemTooltipContent?: React.ComponentType<ItemTooltipContentProps<SeriesType>>;
36
- tooltipItemPositionGetter?: TooltipItemPositionGetter<SeriesType>;
37
37
  /**
38
- * Computes the item tooltip position from the chart state, for series types
39
- * whose position depends on state the core tooltip plugin doesn't track.
40
- * Takes precedence over `tooltipItemPositionGetter`.
38
+ * Computes the item tooltip anchor position from the chart state. Provided by
39
+ * the series type so it reads only the state it needs (axes, layout, geo
40
+ * projection, …). When omitted, the item tooltip follows the pointer.
41
41
  */
42
- selectorTooltipItemPosition?: TooltipItemPositionSelector;
42
+ selectorTooltipItemPosition?: TooltipItemPositionSelector<SeriesType>;
43
43
  getSeriesWithDefaultValues: GetSeriesWithDefaultValues<SeriesType>;
44
44
  keyboardFocusHandler?: KeyboardFocusHandler<SeriesType>;
45
45
  /**
@@ -56,6 +56,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
56
56
  */
57
57
  identifierCleaner: IdentifierCleaner<SeriesType>;
58
58
  getItemAtPosition?: GetItemAtPosition<SeriesType>;
59
+ /**
60
+ * Optional sampling strategy used to render large datasets. When set and sampling is enabled,
61
+ * the series is reduced to a zoom-appropriate level of detail before rendering.
62
+ */
63
+ sampler?: SamplingStrategy<SeriesType>;
59
64
  descriptionGetter: DescriptionGetter<SeriesType>;
60
65
  isHighlightedCreator: HighlightCreator<SeriesType>;
61
66
  isFadedCreator: HighlightCreator<SeriesType>;
@@ -0,0 +1,18 @@
1
+ import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
2
+ import type { ChartState } from "../../../models/index.mjs";
3
+ import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/useChartCartesianAxis/index.mjs";
4
+ import type { UseChartInteractionSignature } from "../../../featurePlugins/useChartInteraction/index.mjs";
5
+ import type { UseChartTooltipSignature } from "../../../featurePlugins/useChartTooltip/index.mjs";
6
+ /**
7
+ * Computes the anchor position of an item tooltip from the chart state. Each
8
+ * series type provides one of these so it reads only the state it needs (axes,
9
+ * layout, geo projection, …) and the feature-specific code stays out of the core
10
+ * bundle.
11
+ * @param {ChartState} state The chart state.
12
+ * @param {'top' | 'bottom' | 'left' | 'right' | undefined} position The preferred placement of the tooltip.
13
+ * @returns {{ x: number; y: number } | null} The tooltip anchor position, or `null` when it cannot be computed.
14
+ */
15
+ export type TooltipItemPositionSelector<SeriesType extends ChartSeriesType> = (state: ChartState<[UseChartCartesianAxisSignature<SeriesType>, UseChartInteractionSignature, UseChartTooltipSignature<SeriesType>]>, position: 'top' | 'bottom' | 'left' | 'right' | undefined) => {
16
+ x: number;
17
+ y: number;
18
+ } | null;
@@ -0,0 +1,18 @@
1
+ import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
2
+ import type { ChartState } from "../../../models/index.js";
3
+ import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/useChartCartesianAxis/index.js";
4
+ import type { UseChartInteractionSignature } from "../../../featurePlugins/useChartInteraction/index.js";
5
+ import type { UseChartTooltipSignature } from "../../../featurePlugins/useChartTooltip/index.js";
6
+ /**
7
+ * Computes the anchor position of an item tooltip from the chart state. Each
8
+ * series type provides one of these so it reads only the state it needs (axes,
9
+ * layout, geo projection, …) and the feature-specific code stays out of the core
10
+ * bundle.
11
+ * @param {ChartState} state The chart state.
12
+ * @param {'top' | 'bottom' | 'left' | 'right' | undefined} position The preferred placement of the tooltip.
13
+ * @returns {{ x: number; y: number } | null} The tooltip anchor position, or `null` when it cannot be computed.
14
+ */
15
+ export type TooltipItemPositionSelector<SeriesType extends ChartSeriesType> = (state: ChartState<[UseChartCartesianAxisSignature<SeriesType>, UseChartInteractionSignature, UseChartTooltipSignature<SeriesType>]>, position: 'top' | 'bottom' | 'left' | 'right' | undefined) => {
16
+ x: number;
17
+ y: number;
18
+ } | null;
@@ -12,4 +12,6 @@ export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.mjs";
12
12
  export * from "./computeAxisValue.mjs";
13
13
  export * from "./createZoomLookup.mjs";
14
14
  export * from "./zoom.types.mjs";
15
+ export * from "./sampling.selectors.mjs";
16
+ export type * from "./sampling.types.mjs";
15
17
  export { computeAxisAutoSize } from "./computeAxisAutoSize.mjs";
@@ -12,4 +12,6 @@ export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.js";
12
12
  export * from "./computeAxisValue.js";
13
13
  export * from "./createZoomLookup.js";
14
14
  export * from "./zoom.types.js";
15
+ export * from "./sampling.selectors.js";
16
+ export type * from "./sampling.types.js";
15
17
  export { computeAxisAutoSize } from "./computeAxisAutoSize.js";
@@ -163,4 +163,16 @@ Object.keys(_zoom).forEach(function (key) {
163
163
  }
164
164
  });
165
165
  });
166
+ var _sampling = require("./sampling.selectors");
167
+ Object.keys(_sampling).forEach(function (key) {
168
+ if (key === "default" || key === "__esModule") return;
169
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
170
+ if (key in exports && exports[key] === _sampling[key]) return;
171
+ Object.defineProperty(exports, key, {
172
+ enumerable: true,
173
+ get: function () {
174
+ return _sampling[key];
175
+ }
176
+ });
177
+ });
166
178
  var _computeAxisAutoSize = require("./computeAxisAutoSize");
@@ -11,4 +11,5 @@ export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.mjs";
11
11
  export * from "./computeAxisValue.mjs";
12
12
  export * from "./createZoomLookup.mjs";
13
13
  export * from "./zoom.types.mjs";
14
+ export * from "./sampling.selectors.mjs";
14
15
  export { computeAxisAutoSize } from "./computeAxisAutoSize.mjs";
@@ -0,0 +1,26 @@
1
+ import type { AxisId } from "../../../../models/axis.mjs";
2
+ import type { ChartRootSelector } from "../../utils/selectors.mjs";
3
+ import type { UseChartCartesianAxisSignature } from "./useChartCartesianAxis.types.mjs";
4
+ import type { SampledSeriesLookup } from "./sampling.types.mjs";
5
+ import type { ZoomData } from "./zoom.types.mjs";
6
+ /**
7
+ * Full-range zoom (span 100%) for a non-zoomable axis. Sampling gates on a zoom entry; a static axis
8
+ * has none, so we sample it at full range — the `MAX_RENDERED_POINTS` cap still applies. Mirrors the
9
+ * full-range zoom the zoom-slider preview uses to keep its density stable.
10
+ */
11
+ export declare function getFullRangeZoom(axisId: AxisId): ZoomData;
12
+ export declare const selectorChartSamplingState: ChartRootSelector<UseChartCartesianAxisSignature, 'sampling'>;
13
+ /**
14
+ * Built sampling structures keyed by series id. Memoized, so rebuilt only on data change. Builds
15
+ * only for series types that are enabled and register a `sampler`; the plot hook reads them back.
16
+ */
17
+ export declare const selectorChartSamplingPyramids: (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 & import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState & Partial<{}> & {
18
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
19
+ }) => SampledSeriesLookup;
20
+ /**
21
+ * Merged bucket size per band axis, to widen the axis highlight over a sampled bucket. Empty when
22
+ * sampling is off or no sampler is registered. The math lives in pro; community reads the integers.
23
+ */
24
+ export declare const selectorChartHighlightBucketSize: (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 & import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState & Partial<{}> & {
25
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
26
+ }) => Map<AxisId, number>;
@@ -0,0 +1,26 @@
1
+ import type { AxisId } from "../../../../models/axis.js";
2
+ import type { ChartRootSelector } from "../../utils/selectors.js";
3
+ import type { UseChartCartesianAxisSignature } from "./useChartCartesianAxis.types.js";
4
+ import type { SampledSeriesLookup } from "./sampling.types.js";
5
+ import type { ZoomData } from "./zoom.types.js";
6
+ /**
7
+ * Full-range zoom (span 100%) for a non-zoomable axis. Sampling gates on a zoom entry; a static axis
8
+ * has none, so we sample it at full range — the `MAX_RENDERED_POINTS` cap still applies. Mirrors the
9
+ * full-range zoom the zoom-slider preview uses to keep its density stable.
10
+ */
11
+ export declare function getFullRangeZoom(axisId: AxisId): ZoomData;
12
+ export declare const selectorChartSamplingState: ChartRootSelector<UseChartCartesianAxisSignature, 'sampling'>;
13
+ /**
14
+ * Built sampling structures keyed by series id. Memoized, so rebuilt only on data change. Builds
15
+ * only for series types that are enabled and register a `sampler`; the plot hook reads them back.
16
+ */
17
+ export declare const selectorChartSamplingPyramids: (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 & import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState & Partial<{}> & {
18
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
19
+ }) => SampledSeriesLookup;
20
+ /**
21
+ * Merged bucket size per band axis, to widen the axis highlight over a sampled bucket. Empty when
22
+ * sampling is off or no sampler is registered. The math lives in pro; community reads the integers.
23
+ */
24
+ export declare const selectorChartHighlightBucketSize: (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 & import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState & Partial<{}> & {
25
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
26
+ }) => Map<AxisId, number>;
@@ -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
+ }