@mui/x-charts-pro 8.0.0-alpha.12 → 8.0.0-alpha.14

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 (204) hide show
  1. package/BarChartPro/BarChartPro.d.ts +2 -1
  2. package/BarChartPro/BarChartPro.js +25 -30
  3. package/CHANGELOG.md +430 -0
  4. package/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  5. package/ChartContainerPro/ChartContainerPro.js +1 -1
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
  7. package/ChartContainerPro/useChartContainerProProps.js +3 -1
  8. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  9. package/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  10. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  11. package/FunnelChart/FunnelChart.d.ts +37 -0
  12. package/FunnelChart/FunnelChart.js +218 -0
  13. package/FunnelChart/FunnelPlot.d.ts +16 -0
  14. package/FunnelChart/FunnelPlot.js +191 -0
  15. package/FunnelChart/FunnelSection.d.ts +15 -0
  16. package/FunnelChart/FunnelSection.js +62 -0
  17. package/FunnelChart/categoryAxis.types.d.ts +24 -0
  18. package/FunnelChart/categoryAxis.types.js +5 -0
  19. package/FunnelChart/funnel.types.d.ts +124 -0
  20. package/FunnelChart/funnel.types.js +5 -0
  21. package/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  22. package/FunnelChart/funnelPlotSlots.types.js +5 -0
  23. package/FunnelChart/funnelSectionClasses.d.ts +13 -0
  24. package/FunnelChart/funnelSectionClasses.js +28 -0
  25. package/FunnelChart/funnelSlots.types.d.ts +19 -0
  26. package/FunnelChart/funnelSlots.types.js +5 -0
  27. package/FunnelChart/funnelStepCurve.d.ts +4 -0
  28. package/FunnelChart/funnelStepCurve.js +74 -0
  29. package/FunnelChart/index.d.ts +7 -0
  30. package/FunnelChart/index.js +59 -0
  31. package/FunnelChart/labelUtils.d.ts +42 -0
  32. package/FunnelChart/labelUtils.js +174 -0
  33. package/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  34. package/FunnelChart/seriesConfig/extremums.js +50 -0
  35. package/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  36. package/FunnelChart/seriesConfig/getColor.js +10 -0
  37. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  38. package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +18 -0
  39. package/FunnelChart/seriesConfig/index.d.ts +2 -0
  40. package/FunnelChart/seriesConfig/index.js +22 -0
  41. package/FunnelChart/seriesConfig/legend.d.ts +3 -0
  42. package/FunnelChart/seriesConfig/legend.js +31 -0
  43. package/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  44. package/FunnelChart/seriesConfig/seriesProcessor.js +96 -0
  45. package/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  46. package/FunnelChart/seriesConfig/tooltip.js +36 -0
  47. package/FunnelChart/useFunnelChartProps.d.ts +30 -0
  48. package/FunnelChart/useFunnelChartProps.js +168 -0
  49. package/Heatmap/Heatmap.d.ts +5 -4
  50. package/Heatmap/Heatmap.js +37 -52
  51. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  52. package/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  53. package/Heatmap/seriesConfig/index.js +3 -1
  54. package/LineChartPro/LineChartPro.d.ts +2 -1
  55. package/LineChartPro/LineChartPro.js +25 -30
  56. package/ScatterChartPro/ScatterChartPro.js +25 -30
  57. package/esm/BarChartPro/BarChartPro.d.ts +2 -1
  58. package/esm/BarChartPro/BarChartPro.js +25 -30
  59. package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  60. package/esm/ChartContainerPro/ChartContainerPro.js +1 -1
  61. package/esm/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
  62. package/esm/ChartContainerPro/useChartContainerProProps.js +3 -1
  63. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  64. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  65. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  66. package/esm/FunnelChart/FunnelChart.d.ts +37 -0
  67. package/esm/FunnelChart/FunnelChart.js +212 -0
  68. package/esm/FunnelChart/FunnelPlot.d.ts +16 -0
  69. package/esm/FunnelChart/FunnelPlot.js +184 -0
  70. package/esm/FunnelChart/FunnelSection.d.ts +15 -0
  71. package/esm/FunnelChart/FunnelSection.js +56 -0
  72. package/esm/FunnelChart/categoryAxis.types.d.ts +24 -0
  73. package/esm/FunnelChart/categoryAxis.types.js +1 -0
  74. package/esm/FunnelChart/funnel.types.d.ts +124 -0
  75. package/esm/FunnelChart/funnel.types.js +1 -0
  76. package/esm/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  77. package/esm/FunnelChart/funnelPlotSlots.types.js +1 -0
  78. package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
  79. package/esm/FunnelChart/funnelSectionClasses.js +20 -0
  80. package/esm/FunnelChart/funnelSlots.types.d.ts +19 -0
  81. package/esm/FunnelChart/funnelSlots.types.js +1 -0
  82. package/esm/FunnelChart/funnelStepCurve.d.ts +4 -0
  83. package/esm/FunnelChart/funnelStepCurve.js +67 -0
  84. package/esm/FunnelChart/index.d.ts +7 -0
  85. package/esm/FunnelChart/index.js +5 -0
  86. package/esm/FunnelChart/labelUtils.d.ts +42 -0
  87. package/esm/FunnelChart/labelUtils.js +166 -0
  88. package/esm/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  89. package/esm/FunnelChart/seriesConfig/extremums.js +42 -0
  90. package/esm/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  91. package/esm/FunnelChart/seriesConfig/getColor.js +4 -0
  92. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  93. package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  94. package/esm/FunnelChart/seriesConfig/index.d.ts +2 -0
  95. package/esm/FunnelChart/seriesConfig/index.js +15 -0
  96. package/esm/FunnelChart/seriesConfig/legend.d.ts +3 -0
  97. package/esm/FunnelChart/seriesConfig/legend.js +25 -0
  98. package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  99. package/esm/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  100. package/esm/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  101. package/esm/FunnelChart/seriesConfig/tooltip.js +29 -0
  102. package/esm/FunnelChart/useFunnelChartProps.d.ts +30 -0
  103. package/esm/FunnelChart/useFunnelChartProps.js +161 -0
  104. package/esm/Heatmap/Heatmap.d.ts +5 -4
  105. package/esm/Heatmap/Heatmap.js +37 -52
  106. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  107. package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  108. package/esm/Heatmap/seriesConfig/index.js +3 -1
  109. package/esm/LineChartPro/LineChartPro.d.ts +2 -1
  110. package/esm/LineChartPro/LineChartPro.js +25 -30
  111. package/esm/ScatterChartPro/ScatterChartPro.js +25 -30
  112. package/esm/hooks/useFunnelSeries.d.ts +33 -0
  113. package/esm/hooks/useFunnelSeries.js +42 -0
  114. package/esm/index.d.ts +3 -1
  115. package/esm/index.js +4 -2
  116. package/esm/internals/plugins/allPlugins.d.ts +3 -3
  117. package/esm/internals/plugins/allPlugins.js +2 -2
  118. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  119. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  120. package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  121. package/esm/internals/utils/releaseInfo.js +1 -1
  122. package/esm/models/seriesType/heatmap.d.ts +2 -2
  123. package/esm/typeOverloads/modules.d.ts +13 -2
  124. package/hooks/useFunnelSeries.d.ts +33 -0
  125. package/hooks/useFunnelSeries.js +48 -0
  126. package/index.d.ts +3 -1
  127. package/index.js +23 -1
  128. package/internals/plugins/allPlugins.d.ts +3 -3
  129. package/internals/plugins/allPlugins.js +1 -1
  130. package/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  131. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  132. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  133. package/internals/utils/releaseInfo.js +1 -1
  134. package/models/seriesType/heatmap.d.ts +2 -2
  135. package/modern/BarChartPro/BarChartPro.d.ts +2 -1
  136. package/modern/BarChartPro/BarChartPro.js +25 -30
  137. package/modern/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  138. package/modern/ChartContainerPro/ChartContainerPro.js +1 -1
  139. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +1 -1
  140. package/modern/ChartContainerPro/useChartContainerProProps.js +3 -1
  141. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  142. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +3 -2
  143. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
  144. package/modern/FunnelChart/FunnelChart.d.ts +37 -0
  145. package/modern/FunnelChart/FunnelChart.js +212 -0
  146. package/modern/FunnelChart/FunnelPlot.d.ts +16 -0
  147. package/modern/FunnelChart/FunnelPlot.js +184 -0
  148. package/modern/FunnelChart/FunnelSection.d.ts +15 -0
  149. package/modern/FunnelChart/FunnelSection.js +56 -0
  150. package/modern/FunnelChart/categoryAxis.types.d.ts +24 -0
  151. package/modern/FunnelChart/categoryAxis.types.js +1 -0
  152. package/modern/FunnelChart/funnel.types.d.ts +124 -0
  153. package/modern/FunnelChart/funnel.types.js +1 -0
  154. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +20 -0
  155. package/modern/FunnelChart/funnelPlotSlots.types.js +1 -0
  156. package/modern/FunnelChart/funnelSectionClasses.d.ts +13 -0
  157. package/modern/FunnelChart/funnelSectionClasses.js +20 -0
  158. package/modern/FunnelChart/funnelSlots.types.d.ts +19 -0
  159. package/modern/FunnelChart/funnelSlots.types.js +1 -0
  160. package/modern/FunnelChart/funnelStepCurve.d.ts +4 -0
  161. package/modern/FunnelChart/funnelStepCurve.js +67 -0
  162. package/modern/FunnelChart/index.d.ts +7 -0
  163. package/modern/FunnelChart/index.js +5 -0
  164. package/modern/FunnelChart/labelUtils.d.ts +42 -0
  165. package/modern/FunnelChart/labelUtils.js +166 -0
  166. package/modern/FunnelChart/seriesConfig/extremums.d.ts +3 -0
  167. package/modern/FunnelChart/seriesConfig/extremums.js +42 -0
  168. package/modern/FunnelChart/seriesConfig/getColor.d.ts +3 -0
  169. package/modern/FunnelChart/seriesConfig/getColor.js +4 -0
  170. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  171. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +11 -0
  172. package/modern/FunnelChart/seriesConfig/index.d.ts +2 -0
  173. package/modern/FunnelChart/seriesConfig/index.js +15 -0
  174. package/modern/FunnelChart/seriesConfig/legend.d.ts +3 -0
  175. package/modern/FunnelChart/seriesConfig/legend.js +25 -0
  176. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +3 -0
  177. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +89 -0
  178. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +3 -0
  179. package/modern/FunnelChart/seriesConfig/tooltip.js +29 -0
  180. package/modern/FunnelChart/useFunnelChartProps.d.ts +30 -0
  181. package/modern/FunnelChart/useFunnelChartProps.js +161 -0
  182. package/modern/Heatmap/Heatmap.d.ts +5 -4
  183. package/modern/Heatmap/Heatmap.js +37 -52
  184. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  185. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +8 -0
  186. package/modern/Heatmap/seriesConfig/index.js +3 -1
  187. package/modern/LineChartPro/LineChartPro.d.ts +2 -1
  188. package/modern/LineChartPro/LineChartPro.js +25 -30
  189. package/modern/ScatterChartPro/ScatterChartPro.js +25 -30
  190. package/modern/hooks/useFunnelSeries.d.ts +33 -0
  191. package/modern/hooks/useFunnelSeries.js +42 -0
  192. package/modern/index.d.ts +3 -1
  193. package/modern/index.js +4 -2
  194. package/modern/internals/plugins/allPlugins.d.ts +3 -3
  195. package/modern/internals/plugins/allPlugins.js +2 -2
  196. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +63 -12
  197. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +26 -24
  198. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +12 -3
  199. package/modern/internals/utils/releaseInfo.js +1 -1
  200. package/modern/models/seriesType/heatmap.d.ts +2 -2
  201. package/modern/typeOverloads/modules.d.ts +13 -2
  202. package/package.json +5 -5
  203. package/tsconfig.build.tsbuildinfo +1 -1
  204. package/typeOverloads/modules.d.ts +13 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
