@mui/x-charts 9.3.0 → 9.5.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 (264) hide show
  1. package/BarChart/BarElement.d.mts +3 -2
  2. package/BarChart/BarElement.d.ts +3 -2
  3. package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
  4. package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
  5. package/BarChart/seriesConfig/bar/extremums.js +7 -2
  6. package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
  7. package/CHANGELOG.md +296 -0
  8. package/ChartsContainer/ChartsContainer.js +21 -0
  9. package/ChartsContainer/ChartsContainer.mjs +21 -0
  10. package/ChartsLabel/ChartsLabelMark.js +1 -21
  11. package/ChartsLabel/ChartsLabelMark.mjs +0 -20
  12. package/ChartsLegend/chartsLegend.types.d.mts +3 -2
  13. package/ChartsLegend/chartsLegend.types.d.ts +3 -2
  14. package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
  15. package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
  16. package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
  17. package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
  18. package/ChartsRadialAxisHighlight/index.d.mts +6 -1
  19. package/ChartsRadialAxisHighlight/index.d.ts +6 -1
  20. package/ChartsRadialAxisHighlight/index.js +9 -2
  21. package/ChartsRadialAxisHighlight/index.mjs +8 -1
  22. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +1 -1
  23. package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +1 -1
  24. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +1 -1
  25. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +1 -1
  26. package/ChartsRadialDataProvider/index.d.mts +5 -0
  27. package/ChartsRadialDataProvider/index.d.ts +5 -0
  28. package/ChartsRadialDataProvider/index.js +12 -1
  29. package/ChartsRadialDataProvider/index.mjs +7 -0
  30. package/ChartsRadialGrid/index.d.mts +6 -1
  31. package/ChartsRadialGrid/index.d.ts +6 -1
  32. package/ChartsRadialGrid/index.js +8 -2
  33. package/ChartsRadialGrid/index.mjs +8 -1
  34. package/ChartsRadiusAxis/index.d.mts +6 -1
  35. package/ChartsRadiusAxis/index.d.ts +6 -1
  36. package/ChartsRadiusAxis/index.js +10 -2
  37. package/ChartsRadiusAxis/index.mjs +7 -1
  38. package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
  39. package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
  40. package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
  41. package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
  42. package/ChartsRotationAxis/index.d.mts +6 -1
  43. package/ChartsRotationAxis/index.d.ts +6 -1
  44. package/ChartsRotationAxis/index.js +10 -2
  45. package/ChartsRotationAxis/index.mjs +7 -1
  46. package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
  47. package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
  48. package/ChartsTooltip/ChartsTooltipContainer.js +11 -4
  49. package/ChartsTooltip/ChartsTooltipContainer.mjs +11 -4
  50. package/ChartsTooltip/useAxesTooltip.js +2 -2
  51. package/ChartsTooltip/useAxesTooltip.mjs +2 -2
  52. package/ChartsTooltip/useItemTooltip.js +2 -2
  53. package/ChartsTooltip/useItemTooltip.mjs +2 -2
  54. package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
  55. package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
  56. package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
  57. package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
  58. package/LineChart/AreaElement.d.mts +3 -2
  59. package/LineChart/AreaElement.d.ts +3 -2
  60. package/LineChart/AreaElement.js +1 -1
  61. package/LineChart/AreaElement.mjs +1 -1
  62. package/LineChart/CircleMarkElement.js +1 -1
  63. package/LineChart/CircleMarkElement.mjs +1 -1
  64. package/LineChart/LineElement.d.mts +3 -2
  65. package/LineChart/LineElement.d.ts +3 -2
  66. package/LineChart/LineElement.js +1 -1
  67. package/LineChart/LineElement.mjs +1 -1
  68. package/LineChart/LineHighlightPlot.d.mts +3 -2
  69. package/LineChart/LineHighlightPlot.d.ts +3 -2
  70. package/LineChart/LineHighlightPlot.js +65 -45
  71. package/LineChart/LineHighlightPlot.mjs +65 -45
  72. package/LineChart/MarkElement.js +1 -1
  73. package/LineChart/MarkElement.mjs +1 -1
  74. package/LineChart/MarkPlot.d.mts +3 -2
  75. package/LineChart/MarkPlot.d.ts +3 -2
  76. package/LineChart/seriesConfig/curveEvaluation.js +28 -14
  77. package/LineChart/seriesConfig/curveEvaluation.mjs +27 -14
  78. package/LineChart/seriesConfig/extremums.js +5 -1
  79. package/LineChart/seriesConfig/extremums.mjs +5 -1
  80. package/LineChart/useMarkPlotData.js +3 -1
  81. package/LineChart/useMarkPlotData.mjs +3 -1
  82. package/PieChart/PieArcLabelPlot.d.mts +3 -2
  83. package/PieChart/PieArcLabelPlot.d.ts +3 -2
  84. package/PieChart/PieArcPlot.d.mts +3 -2
  85. package/PieChart/PieArcPlot.d.ts +3 -2
  86. package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
  87. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  88. package/ScatterChart/BatchScatter.d.mts +2 -8
  89. package/ScatterChart/BatchScatter.d.ts +2 -8
  90. package/ScatterChart/BatchScatter.js +17 -12
  91. package/ScatterChart/BatchScatter.mjs +17 -12
  92. package/ScatterChart/FocusedScatterMark.js +2 -2
  93. package/ScatterChart/FocusedScatterMark.mjs +2 -2
  94. package/ScatterChart/HighlightedScatterMark.js +3 -3
  95. package/ScatterChart/HighlightedScatterMark.mjs +3 -3
  96. package/ScatterChart/Scatter.d.mts +5 -0
  97. package/ScatterChart/Scatter.d.ts +5 -0
  98. package/ScatterChart/Scatter.js +7 -2
  99. package/ScatterChart/Scatter.mjs +7 -2
  100. package/ScatterChart/ScatterChart.d.mts +2 -1
  101. package/ScatterChart/ScatterChart.d.ts +2 -1
  102. package/ScatterChart/ScatterChart.js +28 -3
  103. package/ScatterChart/ScatterChart.mjs +28 -3
  104. package/ScatterChart/ScatterChart.plugins.d.mts +2 -1
  105. package/ScatterChart/ScatterChart.plugins.d.ts +2 -1
  106. package/ScatterChart/ScatterChart.plugins.js +2 -1
  107. package/ScatterChart/ScatterChart.plugins.mjs +2 -1
  108. package/ScatterChart/ScatterMarker.types.d.mts +3 -2
  109. package/ScatterChart/ScatterMarker.types.d.ts +3 -2
  110. package/ScatterChart/ScatterPlot.d.mts +7 -4
  111. package/ScatterChart/ScatterPlot.d.ts +7 -4
  112. package/ScatterChart/ScatterPlot.js +31 -4
  113. package/ScatterChart/ScatterPlot.mjs +31 -4
  114. package/ScatterChart/async/ScatterAsync.d.mts +9 -0
  115. package/ScatterChart/async/ScatterAsync.d.ts +9 -0
  116. package/ScatterChart/async/ScatterAsync.js +71 -0
  117. package/ScatterChart/async/ScatterAsync.mjs +67 -0
  118. package/ScatterChart/async/ScatterAsyncBatch.d.mts +24 -0
  119. package/ScatterChart/async/ScatterAsyncBatch.d.ts +24 -0
  120. package/ScatterChart/async/ScatterAsyncBatch.js +112 -0
  121. package/ScatterChart/async/ScatterAsyncBatch.mjs +106 -0
  122. package/ScatterChart/async/scatterRenderData.selectors.d.mts +38 -0
  123. package/ScatterChart/async/scatterRenderData.selectors.d.ts +38 -0
  124. package/ScatterChart/async/scatterRenderData.selectors.js +93 -0
  125. package/ScatterChart/async/scatterRenderData.selectors.mjs +87 -0
  126. package/ScatterChart/seriesConfig/extremums.js +6 -0
  127. package/ScatterChart/seriesConfig/extremums.mjs +6 -0
  128. package/ScatterChart/seriesConfig/getColor.js +1 -1
  129. package/ScatterChart/seriesConfig/getColor.mjs +1 -1
  130. package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
  131. package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
  132. package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
  133. package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
  134. package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
  135. package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
  136. package/ScatterChart/useScatterItemPosition.d.mts +4 -0
  137. package/ScatterChart/useScatterItemPosition.d.ts +4 -0
  138. package/ScatterChart/useScatterItemPosition.js +9 -0
  139. package/ScatterChart/useScatterItemPosition.mjs +8 -0
  140. package/SparkLineChart/SparkLineChart.js +2 -1
  141. package/SparkLineChart/SparkLineChart.mjs +2 -1
  142. package/Toolbar/Toolbar.types.d.mts +3 -2
  143. package/Toolbar/Toolbar.types.d.ts +3 -2
  144. package/index.js +1 -1
  145. package/index.mjs +1 -1
  146. package/internals/animation/animation.d.mts +1 -2
  147. package/internals/animation/animation.d.ts +1 -2
  148. package/internals/commonNextFocusItem.d.mts +10 -2
  149. package/internals/commonNextFocusItem.d.ts +10 -2
  150. package/internals/commonNextFocusItem.js +12 -4
  151. package/internals/commonNextFocusItem.mjs +12 -4
  152. package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
  153. package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
  154. package/internals/createCommonKeyboardFocusHandler.js +3 -3
  155. package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
  156. package/internals/getSeriesColorFn.d.mts +5 -5
  157. package/internals/getSeriesColorFn.d.ts +5 -5
  158. package/internals/incompleteDatasetKeysError.d.mts +1 -0
  159. package/internals/incompleteDatasetKeysError.d.ts +1 -0
  160. package/internals/incompleteDatasetKeysError.js +11 -0
  161. package/internals/incompleteDatasetKeysError.mjs +4 -0
  162. package/internals/index.d.mts +3 -0
  163. package/internals/index.d.ts +3 -0
  164. package/internals/index.js +36 -0
  165. package/internals/index.mjs +3 -0
  166. package/internals/plugins/allPlugins.d.mts +4 -3
  167. package/internals/plugins/allPlugins.d.ts +4 -3
  168. package/internals/plugins/allPlugins.js +2 -1
  169. package/internals/plugins/allPlugins.mjs +2 -1
  170. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +12 -3
  171. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +12 -3
  172. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +10 -1
  173. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.mjs +10 -1
  174. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +15 -1
  175. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +15 -1
  176. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
  177. package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
  178. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
  179. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
  180. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
  181. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
  182. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
  183. package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
  184. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +27 -2
  185. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.mjs +27 -2
  186. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -3
  187. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.mjs +1 -3
  188. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
  189. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
  190. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
  191. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
  192. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
  193. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
  194. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
  195. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
  196. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
  197. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
  198. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
  199. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
  200. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +3 -2
  201. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +3 -2
  202. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
  203. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
  204. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
  205. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
  206. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
  207. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
  208. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
  209. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
  210. package/internals/plugins/featurePlugins/useProgressiveRendering/index.d.mts +3 -0
  211. package/internals/plugins/featurePlugins/useProgressiveRendering/index.d.ts +3 -0
  212. package/internals/plugins/featurePlugins/useProgressiveRendering/index.js +27 -0
  213. package/internals/plugins/featurePlugins/useProgressiveRendering/index.mjs +2 -0
  214. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.d.mts +13 -0
  215. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.d.ts +13 -0
  216. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.js +136 -0
  217. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.mjs +128 -0
  218. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.mts +42 -0
  219. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.d.ts +42 -0
  220. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.js +166 -0
  221. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.mjs +159 -0
  222. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.types.d.mts +34 -0
  223. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.types.d.ts +34 -0
  224. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.types.js +5 -0
  225. package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.types.mjs +1 -0
  226. package/internals/scales/scaleBand.js +70 -43
  227. package/internals/scales/scaleBand.mjs +71 -44
  228. package/internals/sizeScale.d.mts +6 -0
  229. package/internals/sizeScale.d.ts +6 -0
  230. package/internals/sizeScale.js +46 -0
  231. package/internals/sizeScale.mjs +38 -0
  232. package/models/axis.d.mts +18 -12
  233. package/models/axis.d.ts +18 -12
  234. package/models/chartsSlotsComponentsProps.d.mts +25 -0
  235. package/models/chartsSlotsComponentsProps.d.ts +25 -0
  236. package/models/chartsSlotsComponentsProps.js +5 -0
  237. package/models/chartsSlotsComponentsProps.mjs +1 -0
  238. package/models/index.d.mts +1 -0
  239. package/models/index.d.ts +1 -0
  240. package/models/index.js +11 -0
  241. package/models/index.mjs +1 -0
  242. package/models/seriesType/bar.d.mts +1 -1
  243. package/models/seriesType/bar.d.ts +1 -1
  244. package/models/seriesType/common.d.mts +4 -4
  245. package/models/seriesType/common.d.ts +4 -4
  246. package/models/seriesType/config.d.mts +3 -3
  247. package/models/seriesType/config.d.ts +3 -3
  248. package/models/seriesType/line.d.mts +6 -3
  249. package/models/seriesType/line.d.ts +6 -3
  250. package/models/seriesType/pie.d.mts +1 -1
  251. package/models/seriesType/pie.d.ts +1 -1
  252. package/models/seriesType/radar.d.mts +1 -1
  253. package/models/seriesType/radar.d.ts +1 -1
  254. package/models/seriesType/scatter.d.mts +35 -3
  255. package/models/seriesType/scatter.d.ts +35 -3
  256. package/models/sizeMapping.d.mts +64 -0
  257. package/models/sizeMapping.d.ts +64 -0
  258. package/models/sizeMapping.js +5 -0
  259. package/models/sizeMapping.mjs +1 -0
  260. package/models/slots/chartsBaseSlots.d.mts +6 -5
  261. package/models/slots/chartsBaseSlots.d.ts +6 -5
  262. package/models/z-axis.d.mts +10 -1
  263. package/models/z-axis.d.ts +10 -1
  264. package/package.json +5 -5
