@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
@@ -1,5 +1,8 @@
1
1
  import { findMinMax } from "./findMinMax.mjs";
2
2
  import { getBandSize } from "./getBandSize.mjs";
3
+
4
+ /** Minimum on-screen gap (px) kept between merged (sampled) bars so they stay distinguishable. */
5
+ const MIN_SAMPLED_BAR_GAP_PX = 2;
3
6
  function shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {
4
7
  const isVerticalAndPositive = verticalLayout && baseValue > 0;
5
8
  const isHorizontalAndNegative = !verticalLayout && baseValue < 0;
@@ -52,4 +55,46 @@ export function createGetBarDimensions(params) {
52
55
  width: verticalLayout ? barWidth : barSize
53
56
  };
54
57
  };
58
+ }
59
+
60
+ /** Like {@link createGetBarDimensions}, but for a sampled bucket spanning several categories. */
61
+ export function createGetBucketBarDimensions(params) {
62
+ const {
63
+ verticalLayout,
64
+ xAxisConfig,
65
+ yAxisConfig,
66
+ series,
67
+ numberOfGroups
68
+ } = params;
69
+ const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
70
+ const baseScale = baseScaleConfig.scale;
71
+ const bandwidth = baseScale.bandwidth();
72
+ const step = baseScale.step();
73
+ const valueScale = verticalLayout ? yAxisConfig.scale : xAxisConfig.scale;
74
+ return function getBucketBarDimensions(startIndex, endIndex, min, max, groupIndex) {
75
+ const spanStart = baseScale(baseScaleConfig.data[startIndex]);
76
+ const bucketCount = endIndex - startIndex + 1;
77
+ const bucketStride = bucketCount * step;
78
+
79
+ // Keep the gap between buckets proportional to the bucket (same ratio as an unsampled chart),
80
+ // but never thinner than MIN_SAMPLED_BAR_GAP_PX so it stays visible at every level and zoom.
81
+ const gap = Math.min(bucketStride / 2, Math.max(bucketCount * (step - bandwidth), MIN_SAMPLED_BAR_GAP_PX));
82
+ const {
83
+ barWidth,
84
+ offset
85
+ } = getBandSize(bucketStride - gap, numberOfGroups, baseScaleConfig.barGapRatio);
86
+ const barOffset = groupIndex * (barWidth + offset);
87
+ const valueCoordinates = [valueScale(min), valueScale(max)];
88
+ const [minValueCoord, maxValueCoord] = findMinMax(valueCoordinates).map(v => Math.round(v));
89
+ let barSize = maxValueCoord - minValueCoord;
90
+ if (!series.hidden && barSize > 0) {
91
+ barSize = Math.max(series.minBarSize, barSize);
92
+ }
93
+ return {
94
+ x: verticalLayout ? spanStart + barOffset : minValueCoord,
95
+ y: verticalLayout ? minValueCoord : spanStart + barOffset,
96
+ height: verticalLayout ? barSize : barWidth,
97
+ width: verticalLayout ? barWidth : barSize
98
+ };
99
+ };
55
100
  }
@@ -18,7 +18,7 @@ const ANGLE_APPROX = 5; // Angle (in deg) for which we approximate the rectangle
18
18
  */