5
+ const _excluded = ["initialZoom", "zoomData", "onZoomChange", "apiRef"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { useThemeProps } from '@mui/material/styles';
@@ -36,6 +36,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
36
36
  });
37
37
  const {
38
38
  initialZoom,
39
+ zoomData,
39
40
  onZoomChange,
40
41
  apiRef
41
42
  } = props,
@@ -56,6 +57,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
56
57
  chartsSurfaceProps
57
58
  } = useChartContainerProProps(_extends({}, chartContainerProps, {
58
59
  initialZoom,
60
+ zoomData,
59
61
  onZoomChange,
60
62
  apiRef,
61
63
  plugins: SCATTER_CHART_PRO_PLUGINS
@@ -93,12 +95,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
93
95
  x: PropTypes.oneOf(['band', 'line', 'none']),
94
96
  y: PropTypes.oneOf(['band', 'line', 'none'])
95
97
  }),
96
- /**
97
- * Indicate which axis to display the bottom of the charts.
98
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
99
- * @default xAxisIds[0] The id of the first provided axis
100
- */
101
- bottomAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
102
98
  children: PropTypes.node,
103
99
  className: PropTypes.string,
104
100
  /**
@@ -152,18 +148,13 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
152
148
  id: PropTypes.string,
153
149
  /**
154
150
  * The list of zoom data related to each axis.
151
+ * Used to initialize the zoom in a specific configuration without controlling it.
155
152
  */
156
153
  initialZoom: PropTypes.arrayOf(PropTypes.shape({
157
154
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
158
155
  end: PropTypes.number.isRequired,
159
156
  start: PropTypes.number.isRequired
160
157
  })),
161
- /**
162
- * Indicate which axis to display the left of the charts.
163
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
164
- * @default yAxisIds[0] The id of the first provided axis
165
- */
166
- leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
167
158
  /**
168
159
  * If `true`, a loading overlay is displayed.
169
160
  * @default false
@@ -172,14 +163,15 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
172
163
  /**
173
164
  * The margin between the SVG and the drawing area.
174
165
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
175
- * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
166
+ *
167
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
176
168
  */
177
- margin: PropTypes.shape({
169
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
178
170
  bottom: PropTypes.number,
179
171
  left: PropTypes.number,
180
172
  right: PropTypes.number,
181
173
  top: PropTypes.number
182
- }),
174
+ })]),
183
175
  /**
184
176
  * The function called for onClick events.
185
177
  * The second argument contains information about all line/bar elements at the current mouse position.
@@ -205,12 +197,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
205
197
  * @param {ZoomData[]} zoomData Updated zoom data.
206
198
  */