@@ -11,6 +11,7 @@ var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/form
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _colorScale = require("../../../colorScale");
14
+ var _sizeScale = require("../../../sizeScale");
14
15
  function addDefaultId(axisConfig, defaultId) {
15
16
  if (axisConfig.id !== undefined) {
16
17
  return axisConfig;
@@ -32,6 +33,19 @@ function processColorMap(axisConfig) {
32
33
  }, axisConfig.colorMap) : axisConfig.colorMap)
33
34
  });
34
35
  }
36
+ function processSizeMap(axisConfig) {
37
+ if (!axisConfig.sizeMap) {
38
+ return axisConfig;
39
+ }
40
+ return (0, _extends2.default)({}, axisConfig, {
41
+ sizeScale: axisConfig.sizeMap.type === 'ordinal' ? (0, _sizeScale.getOrdinalSizeScale)((0, _extends2.default)({
42
+ values: axisConfig.data
43
+ }, axisConfig.sizeMap)) : (0, _sizeScale.getSizeScale)(axisConfig.sizeMap.type === 'continuous' ? (0, _extends2.default)({
44
+ min: axisConfig.min,
45
+ max: axisConfig.max
46
+ }, axisConfig.sizeMap) : axisConfig.sizeMap)
47
+ });
48
+ }
35
49
  function getZAxisState(zAxis, dataset) {
36
50
  if (!zAxis || zAxis.length === 0) {
37
51
  return {
@@ -45,16 +59,16 @@ function getZAxisState(zAxis, dataset) {
45
59
  const dataKey = axisConfig.dataKey;
46
60
  const defaultizedId = axisConfig.id ?? `defaultized-z-axis-${index}`;
47
61
  if (axisConfig.data !== undefined || dataKey === undefined && !axisConfig.valueGetter) {
48
- zAxisLookup[defaultizedId] = processColorMap(addDefaultId(axisConfig, defaultizedId));
62
+ zAxisLookup[defaultizedId] = processSizeMap(processColorMap(addDefaultId(axisConfig, defaultizedId)));
49
63
  axisIds.push(defaultizedId);
50
64
  return;
51
65
  }
52
66
  if (dataset === undefined) {
53
67
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X Charts: The z-axis uses `dataKey` or `valueGetter` but no `dataset` is provided. ' + 'When using dataKey or valueGetter, a dataset must be provided to retrieve the axis data. ' + 'Either provide a dataset prop or use the data property directly on the z-axis.' : (0, _formatErrorMessage2.default)(41));
54
68
  }
55
- zAxisLookup[defaultizedId] = processColorMap(addDefaultId((0, _extends2.default)({}, axisConfig, {
69
+ zAxisLookup[defaultizedId] = processSizeMap(processColorMap(addDefaultId((0, _extends2.default)({}, axisConfig, {
56
70
  data: axisConfig.valueGetter ? dataset.map(d => axisConfig.valueGetter(d)) : dataset.map(d => d[dataKey])
57
- }), defaultizedId));
71
+ }), defaultizedId)));
58
72
  axisIds.push(defaultizedId);
59
73
  });
60
74
  return {
@@ -4,6 +4,7 @@ import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  import * as React from 'react';
6
6
  import { getColorScale, getOrdinalColorScale } from "../../../colorScale.mjs";
7
+ import { getSizeScale, getOrdinalSizeScale } from "../../../sizeScale.mjs";
7
8
  function addDefaultId(axisConfig, defaultId) {
8
9
  if (axisConfig.id !== undefined) {
9
10
  return axisConfig;
@@ -25,6 +26,19 @@ function processColorMap(axisConfig) {
25
26
  }, axisConfig.colorMap) : axisConfig.colorMap)
26
27
  });
27
28
  }
29
+ function processSizeMap(axisConfig) {
30
+ if (!axisConfig.sizeMap) {
31
+ return axisConfig;
32
+ }
33
+ return _extends({}, axisConfig, {
34
+ sizeScale: axisConfig.sizeMap.type === 'ordinal' ? getOrdinalSizeScale(_extends({
35
+ values: axisConfig.data
36
+ }, axisConfig.sizeMap)) : getSizeScale(axisConfig.sizeMap.type === 'continuous' ? _extends({
37
+ min: axisConfig.min,
38
+ max: axisConfig.max
39
+ }, axisConfig.sizeMap) : axisConfig.sizeMap)
40
+ });
41
+ }
28
42
  function getZAxisState(zAxis, dataset) {
29
43
  if (!zAxis || zAxis.length === 0) {
30
44
  return {
@@ -38,16 +52,16 @@ function getZAxisState(zAxis, dataset) {
38
52
  const dataKey = axisConfig.dataKey;
39
53
  const defaultizedId = axisConfig.id ?? `defaultized-z-axis-${index}`;
40
54
  if (axisConfig.data !== undefined || dataKey === undefined && !axisConfig.valueGetter) {
41
- zAxisLookup[defaultizedId] = processColorMap(addDefaultId(axisConfig, defaultizedId));
55
+ zAxisLookup[defaultizedId] = processSizeMap(processColorMap(addDefaultId(axisConfig, defaultizedId)));
42
56
  axisIds.push(defaultizedId);
43
57
  return;
44
58
  }
45
59
  if (dataset === undefined) {
46
60
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X Charts: The z-axis uses `dataKey` or `valueGetter` but no `dataset` is provided. ' + 'When using dataKey or valueGetter, a dataset must be provided to retrieve the axis data. ' + 'Either provide a dataset prop or use the data property directly on the z-axis.' : _formatErrorMessage(41));
47
61
  }
48
- zAxisLookup[defaultizedId] = processColorMap(addDefaultId(_extends({}, axisConfig, {
62
+ zAxisLookup[defaultizedId] = processSizeMap(processColorMap(addDefaultId(_extends({}, axisConfig, {
49
63
  data: axisConfig.valueGetter ? dataset.map(d => axisConfig.valueGetter(d)) : dataset.map(d => d[dataKey])
50
- }), defaultizedId));
64
+ }), defaultizedId)));
51
65
  axisIds.push(defaultizedId);
52
66
  });
53
67
  return {
@@ -0,0 +1,3 @@
1
+ export { useProgressiveRendering } from "./useProgressiveRendering.mjs";
2
+ export type { UseProgressiveRenderingSignature, UseProgressiveRenderingInstance, UseProgressiveRenderingState } from "./useProgressiveRendering.types.mjs";
3
+ export * from "./useProgressiveRendering.selectors.mjs";
@@ -0,0 +1,3 @@
1
+ export { useProgressiveRendering } from "./useProgressiveRendering.js";
2
+ export type { UseProgressiveRenderingSignature, UseProgressiveRenderingInstance, UseProgressiveRenderingState } from "./useProgressiveRendering.types.js";
3
+ export * from "./useProgressiveRendering.selectors.js";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ useProgressiveRendering: true
8
+ };
9
+ Object.defineProperty(exports, "useProgressiveRendering", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _useProgressiveRendering.useProgressiveRendering;
13
+ }
14
+ });
15
+ var _useProgressiveRendering = require("./useProgressiveRendering");
16
+ var _useProgressiveRendering2 = require("./useProgressiveRendering.selectors");
17
+ Object.keys(_useProgressiveRendering2).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
+ if (key in exports && exports[key] === _useProgressiveRendering2[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _useProgressiveRendering2[key];
25
+ }
26
+ });
27
+ });
@@ -0,0 +1,2 @@
1
+ export { useProgressiveRendering } from "./useProgressiveRendering.mjs";
2
+ export * from "./useProgressiveRendering.selectors.mjs";
@@ -0,0 +1,13 @@
1
+ import { type ChartPlugin } from "../../models/index.mjs";
2
+ import { type UseProgressiveRenderingSignature } from "./useProgressiveRendering.types.mjs";
3
+ /**
4
+ * Chart-wide progressive rendering coordinator.
5
+ *
6
+ * Lives on the chart store, so every renderer composed into the same chart
7
+ * (e.g. several `ScatterPlot` instances under one `ChartsContainer`) shares
8
+ * the same scheduler. Each renderer registers a plan via
9
+ * `setProgressivePlan(plotId, plan)`; the plugin aggregates them, computes a
10
+ * single per-tick budget, and ramps a global "rounds" counter — one round
11
+ * adds one batch in every registered series at once.
12
+ */
13
+ export declare const useProgressiveRendering: ChartPlugin<UseProgressiveRenderingSignature>;
@@ -0,0 +1,13 @@
1
+ import { type ChartPlugin } from "../../models/index.js";
2
+ import { type UseProgressiveRenderingSignature } from "./useProgressiveRendering.types.js";
3
+ /**
4
+ * Chart-wide progressive rendering coordinator.
5
+ *
6
+ * Lives on the chart store, so every renderer composed into the same chart
7
+ * (e.g. several `ScatterPlot` instances under one `ChartsContainer`) shares
8
+ * the same scheduler. Each renderer registers a plan via
9
+ * `setProgressivePlan(plotId, plan)`; the plugin aggregates them, computes a
10
+ * single per-tick budget, and ramps a global "rounds" counter — one round
11
+ * adds one batch in every registered series at once.
12
+ */
13
+ export declare const useProgressiveRendering: ChartPlugin<UseProgressiveRenderingSignature>;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.useProgressiveRendering = void 0;
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
13
+ var _useProgressiveRendering = require("./useProgressiveRendering.selectors");
14
+ const EMPTY_PLANS = new Map();
15
+
16
+ /**
17
+ * How many *rounds* are revealed per reveal tick once the render data is ready.
18
+ * A round reveals one batch in every series simultaneously, so the chart looks
19
+ * complete from the first paint rather than appearing series-by-series. Lower
20
+ * spreads the paint over more ticks (smoother, more visibly progressive);
21
+ * higher finishes sooner.
22
+ */
23
+ const REVEAL_ROUNDS_PER_FRAME = 1;
24
+
25
+ /**
26
+ * How many animation frames are skipped between two reveal ticks. `0` reveals
27
+ * on every frame; `1` reveals every other frame, leaving the browser an idle
28
+ * frame for layout, paint and input handling between commits. Higher values
29
+ * give the browser more CPU headroom at the cost of a slower paint.
30
+ */
31
+ const REVEAL_FRAMES_SKIPPED = 0;
32
+
33
+ /**
34
+ * Chart-wide progressive rendering coordinator.
35
+ *
36
+ * Lives on the chart store, so every renderer composed into the same chart
37
+ * (e.g. several `ScatterPlot` instances under one `ChartsContainer`) shares
38
+ * the same scheduler. Each renderer registers a plan via
39
+ * `setProgressivePlan(plotId, plan)`; the plugin aggregates them, computes a
40
+ * single per-tick budget, and ramps a global "rounds" counter — one round
41
+ * adds one batch in every registered series at once.
42
+ */
43
+ const useProgressiveRendering = ({
44
+ store
45
+ }) => {
46
+ const registerProgressivePlan = (0, _useEventCallback.default)((plotId, seriesIds, renderer) => {
47
+ if (!(0, _useProgressiveRendering.selectorShouldUseProgressiveRenderer)(store.state, seriesIds, renderer)) {
48
+ return undefined;
49
+ }
50
+ const current = store.state.progressiveRendering.plans.get(plotId);
51
+ if (!(0, _useProgressiveRendering.sameSeriesIds)(current, seriesIds)) {
52
+ const nextPlans = new Map(store.state.progressiveRendering.plans);
53
+ nextPlans.set(plotId, seriesIds);
54
+ // A real plan change restarts the progressive paint.
55
+ store.set('progressiveRendering', {
56
+ plans: nextPlans,
57
+ revealedRounds: 0
58
+ });
59
+ }
60
+ return () => {
61
+ if (!store.state.progressiveRendering.plans.has(plotId)) {
62
+ return;
63
+ }
64
+ const nextPlans = new Map(store.state.progressiveRendering.plans);
65
+ nextPlans.delete(plotId);
66
+ store.set('progressiveRendering', (0, _extends2.default)({}, store.state.progressiveRendering, {
67
+ plans: nextPlans
68
+ }));
69
+ };
70
+ });
71
+ const plans = store.use(_useProgressiveRendering.selectorProgressivePlans) ?? EMPTY_PLANS;
72
+ React.useEffect(() => {
73
+ const startTotal = (0, _useProgressiveRendering.selectorProgressiveTotalRounds)(store.state);
74
+ if (startTotal === 0) {
75
+ return undefined;
76
+ }
77
+ if (typeof requestAnimationFrame !== 'function') {
78
+ store.set('progressiveRendering', (0, _extends2.default)({}, store.state.progressiveRendering, {
79
+ revealedRounds: startTotal
80
+ }));
81
+ return undefined;
82
+ }
83
+ let frame = 0;
84
+ let cancelled = false;
85
+ // Tracked in a closure variable, not derived inside a state updater (those
86
+ // must be pure and StrictMode double-invokes them, which would schedule
87
+ // the animation-frame chain twice).
88
+ let revealed = 0;
89
+ function scheduleNext() {
90
+ let remaining = REVEAL_FRAMES_SKIPPED;
91
+ const tick = () => {
92
+ if (cancelled) {
93
+ return;
94
+ }
95
+ if (remaining > 0) {
96
+ remaining -= 1;
97
+ frame = requestAnimationFrame(tick);
98
+ return;
99
+ }
100
+ step();
101
+ };
102
+ frame = requestAnimationFrame(tick);
103
+ }
104
+ function step() {
105
+ if (cancelled) {
106
+ return;
107
+ }
108
+ const total = (0, _useProgressiveRendering.selectorProgressiveTotalRounds)(store.state);
109
+ revealed = Math.min(total, revealed + REVEAL_ROUNDS_PER_FRAME);
110
+ store.set('progressiveRendering', (0, _extends2.default)({}, store.state.progressiveRendering, {
111
+ revealedRounds: revealed
112
+ }));
113
+ if (revealed < total) {
114
+ scheduleNext();
115
+ }
116
+ }
117
+ frame = requestAnimationFrame(step);
118
+ return () => {
119
+ cancelled = true;
120
+ cancelAnimationFrame(frame);
121
+ };
122
+ }, [plans, store]);
123
+ return {
124
+ instance: {
125
+ registerProgressivePlan
126
+ }
127
+ };
128
+ };
129
+ exports.useProgressiveRendering = useProgressiveRendering;
130
+ useProgressiveRendering.params = {};
131
+ useProgressiveRendering.getInitialState = () => ({
132
+ progressiveRendering: {
133
+ plans: EMPTY_PLANS,
134
+ revealedRounds: 0
135
+ }
136
+ });
@@ -0,0 +1,128 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import * as React from 'react';
5
+ import useEventCallback from '@mui/utils/useEventCallback';
6
+ import { sameSeriesIds, selectorProgressivePlans, selectorProgressiveTotalRounds, selectorShouldUseProgressiveRenderer } from "./useProgressiveRendering.selectors.mjs";
7
+ const EMPTY_PLANS = new Map();
8
+
9
+ /**
10
+ * How many *rounds* are revealed per reveal tick once the render data is ready.
11
+ * A round reveals one batch in every series simultaneously, so the chart looks
12
+ * complete from the first paint rather than appearing series-by-series. Lower
13
+ * spreads the paint over more ticks (smoother, more visibly progressive);
14
+ * higher finishes sooner.
15
+ */
16
+ const REVEAL_ROUNDS_PER_FRAME = 1;
17
+
18
+ /**
19
+ * How many animation frames are skipped between two reveal ticks. `0` reveals
20
+ * on every frame; `1` reveals every other frame, leaving the browser an idle
21
+ * frame for layout, paint and input handling between commits. Higher values
22
+ * give the browser more CPU headroom at the cost of a slower paint.
23
+ */
24
+ const REVEAL_FRAMES_SKIPPED = 0;
25
+
26
+ /**
27
+ * Chart-wide progressive rendering coordinator.
28
+ *
29
+ * Lives on the chart store, so every renderer composed into the same chart
30
+ * (e.g. several `ScatterPlot` instances under one `ChartsContainer`) shares
31
+ * the same scheduler. Each renderer registers a plan via
32
+ * `setProgressivePlan(plotId, plan)`; the plugin aggregates them, computes a
33
+ * single per-tick budget, and ramps a global "rounds" counter — one round
34
+ * adds one batch in every registered series at once.
35
+ */
36
+ export const useProgressiveRendering = ({
37
+ store
38
+ }) => {
39
+ const registerProgressivePlan = useEventCallback((plotId, seriesIds, renderer) => {
40
+ if (!selectorShouldUseProgressiveRenderer(store.state, seriesIds, renderer)) {
41
+ return undefined;
42
+ }
43
+ const current = store.state.progressiveRendering.plans.get(plotId);
44
+ if (!sameSeriesIds(current, seriesIds)) {
45
+ const nextPlans = new Map(store.state.progressiveRendering.plans);
46
+ nextPlans.set(plotId, seriesIds);
47
+ // A real plan change restarts the progressive paint.
48
+ store.set('progressiveRendering', {
49
+ plans: nextPlans,
50
+ revealedRounds: 0
51
+ });
52
+ }
53
+ return () => {
54
+ if (!store.state.progressiveRendering.plans.has(plotId)) {
55
+ return;
56
+ }
57
+ const nextPlans = new Map(store.state.progressiveRendering.plans);
58
+ nextPlans.delete(plotId);
59
+ store.set('progressiveRendering', _extends({}, store.state.progressiveRendering, {
60
+ plans: nextPlans
61
+ }));
62
+ };
63
+ });
64
+ const plans = store.use(selectorProgressivePlans) ?? EMPTY_PLANS;
65
+ React.useEffect(() => {
66
+ const startTotal = selectorProgressiveTotalRounds(store.state);
67
+ if (startTotal === 0) {
68
+ return undefined;
69
+ }
70
+ if (typeof requestAnimationFrame !== 'function') {
71
+ store.set('progressiveRendering', _extends({}, store.state.progressiveRendering, {
72
+ revealedRounds: startTotal
73
+ }));
74
+ return undefined;
75
+ }
76
+ let frame = 0;
77
+ let cancelled = false;
78
+ // Tracked in a closure variable, not derived inside a state updater (those
79
+ // must be pure and StrictMode double-invokes them, which would schedule
80
+ // the animation-frame chain twice).
81
+ let revealed = 0;
82
+ function scheduleNext() {
83
+ let remaining = REVEAL_FRAMES_SKIPPED;
84
+ const tick = () => {
85
+ if (cancelled) {
86
+ return;
87
+ }
88
+ if (remaining > 0) {
89
+ remaining -= 1;
90
+ frame = requestAnimationFrame(tick);
91
+ return;
92
+ }
93
+ step();
94
+ };
95
+ frame = requestAnimationFrame(tick);
96
+ }
97
+ function step() {
98
+ if (cancelled) {
99
+ return;
100
+ }
101
+ const total = selectorProgressiveTotalRounds(store.state);
102
+ revealed = Math.min(total, revealed + REVEAL_ROUNDS_PER_FRAME);
103
+ store.set('progressiveRendering', _extends({}, store.state.progressiveRendering, {
104
+ revealedRounds: revealed
105
+ }));
106
+ if (revealed < total) {
107
+ scheduleNext();
108
+ }
109
+ }
110
+ frame = requestAnimationFrame(step);
111
+ return () => {
112
+ cancelled = true;
113
+ cancelAnimationFrame(frame);
114
+ };
115
+ }, [plans, store]);
116
+ return {
117
+ instance: {
118
+ registerProgressivePlan
119
+ }
120
+ };
121
+ };
122
+ useProgressiveRendering.params = {};
123
+ useProgressiveRendering.getInitialState = () => ({
124
+ progressiveRendering: {
125
+ plans: EMPTY_PLANS,
126
+ revealedRounds: 0
127
+ }
128
+ });
@@ -0,0 +1,42 @@
1
+ import { type SeriesId } from "../../../../models/seriesType/common.mjs";
2
+ import type { RendererType } from "../../../../ScatterChart/index.mjs";
3
+ /** Map of registered plots → their set of series ids. */
4
+ export declare const selectorProgressivePlans: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
5
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
6
+ }) => ReadonlyMap<string, readonly string[]> | undefined;
7
+ /** Total number of rounds revealed across all plots so far. */
8
+ export declare const selectorProgressiveRevealedRounds: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
9
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
10
+ }) => number;
11
+ /**
12
+ * Aggregated view of every registered plan: the per-series batch counts, the
13
+ * total number of rounds, and the per-series batch size (so every consumer
14
+ * sizes its batches the same way). Point counts are read straight from the
15
+ * processed series rather than carried by the registration.
16
+ */
17
+ export declare const selectorProgressiveAggregate: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
18
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
19
+ }) => {
20
+ nBatchesBySeries: Map<string, number>;
21
+ totalRounds: number;
22
+ batchSize: number;
23
+ };
24
+ export declare const selectorProgressiveBatchSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
25
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
26
+ }) => number;
27
+ export declare const selectorProgressiveTotalRounds: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
28
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
29
+ }) => number;
30
+ /**
31
+ * How many of `seriesId`'s own batches are revealed so far. Capped at that
32
+ * series' total batch count, so series with fewer batches simply stop
33
+ * progressing while longer ones keep filling in.
34
+ */
35
+ export declare const selectorProgressiveSeriesRevealedBatches: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.mjs").UseProgressiveRenderingState> & {
36
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
37
+ }, seriesId: string) => number;
38
+ export declare const selectorShouldUseProgressiveRenderer: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
39
+ cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
40
+ }, seriesIds: readonly string[], renderer: RendererType | "svg-progressive" | undefined) => boolean;
41
+ /** Order-sensitive equality between two registered series-id sets. */
42
+ export declare function sameSeriesIds(a: readonly SeriesId[] | undefined, b: readonly SeriesId[]): boolean;
@@ -0,0 +1,42 @@
1
+ import { type SeriesId } from "../../../../models/seriesType/common.js";
2
+ import type { RendererType } from "../../../../ScatterChart/index.js";
3
+ /** Map of registered plots → their set of series ids. */
4
+ export declare const selectorProgressivePlans: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
5
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
6
+ }) => ReadonlyMap<string, readonly string[]> | undefined;
7
+ /** Total number of rounds revealed across all plots so far. */
8
+ export declare const selectorProgressiveRevealedRounds: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
9
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
10
+ }) => number;
11
+ /**
12
+ * Aggregated view of every registered plan: the per-series batch counts, the
13
+ * total number of rounds, and the per-series batch size (so every consumer
14
+ * sizes its batches the same way). Point counts are read straight from the
15
+ * processed series rather than carried by the registration.
16
+ */
17
+ export declare const selectorProgressiveAggregate: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
18
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
19
+ }) => {
20
+ nBatchesBySeries: Map<string, number>;
21
+ totalRounds: number;
22
+ batchSize: number;
23
+ };
24
+ export declare const selectorProgressiveBatchSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
25
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
26
+ }) => number;
27
+ export declare const selectorProgressiveTotalRounds: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
28
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
29
+ }) => number;
30
+ /**
31
+ * How many of `seriesId`'s own batches are revealed so far. Capped at that
32
+ * series' total batch count, so series with fewer batches simply stop
33
+ * progressing while longer ones keep filling in.
34
+ */
35
+ export declare const selectorProgressiveSeriesRevealedBatches: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useProgressiveRendering.types.js").UseProgressiveRenderingState> & {
36
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
37
+ }, seriesId: string) => number;
38
+ export declare const selectorShouldUseProgressiveRenderer: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
39
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
40
+ }, seriesIds: readonly string[], renderer: RendererType | "svg-progressive" | undefined) => boolean;
41
+ /** Order-sensitive equality between two registered series-id sets. */
42
+ export declare function sameSeriesIds(a: readonly SeriesId[] | undefined, b: readonly SeriesId[]): boolean;