19
19
  function getMinXTranslation(width, height, angle = 0) {
20
20
  if (process.env.NODE_ENV !== 'production') {
21
- if (angle > 90 && angle < -90) {
21
+ if (angle > 90 || angle < -90) {
22
22
  (0, _warning.warnOnce)([`MUI X Charts: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, `This could cause some text overlapping.`, `If you encounter a use case where it's needed, please open an issue.`]);
23
23
  }
24
24
  }
@@ -12,7 +12,7 @@ const ANGLE_APPROX = 5; // Angle (in deg) for which we approximate the rectangle
12
12
  */
13
13
  export function getMinXTranslation(width, height, angle = 0) {
14
14
  if (process.env.NODE_ENV !== 'production') {
15
- if (angle > 90 && angle < -90) {
15
+ if (angle > 90 || angle < -90) {
16
16
  warnOnce([`MUI X Charts: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, `This could cause some text overlapping.`, `If you encounter a use case where it's needed, please open an issue.`]);
17
17
  }
18
18
  }
@@ -0,0 +1,6 @@
1
+ import type { AxisGroup } from "../models/axis.mjs";
2
+ export declare const getGroupingConfig: (groups: AxisGroup[], groupIndex: number, tickSize: number | undefined, computedGroupTickSizes?: number[]) => {
3
+ tickSize: number;
4
+ getValue: (value: any, dataIndex: number) => string | number | Date;
5
+ tickLabelStyle?: import("../index.mjs").ChartsTextProps["style"];
6
+ };
@@ -0,0 +1,6 @@
1
+ import type { AxisGroup } from "../models/axis.js";
2
+ export declare const getGroupingConfig: (groups: AxisGroup[], groupIndex: number, tickSize: number | undefined, computedGroupTickSizes?: number[]) => {
3
+ tickSize: number;
4
+ getValue: (value: any, dataIndex: number) => string | number | Date;
5
+ tickLabelStyle?: import("../index.js").ChartsTextProps["style"];
6
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getGroupingConfig = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ const DEFAULT_GROUPING_CONFIG = {
10
+ tickSize: 6
11
+ };
12
+ const getGroupingConfig = (groups, groupIndex, tickSize, computedGroupTickSizes) => {
13
+ const config = groups[groupIndex] ?? {};
14
+ const defaultTickSize = tickSize ?? DEFAULT_GROUPING_CONFIG.tickSize;
15
+ const calculatedTickSize = defaultTickSize * groupIndex * 2 + defaultTickSize;
16
+ return (0, _extends2.default)({}, DEFAULT_GROUPING_CONFIG, config, {
17
+ tickSize: computedGroupTickSizes?.[groupIndex] ?? config.tickSize ?? calculatedTickSize
18
+ });
19
+ };
20
+ exports.getGroupingConfig = getGroupingConfig;
@@ -0,0 +1,12 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ const DEFAULT_GROUPING_CONFIG = {
3
+ tickSize: 6
4
+ };
5
+ export const getGroupingConfig = (groups, groupIndex, tickSize, computedGroupTickSizes) => {
6
+ const config = groups[groupIndex] ?? {};
7
+ const defaultTickSize = tickSize ?? DEFAULT_GROUPING_CONFIG.tickSize;
8
+ const calculatedTickSize = defaultTickSize * groupIndex * 2 + defaultTickSize;
9
+ return _extends({}, DEFAULT_GROUPING_CONFIG, config, {
10
+ tickSize: computedGroupTickSizes?.[groupIndex] ?? config.tickSize ?? calculatedTickSize
11
+ });
12
+ };
@@ -20,6 +20,7 @@ export * from "../ChartsContainer/useChartsContainerProps.mjs";
20
20
  export * from "../ChartsDataProvider/useChartsDataProviderProps.mjs";
21
21
  export * from "../ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs";
22
22
  export * from "./seriesSelectorOfType.mjs";
23
+ export * from "./createGetBarDimensions.mjs";
23
24
  export { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
24
25
  export { useRegisterPointerInteractions } from "./plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs";
25
26
  export * from "./plugins/corePlugins/useChartId/index.mjs";
@@ -37,8 +38,6 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.mjs";
37
38
  export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
38
39
  export * from "./plugins/featurePlugins/useChartClosestPoint/index.mjs";
39
40
  export * from "./plugins/featurePlugins/useChartBrush/index.mjs";
40
- export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs";
41
- export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs";
42
41
  export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
43
42
  export * from "./plugins/featurePlugins/useProgressiveRendering/index.mjs";
44
43
  export * from "./plugins/utils/selectors.mjs";
@@ -20,6 +20,7 @@ export * from "../ChartsContainer/useChartsContainerProps.js";
20
20
  export * from "../ChartsDataProvider/useChartsDataProviderProps.js";
21
21
  export * from "../ChartsRadialDataProvider/useChartsRadialDataProviderProps.js";
22
22
  export * from "./seriesSelectorOfType.js";
23
+ export * from "./createGetBarDimensions.js";
23
24
  export { useSkipAnimation } from "../hooks/useSkipAnimation.js";
24
25
  export { useRegisterPointerInteractions } from "./plugins/featurePlugins/shared/useRegisterPointerInteractions.js";
25
26
  export * from "./plugins/corePlugins/useChartId/index.js";
@@ -37,8 +38,6 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.js";
37
38
  export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.js";
38
39
  export * from "./plugins/featurePlugins/useChartClosestPoint/index.js";
39
40
  export * from "./plugins/featurePlugins/useChartBrush/index.js";
40
- export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js";
41
- export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.js";
42
41
  export * from "./plugins/featurePlugins/useChartItemClick/index.js";
43
42
  export * from "./plugins/featurePlugins/useProgressiveRendering/index.js";
44
43
  export * from "./plugins/utils/selectors.js";
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -20,8 +19,6 @@ var _exportNames = {
20
19
  useRadarChartProps: true,
21
20
  useSkipAnimation: true,
22
21
  useRegisterPointerInteractions: true,
23
- useGeoProjectionSelectors: true,
24
- useGeoProjectionTypes: true,
25
22
  getCartesianAxisTriggerTooltip: true,
26
23
  getCartesianAxisIndex: true,
27
24
  getRotationAxisIndex: true,
@@ -165,7 +162,6 @@ Object.defineProperty(exports, "useDrawingArea", {
165
162
  return _useDrawingArea.useDrawingArea;
166
163
  }
167
164
  });
168
- exports.useGeoProjectionTypes = exports.useGeoProjectionSelectors = void 0;
169
165
  Object.defineProperty(exports, "useInteractionItemProps", {
170
166
  enumerable: true,
171
167
  get: function () {
@@ -351,6 +347,18 @@ Object.keys(_seriesSelectorOfType).forEach(function (key) {
351
347
  }
352
348
  });
353
349
  });
350
+ var _createGetBarDimensions = require("./createGetBarDimensions");
351
+ Object.keys(_createGetBarDimensions).forEach(function (key) {
352
+ if (key === "default" || key === "__esModule") return;
353
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
354
+ if (key in exports && exports[key] === _createGetBarDimensions[key]) return;
355
+ Object.defineProperty(exports, key, {
356
+ enumerable: true,
357
+ get: function () {
358
+ return _createGetBarDimensions[key];
359
+ }
360
+ });
361
+ });
354
362
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
355
363
  var _useRegisterPointerInteractions = require("./plugins/featurePlugins/shared/useRegisterPointerInteractions");
356
364
  var _useChartId = require("./plugins/corePlugins/useChartId");
@@ -533,10 +541,6 @@ Object.keys(_useChartBrush).forEach(function (key) {
533
541
  }
534
542
  });
535
543
  });
536
- var _useGeoProjectionSelectors = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors"));
537
- exports.useGeoProjectionSelectors = _useGeoProjectionSelectors;
538
- var _useGeoProjectionTypes = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.types"));
539
- exports.useGeoProjectionTypes = _useGeoProjectionTypes;
540
544
  var _useChartItemClick = require("./plugins/featurePlugins/useChartItemClick");
541
545
  Object.keys(_useChartItemClick).forEach(function (key) {
542
546
  if (key === "default" || key === "__esModule") return;
@@ -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,12 +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;
35
+ selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.mjs").TooltipItemPositionSelector<"pie"> | undefined;
36
36
  getSeriesWithDefaultValues: import("../useChartSeriesConfig/index.mjs").GetSeriesWithDefaultValues<"pie">;
37
37
  keyboardFocusHandler?: import("../../../index.mjs").KeyboardFocusHandler<"pie"> | undefined;
38
38
  identifierSerializer: import("../useChartSeriesConfig/index.mjs").IdentifierSerializer<"pie">;
39
39
  identifierCleaner: import("../useChartSeriesConfig/index.mjs").IdentifierCleaner<"pie">;
40
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.mjs").GetItemAtPosition<"pie"> | undefined;
41
+ sampler?: import("../../../index.mjs").SamplingStrategy<"pie", unknown> | undefined;
41
42
  descriptionGetter: import("../useChartSeriesConfig/index.mjs").DescriptionGetter<"pie">;
42
43
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
43
44
  isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
@@ -32,12 +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;
35
+ selectorTooltipItemPosition?: import("../useChartSeriesConfig/index.js").TooltipItemPositionSelector<"pie"> | undefined;
36
36
  getSeriesWithDefaultValues: import("../useChartSeriesConfig/index.js").GetSeriesWithDefaultValues<"pie">;
37
37
  keyboardFocusHandler?: import("../../../index.js").KeyboardFocusHandler<"pie"> | undefined;
38
38
  identifierSerializer: import("../useChartSeriesConfig/index.js").IdentifierSerializer<"pie">;
39
39
  identifierCleaner: import("../useChartSeriesConfig/index.js").IdentifierCleaner<"pie">;
40
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.js").GetItemAtPosition<"pie"> | undefined;
41
+ sampler?: import("../../../index.js").SamplingStrategy<"pie", unknown> | undefined;
41
42
  descriptionGetter: import("../useChartSeriesConfig/index.js").DescriptionGetter<"pie">;
42
43
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
43
44
  isFadedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
@@ -6,7 +6,7 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.mj
6
6
  * Map data index to a color.
7
7
  * If dataIndex is not defined, it falls back to the series color when defined.
8
8
  */
9
- export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (dataIndex?: number) => string | null : (dataIndex?: number) => string;
9
+ export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (name?: string) => string | null : (dataIndex?: number) => string;
10
10
  export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>,
11
11
  /**
12
12
  * Either the x-axis or rotation-axis, depending on the coordinate system.
@@ -6,7 +6,7 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.js
6
6
  * Map data index to a color.
7
7
  * If dataIndex is not defined, it falls back to the series color when defined.
8
8
  */
9
- export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (dataIndex?: number) => string | null : (dataIndex?: number) => string;
9
+ export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : SeriesType extends 'mapShape' ? (name?: string) => string | null : (dataIndex?: number) => string;
10
10
  export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>,
11
11
  /**
12
12
  * Either the x-axis or rotation-axis, depending on the coordinate system.
@@ -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 } 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,7 +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
+ /**
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
+ */
42
+ selectorTooltipItemPosition?: TooltipItemPositionSelector<SeriesType>;
37
43
  getSeriesWithDefaultValues: GetSeriesWithDefaultValues<SeriesType>;
38
44
  keyboardFocusHandler?: KeyboardFocusHandler<SeriesType>;
39
45
  /**
@@ -50,6 +56,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
50
56
  */
51
57
  identifierCleaner: IdentifierCleaner<SeriesType>;
52
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>;
53
64
  descriptionGetter: DescriptionGetter<SeriesType>;
54
65
  isHighlightedCreator: HighlightCreator<SeriesType>;
55
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 } 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,7 +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
+ /**
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
+ */
42
+ selectorTooltipItemPosition?: TooltipItemPositionSelector<SeriesType>;
37
43
  getSeriesWithDefaultValues: GetSeriesWithDefaultValues<SeriesType>;
38
44
  keyboardFocusHandler?: KeyboardFocusHandler<SeriesType>;
39
45
  /**
@@ -50,6 +56,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
50
56
  */
51
57
  identifierCleaner: IdentifierCleaner<SeriesType>;
52
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>;
53
64
  descriptionGetter: DescriptionGetter<SeriesType>;
54
65
  isHighlightedCreator: HighlightCreator<SeriesType>;
55
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>;