207
199
  onZoomChange: PropTypes.func,
208
- /**
209
- * Indicate which axis to display the right of the charts.
210
- * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
211
- * @default null
212
- */
213
- rightAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
214
200
  /**
215
201
  * The series to display in the scatter chart.
216
202
  * An array of [[ScatterSeriesType]] objects.
@@ -234,12 +220,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
234
220
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
235
221
  theme: PropTypes.oneOf(['dark', 'light']),
236
222
  title: PropTypes.string,
237
- /**
238
- * Indicate which axis to display the top of the charts.
239
- * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
240
- * @default null
241
- */
242
- topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
243
223
  /**
244
224
  * Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
245
225
  * If `undefined`, the radius is assumed to be infinite.
@@ -255,6 +235,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
255
235
  * An array of [[AxisConfig]] objects.
256
236
  */
257
237
  xAxis: PropTypes.arrayOf(PropTypes.shape({
238
+ axis: PropTypes.oneOf(['x']),
258
239
  classes: PropTypes.object,
259
240
  colorMap: PropTypes.oneOfType([PropTypes.shape({
260
241
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -277,13 +258,15 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
277
258
  disableTicks: PropTypes.bool,
278
259
  domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
279
260
  fill: PropTypes.string,
261
+ height: PropTypes.number,
280
262
  hideTooltip: PropTypes.bool,
281
263
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
282
264
  label: PropTypes.string,
283
265
  labelStyle: PropTypes.object,
284
266
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
285
267
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
286
- position: PropTypes.oneOf(['bottom', 'top']),
268
+ offset: PropTypes.number,
269
+ position: PropTypes.oneOf(['bottom', 'none', 'top']),
287
270
  reverse: PropTypes.bool,
288
271
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
289
272
  slotProps: PropTypes.object,
@@ -292,6 +275,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
292
275
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
293
276
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
294
277
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
278
+ tickLabelMinGap: PropTypes.number,
295
279
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
296
280
  tickLabelStyle: PropTypes.object,
297
281
  tickMaxStep: PropTypes.number,
@@ -316,6 +300,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
316
300
  * An array of [[AxisConfig]] objects.
317
301
  */
318
302
  yAxis: PropTypes.arrayOf(PropTypes.shape({
303
+ axis: PropTypes.oneOf(['y']),
319
304
  classes: PropTypes.object,
320
305
  colorMap: PropTypes.oneOfType([PropTypes.shape({
321
306
  colors: PropTypes.arrayOf(PropTypes.string).isRequired,
@@ -344,7 +329,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
344
329
  labelStyle: PropTypes.object,
345
330
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
346
331
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
347
- position: PropTypes.oneOf(['left', 'right']),
332
+ offset: PropTypes.number,
333
+ position: PropTypes.oneOf(['left', 'none', 'right']),
348
334
  reverse: PropTypes.bool,
349
335
  scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
350
336
  slotProps: PropTypes.object,
@@ -361,6 +347,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
361
347
  tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
362
348
  tickSize: PropTypes.number,
363
349
  valueFormatter: PropTypes.func,
350
+ width: PropTypes.number,
364
351
  zoom: PropTypes.oneOfType([PropTypes.shape({
365
352
  filterMode: PropTypes.oneOf(['discard', 'keep']),
366
353
  maxEnd: PropTypes.number,
@@ -395,6 +382,14 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
395
382
  id: PropTypes.string,
396
383
  max: PropTypes.number,
397
384
  min: PropTypes.number
385
+ })),
386
+ /**
387
+ * The list of zoom data related to each axis.
388
+ */
389
+ zoomData: PropTypes.arrayOf(PropTypes.shape({
390
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
391
+ end: PropTypes.number.isRequired,
392
+ start: PropTypes.number.isRequired
398
393
  }))
399
394
  } : void 0;
400
395
  export { ScatterChartPro };
@@ -0,0 +1,33 @@
1
+ import { ProcessedSeries, SeriesId, ChartSeriesDefaultized } from '@mui/x-charts/internals';
2
+ export type UseFunnelSeriesReturnValue = ChartSeriesDefaultized<'funnel'>;
3
+ export type UseFunnelSeriesContextReturnValue = ProcessedSeries['funnel'];
4
+ /**
5
+ * Get access to the internal state of funnel series.
6
+ *
7
+ * @param {SeriesId} seriesId The id of the series to get.
8
+ * @returns {UseFunnelSeriesReturnValue} the funnel series
9
+ */
10
+ export declare function useFunnelSeries(seriesId: SeriesId): UseFunnelSeriesReturnValue | undefined;
11
+ /**
12
+ * Get access to the internal state of funnel series.
13
+ *
14
+ * When called without arguments, it returns all funnel series.
15
+ *
16
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
17
+ */
18
+ export declare function useFunnelSeries(): UseFunnelSeriesReturnValue[];
19
+ /**
20
+ * Get access to the internal state of funnel series.
21
+ *
22
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
23
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
24
+ */
25
+ export declare function useFunnelSeries(seriesIds: SeriesId[]): UseFunnelSeriesReturnValue[];
26
+ /**
27
+ * Get access to the internal state of funnel series.
28
+ * The returned object contains:
29
+ * - series: a mapping from ids to series attributes.
30
+ * - seriesOrder: the array of series ids.
31
+ * @returns the funnel series
32
+ */
33
+ export declare function useFunnelSeriesContext(): UseFunnelSeriesContextReturnValue;
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import { createAllSeriesSelectorOfType, createSeriesSelectorsOfType } from '@mui/x-charts/internals';
4
+ const useSelectorSeries = createSeriesSelectorsOfType('funnel');
5
+ const useSelectorSeriesContext = createAllSeriesSelectorOfType('funnel');
6
+
7
+ /**
8
+ * Get access to the internal state of funnel series.
9
+ *
10
+ * @param {SeriesId} seriesId The id of the series to get.
11
+ * @returns {UseFunnelSeriesReturnValue} the funnel series
12
+ */
13
+
14
+ /**
15
+ * Get access to the internal state of funnel series.
16
+ *
17
+ * When called without arguments, it returns all funnel series.
18
+ *
19
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
20
+ */
21
+
22
+ /**
23
+ * Get access to the internal state of funnel series.
24
+ *
25
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
26
+ * @returns {UseFunnelSeriesReturnValue[]} the funnel series
27
+ */
28
+
29
+ export function useFunnelSeries(seriesIds) {
30
+ return useSelectorSeries(seriesIds);
31
+ }
32
+
33
+ /**
34
+ * Get access to the internal state of funnel series.
35
+ * The returned object contains:
36
+ * - series: a mapping from ids to series attributes.
37
+ * - seriesOrder: the array of series ids.
38
+ * @returns the funnel series
39
+ */
40
+ export function useFunnelSeriesContext() {
41
+ return useSelectorSeriesContext();
42
+ }
package/modern/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export * from '@mui/x-charts/PieChart';
20
20
  export * from '@mui/x-charts/ScatterChart';
21
21
  export * from '@mui/x-charts/SparkLineChart';
22
22
  export * from '@mui/x-charts/Gauge';
23
+ export * from '@mui/x-charts/RadarChart';
23
24
  export * from '@mui/x-charts/ChartsSurface';
24
25
  export * from '@mui/x-charts/ChartDataProvider';
25
26
  export * from '@mui/x-charts/ChartsLabel';
@@ -29,4 +30,5 @@ export * from "./ChartContainerPro/index.js";
29
30
  export * from "./ChartDataProviderPro/index.js";
30
31
  export * from "./ScatterChartPro/index.js";
31
32
  export * from "./BarChartPro/index.js";
32
- export * from "./LineChartPro/index.js";
33
+ export * from "./LineChartPro/index.js";
34
+ export * from "./FunnelChart/index.js";
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-alpha.12
2
+ * @mui/x-charts-pro v8.0.0-alpha.14
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -29,6 +29,7 @@ export * from '@mui/x-charts/PieChart';
29
29
  export * from '@mui/x-charts/ScatterChart';
30
30
  export * from '@mui/x-charts/SparkLineChart';
31
31
  export * from '@mui/x-charts/Gauge';
32
+ export * from '@mui/x-charts/RadarChart';
32
33
  export * from '@mui/x-charts/ChartsSurface';
33
34
  export * from '@mui/x-charts/ChartDataProvider';
34
35
  export * from '@mui/x-charts/ChartsLabel';
@@ -40,4 +41,5 @@ export * from "./ChartContainerPro/index.js";
40
41
  export * from "./ChartDataProviderPro/index.js";
41
42
  export * from "./ScatterChartPro/index.js";
42
43
  export * from "./BarChartPro/index.js";
43
- export * from "./LineChartPro/index.js";
44
+ export * from "./LineChartPro/index.js";
45
+ export * from "./FunnelChart/index.js";
@@ -1,5 +1,5 @@
1
- import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature } from '@mui/x-charts/internals';
1
+ import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
2
2
  import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
3
- export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
3
+ export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
4
  export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
5
- export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
5
+ export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
@@ -1,5 +1,5 @@
1
1
  // This file should be removed after creating all plugins in favor of a file per chart type.
2
2
 
3
- import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight } from '@mui/x-charts/internals';
3
+ import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight, useChartPolarAxis } from '@mui/x-charts/internals';
4
4
  import { useChartProZoom } from "./useChartProZoom/index.js";
5
- export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
5
+ export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom];
@@ -2,6 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
+ import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
6
  import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
6
7
  import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
7
8
 
@@ -23,15 +24,46 @@ export const useChartProZoom = ({
23
24
  svgRef,
24
25
  params
25
26
  }) => {
27
+ const {
28
+ zoomData: paramsZoomData,
29
+ onZoomChange
30
+ } = params;
26
31
  const drawingArea = useSelector(store, selectorChartDrawingArea);
27
32
  const optionsLookup = useSelector(store, selectorChartZoomOptionsLookup);
28
33
  const isZoomEnabled = Object.keys(optionsLookup).length > 0;
29
34
 
30
- // Add events
31
- const panningEventCacheRef = React.useRef([]);
32
- const zoomEventCacheRef = React.useRef([]);
33
- const eventPrevDiff = React.useRef(0);
34
- const interactionTimeoutRef = React.useRef(undefined);
35
+ // Manage controlled state
36
+
37
+ useEnhancedEffect(() => {
38
+ if (paramsZoomData === undefined) {
39
+ return undefined;
40
+ }
41
+ store.update(prevState => {
42
+ if (process.env.NODE_ENV !== 'production' && !prevState.zoom.isControlled) {
43
+ console.error([`MUI X: A chart component is changing the \`zoomData\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
44
+ }
45
+ return _extends({}, prevState, {
46
+ zoom: _extends({}, prevState.zoom, {
47
+ isInteracting: true,
48
+ zoomData: paramsZoomData
49
+ })
50
+ });
51
+ });
52
+ const timeout = setTimeout(() => {
53
+ store.update(prevState => {
54
+ return _extends({}, prevState, {
55
+ zoom: _extends({}, prevState.zoom, {
56
+ isInteracting: false
57
+ })
58
+ });
59
+ });
60
+ }, 166);
61
+ return () => {
62
+ clearTimeout(timeout);
63
+ };
64
+ }, [store, paramsZoomData]);
65
+
66
+ // Add instance methods
35
67
  const setIsInteracting = React.useCallback(isInteracting => {
36
68
  store.update(prev => _extends({}, prev, {
37
69
  zoom: _extends({}, prev.zoom, {
@@ -41,15 +73,24 @@ export const useChartProZoom = ({
41
73
  }, [store]);
42
74
  const setZoomDataCallback = React.useCallback(zoomData => {
43
75
  store.update(prevState => {
44
- const newZoomData = typeof zoomData === 'function' ? zoomData(prevState.zoom.zoomData) : zoomData;
45
- params.onZoomChange?.(newZoomData);
76
+ const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
77
+ onZoomChange?.(newZoomData);
78
+ if (prevState.zoom.isControlled) {
79
+ return prevState;
80
+ }
46
81
  return _extends({}, prevState, {
47
82
  zoom: _extends({}, prevState.zoom, {
48
83
  zoomData: newZoomData
49
84
  })
50
85
  });
51
86
  });
52
- }, [params, store]);
87
+ }, [onZoomChange, store]);
88
+
89
+ // Add events
90
+ const panningEventCacheRef = React.useRef([]);
91
+ const zoomEventCacheRef = React.useRef([]);
92
+ const eventPrevDiff = React.useRef(0);
93
+ const interactionTimeoutRef = React.useRef(undefined);
53
94
 
54
95
  // Add event for chart panning
55
96
  const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
@@ -281,7 +322,8 @@ export const useChartProZoom = ({
281
322
  };
282
323
  useChartProZoom.params = {
283
324
  initialZoom: true,
284
- onZoomChange: true
325
+ onZoomChange: true,
326
+ zoomData: true
285
327
  };
286
328
  useChartProZoom.getDefaultizedParams = ({
287
329
  params
@@ -289,11 +331,20 @@ useChartProZoom.getDefaultizedParams = ({
289
331
  return _extends({}, params);
290
332
  };
291
333
  useChartProZoom.getInitialState = params => {
292
- const optionsLookup = _extends({}, createZoomLookup('x')(params.defaultizedXAxis), createZoomLookup('y')(params.defaultizedYAxis));
334
+ const {
335
+ initialZoom,
336
+ zoomData,
337
+ defaultizedXAxis,
338
+ defaultizedYAxis
339
+ } = params;
340
+ const optionsLookup = _extends({}, createZoomLookup('x')(defaultizedXAxis), createZoomLookup('y')(defaultizedYAxis));
293
341
  return {
294
342
  zoom: {
295
- zoomData: params.initialZoom === undefined ? initializeZoomData(optionsLookup) : params.initialZoom,
296
- isInteracting: false
343
+ zoomData:
344
+ // eslint-disable-next-line no-nested-ternary
345
+ zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : initializeZoomData(optionsLookup),
346
+ isInteracting: false,
347
+ isControlled: zoomData !== undefined
297
348
  }
298
349
  };
299
350
  };
@@ -10,11 +10,13 @@ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-cha
10
10
  } & {
11
11
  resultFunc: (resultFuncArgs_0: {
12
12
  isInteracting: boolean;
13
- zoomData: import("@mui/x-charts/internals").ZoomData[];
13
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
14
+ isControlled: boolean;
14
15
  }) => boolean;
15
16
  memoizedResultFunc: ((resultFuncArgs_0: {
16
17
  isInteracting: boolean;
17
- zoomData: import("@mui/x-charts/internals").ZoomData[];
18
+ zoomData: readonly import("@mui/x-charts/internals").ZoomData[];
19
+ isControlled: boolean;
18
20
  }) => boolean) & {
19
21
  clearCache: () => void;
20
22
  resultsCount: () => number;
@@ -30,7 +32,7 @@ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-cha
30
32
  argsMemoize: typeof import("reselect").weakMapMemoize;
31
33
  memoize: typeof import("reselect").weakMapMemoize;
32
34
  };
33
- export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
35
+ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
34
36
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
35
37
  }) => boolean) & {
36
38
  clearCache: () => void;
@@ -50,7 +52,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
50
52
  resetResultsCount: () => void;
51
53
  };
52
54
  lastResult: () => boolean;
53
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
55
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
54
56
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
55
57
  }) => {
56
58
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
@@ -76,23 +78,23 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
76
78
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
77
79
  [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
78
80
  };
79
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
81
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
80
82
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
81
83
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
82
84
  clearCache: () => void;
83
85
  resultsCount: () => number;
84
86
  resetResultsCount: () => void;
85
87
  } & {
86
- resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
87
- memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
88
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
89
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
88
90
  clearCache: () => void;
89
91
  resultsCount: () => number;
90
92
  resetResultsCount: () => void;
91
93
  };
92
94
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
93
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
95
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
94
96
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
95
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) & {
97
+ }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
96
98
  clearCache: () => void;
97
99
  resultsCount: () => number;
98
100
  resetResultsCount: () => void;
@@ -100,20 +102,20 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
100
102
  resultFunc: (resultFuncArgs_0: {
101
103
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
102
104
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
103
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[];
105
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
104
106
  memoizedResultFunc: ((resultFuncArgs_0: {
105
107
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
106
108
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
107
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[]) & {
109
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
108
110
  clearCache: () => void;
109
111
  resultsCount: () => number;
110
112
  resetResultsCount: () => void;
111
113
  };
112
- lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[];
113
- dependencies: [(state: import("@mui/x-charts/internals").ChartState<[import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
114
+ lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined;
115
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
114
116
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
115
117
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
116
- }];
118
+ } | undefined];
117
119
  recomputations: () => number;
118
120
  resetRecomputations: () => void;
119
121
  dependencyRecomputations: () => number;
@@ -129,23 +131,23 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
129
131
  } & {
130
132
  memoize: typeof import("reselect").weakMapMemoize;
131
133
  argsMemoize: typeof import("reselect").weakMapMemoize;
132
- }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
134
+ }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
133
135
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
134
136
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
135
137
  clearCache: () => void;
136
138
  resultsCount: () => number;
137
139
  resetResultsCount: () => void;
138
140
  } & {
139
- resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
140
- memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
141
+ resultFunc: (resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
142
+ memoizedResultFunc: ((resultFuncArgs_0: import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
141
143
  clearCache: () => void;
142
144
  resultsCount: () => number;
143
145
  resetResultsCount: () => void;
144
146
  };
145
147
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
146
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals").UseChartCartesianAxisState & Partial<{}> & {
148
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
147
149
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
148
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) & {
150
+ }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
149
151
  clearCache: () => void;
150
152
  resultsCount: () => number;
151
153
  resetResultsCount: () => void;
@@ -153,20 +155,20 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
153
155
  resultFunc: (resultFuncArgs_0: {
154
156
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
155
157
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
156
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[];
158
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
157
159
  memoizedResultFunc: ((resultFuncArgs_0: {
158
160
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
159
161
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
160
- }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[]) & {
162
+ } | undefined) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
161
163
  clearCache: () => void;
162
164
  resultsCount: () => number;
163
165
  resetResultsCount: () => void;
164
166
  };
165
- lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[];
166
- dependencies: [(state: import("@mui/x-charts/internals").ChartState<[import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
167
+ lastResult: () => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined;
168
+ dependencies: [(state: import("@mui/x-charts/internals").ChartState<[], [import("@mui/x-charts/internals").UseChartCartesianAxisSignature]>) => {
167
169
  x: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsXAxisProps>[];
168
170
  y: import("@mui/x-charts").AxisConfig<import("@mui/x-charts").ScaleName, any, import("@mui/x-charts").ChartsYAxisProps>[];
169
- }];
171
+ } | undefined];
170
172
  recomputations: () => number;
171
173
  resetRecomputations: () => void;
172
174
  dependencyRecomputations: () => number;
@@ -2,14 +2,19 @@ import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSig
2
2
  export interface UseChartProZoomParameters {
3
3
  /**
4
4
  * The list of zoom data related to each axis.
5
+ * Used to initialize the zoom in a specific configuration without controlling it.
5
6
  */
6
- initialZoom?: ZoomData[];
7
+ initialZoom?: readonly ZoomData[];
7
8
  /**
8
9
  * Callback fired when the zoom has changed.
9
10
  *
10
11
  * @param {ZoomData[]} zoomData Updated zoom data.
11
12
  */
12
- onZoomChange?: (zoomData: ZoomData[] | ((zoomData: ZoomData[]) => ZoomData[])) => void;
13
+ onZoomChange?: (zoomData: ZoomData[]) => void;
14
+ /**
15
+ * The list of zoom data related to each axis.
16
+ */
17
+ zoomData?: readonly ZoomData[];
13
18
  }
14
19
  export type UseChartProZoomDefaultizedParameters = UseChartProZoomParameters & UseChartCartesianAxisDefaultizedParameters;
15
20
  export interface UseChartProZoomState {
@@ -22,7 +27,11 @@ export interface UseChartProZoomState {
22
27
  /**
23
28
  * Mapping of axis id to the zoom data.
24
29
  */
25
- zoomData: ZoomData[];
30
+ zoomData: readonly ZoomData[];
31
+ /**
32
+ * Internal information to know if the user control the state or not.
33
+ */
34
+ isControlled: boolean;
26
35
  };
27
36
  }
28
37
  export interface UseChartProZoomPublicApi {
@@ -1,6 +1,6 @@
1
1
  import ponyfillGlobal from '@mui/utils/ponyfillGlobal';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczOTc0NjgwMDAwMA==";
3
+ const releaseInfo = "MTc0MTMwMjAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat