@mui/x-charts-pro 8.0.0-alpha.1 → 8.0.0-alpha.11

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 (198) hide show
  1. package/BarChartPro/BarChartPro.d.ts +2 -2
  2. package/BarChartPro/BarChartPro.js +75 -34
  3. package/BarChartPro/BarChartPro.plugins.d.ts +10 -0
  4. package/BarChartPro/BarChartPro.plugins.js +3 -0
  5. package/CHANGELOG.md +2007 -230
  6. package/ChartContainerPro/ChartContainerPro.d.ts +33 -5
  7. package/ChartContainerPro/ChartContainerPro.js +55 -37
  8. package/ChartContainerPro/useChartContainerProProps.d.ts +6 -5
  9. package/ChartContainerPro/useChartContainerProProps.js +17 -13
  10. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +37 -0
  11. package/ChartDataProviderPro/ChartDataProviderPro.js +105 -0
  12. package/{context → ChartDataProviderPro}/package.json +1 -1
  13. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +8 -0
  14. package/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  15. package/Heatmap/Heatmap.d.ts +1 -2
  16. package/Heatmap/Heatmap.js +36 -13
  17. package/Heatmap/Heatmap.plugins.d.ts +8 -0
  18. package/Heatmap/Heatmap.plugins.js +2 -0
  19. package/Heatmap/HeatmapItem.js +1 -1
  20. package/Heatmap/HeatmapTooltip.js +8 -28
  21. package/Heatmap/extremums.d.ts +2 -2
  22. package/Heatmap/formatter.d.ts +2 -2
  23. package/Heatmap/formatter.js +2 -1
  24. package/Heatmap/heatmapClasses.js +2 -1
  25. package/Heatmap/plugin.d.ts +2 -2
  26. package/Heatmap/plugin.js +4 -2
  27. package/Heatmap/tooltip.d.ts +3 -0
  28. package/Heatmap/tooltip.js +25 -0
  29. package/LineChartPro/LineChartPro.d.ts +2 -2
  30. package/LineChartPro/LineChartPro.js +81 -54
  31. package/LineChartPro/LineChartPro.plugins.d.ts +10 -0
  32. package/LineChartPro/LineChartPro.plugins.js +3 -0
  33. package/README.md +1 -1
  34. package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
  35. package/ScatterChartPro/ScatterChartPro.js +59 -34
  36. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +10 -0
  37. package/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  38. package/hooks/index.d.ts +1 -0
  39. package/hooks/index.js +2 -1
  40. package/hooks/useSeries.d.ts +2 -4
  41. package/hooks/zoom/index.d.ts +1 -0
  42. package/hooks/zoom/index.js +1 -0
  43. package/hooks/zoom/useIsZoomInteracting.d.ts +6 -0
  44. package/hooks/zoom/useIsZoomInteracting.js +14 -0
  45. package/index.d.ts +3 -2
  46. package/index.js +5 -6
  47. package/internals/plugins/allPlugins.d.ts +11 -0
  48. package/internals/plugins/allPlugins.js +5 -0
  49. package/internals/plugins/useChartProZoom/creatZoomLookup.d.ts +3 -0
  50. package/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
  51. package/internals/plugins/useChartProZoom/defaultizeZoom.d.ts +2 -0
  52. package/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
  53. package/internals/plugins/useChartProZoom/index.d.ts +3 -0
  54. package/internals/plugins/useChartProZoom/index.js +3 -0
  55. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +3 -0
  56. package/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
  57. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +377 -0
  58. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
  59. package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +50 -0
  60. package/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +45 -0
  61. package/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
  62. package/internals/plugins/useChartProZoom/zoom.types.d.ts +53 -0
  63. package/internals/utils/releaseInfo.js +2 -2
  64. package/models/index.d.ts +1 -0
  65. package/models/index.js +2 -1
  66. package/modern/BarChartPro/BarChartPro.js +75 -34
  67. package/modern/BarChartPro/BarChartPro.plugins.js +3 -0
  68. package/modern/ChartContainerPro/ChartContainerPro.js +55 -37
  69. package/modern/ChartContainerPro/useChartContainerProProps.js +17 -13
  70. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +105 -0
  71. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +15 -0
  72. package/modern/Heatmap/Heatmap.js +36 -13
  73. package/modern/Heatmap/Heatmap.plugins.js +2 -0
  74. package/modern/Heatmap/HeatmapItem.js +1 -1
  75. package/modern/Heatmap/HeatmapTooltip.js +8 -28
  76. package/modern/Heatmap/formatter.js +2 -1
  77. package/modern/Heatmap/heatmapClasses.js +2 -1
  78. package/modern/Heatmap/plugin.js +4 -2
  79. package/modern/Heatmap/tooltip.js +25 -0
  80. package/modern/LineChartPro/LineChartPro.js +81 -54
  81. package/modern/LineChartPro/LineChartPro.plugins.js +3 -0
  82. package/modern/ScatterChartPro/ScatterChartPro.js +59 -34
  83. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +3 -0
  84. package/modern/hooks/index.js +2 -1
  85. package/modern/hooks/zoom/index.js +1 -0
  86. package/modern/hooks/zoom/useIsZoomInteracting.js +14 -0
  87. package/modern/index.js +5 -6
  88. package/modern/internals/plugins/allPlugins.js +5 -0
  89. package/modern/internals/plugins/useChartProZoom/creatZoomLookup.js +12 -0
  90. package/modern/internals/plugins/useChartProZoom/defaultizeZoom.js +25 -0
  91. package/modern/internals/plugins/useChartProZoom/index.js +3 -0
  92. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +303 -0
  93. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +10 -0
  94. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +1 -0
  95. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +126 -0
  96. package/modern/internals/plugins/useChartProZoom/zoom.types.js +1 -0
  97. package/modern/internals/utils/releaseInfo.js +2 -2
  98. package/modern/models/index.js +2 -1
  99. package/node/BarChartPro/BarChartPro.js +74 -33
  100. package/node/BarChartPro/BarChartPro.plugins.js +9 -0
  101. package/node/ChartContainerPro/ChartContainerPro.js +54 -36
  102. package/node/ChartContainerPro/useChartContainerProProps.js +17 -13
  103. package/node/ChartDataProviderPro/ChartDataProviderPro.js +111 -0
  104. package/node/ChartDataProviderPro/useChartDataProviderProProps.js +21 -0
  105. package/node/Heatmap/Heatmap.js +36 -13
  106. package/node/Heatmap/Heatmap.plugins.js +8 -0
  107. package/node/Heatmap/HeatmapItem.js +2 -2
  108. package/node/Heatmap/HeatmapTooltip.js +6 -26
  109. package/node/Heatmap/formatter.js +2 -1
  110. package/node/Heatmap/heatmapClasses.js +5 -4
  111. package/node/Heatmap/plugin.js +4 -2
  112. package/node/Heatmap/tooltip.js +31 -0
  113. package/node/LineChartPro/LineChartPro.js +80 -53
  114. package/node/LineChartPro/LineChartPro.plugins.js +9 -0
  115. package/node/ScatterChartPro/ScatterChartPro.js +58 -33
  116. package/node/ScatterChartPro/ScatterChartPro.plugins.js +9 -0
  117. package/node/hooks/index.js +16 -1
  118. package/node/{context/CartesianProviderPro → hooks/zoom}/index.js +4 -4
  119. package/node/hooks/zoom/useIsZoomInteracting.js +19 -0
  120. package/node/index.js +34 -23
  121. package/node/internals/plugins/allPlugins.js +11 -0
  122. package/node/internals/plugins/useChartProZoom/creatZoomLookup.js +19 -0
  123. package/node/internals/plugins/useChartProZoom/defaultizeZoom.js +33 -0
  124. package/node/internals/plugins/useChartProZoom/index.js +38 -0
  125. package/node/internals/plugins/useChartProZoom/useChartProZoom.js +310 -0
  126. package/node/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +18 -0
  127. package/node/internals/plugins/useChartProZoom/useChartProZoom.utils.js +140 -0
  128. package/node/internals/plugins/useChartProZoom/zoom.types.js +5 -0
  129. package/node/internals/utils/releaseInfo.js +4 -3
  130. package/package.json +6 -6
  131. package/typeOverloads/modules.d.ts +8 -1
  132. package/context/CartesianProviderPro/CartesianProviderPro.d.ts +0 -6
  133. package/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
  134. package/context/CartesianProviderPro/createAxisFilterMapper.d.ts +0 -12
  135. package/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
  136. package/context/CartesianProviderPro/index.d.ts +0 -1
  137. package/context/CartesianProviderPro/index.js +0 -1
  138. package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -10
  139. package/context/ChartDataProviderPro/ChartDataProviderPro.js +0 -299
  140. package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -14
  141. package/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
  142. package/context/ZoomProvider/Zoom.types.d.ts +0 -144
  143. package/context/ZoomProvider/ZoomContext.d.ts +0 -4
  144. package/context/ZoomProvider/ZoomContext.js +0 -16
  145. package/context/ZoomProvider/ZoomProvider.d.ts +0 -3
  146. package/context/ZoomProvider/ZoomProvider.js +0 -56
  147. package/context/ZoomProvider/ZoomSetup.d.ts +0 -9
  148. package/context/ZoomProvider/ZoomSetup.js +0 -16
  149. package/context/ZoomProvider/defaultizeZoom.d.ts +0 -2
  150. package/context/ZoomProvider/defaultizeZoom.js +0 -32
  151. package/context/ZoomProvider/index.d.ts +0 -3
  152. package/context/ZoomProvider/index.js +0 -3
  153. package/context/ZoomProvider/initializeZoomData.d.ts +0 -6
  154. package/context/ZoomProvider/initializeZoomData.js +0 -13
  155. package/context/ZoomProvider/useSetupPan.d.ts +0 -1
  156. package/context/ZoomProvider/useSetupPan.js +0 -106
  157. package/context/ZoomProvider/useSetupZoom.d.ts +0 -1
  158. package/context/ZoomProvider/useSetupZoom.js +0 -274
  159. package/context/ZoomProvider/useZoom.d.ts +0 -7
  160. package/context/ZoomProvider/useZoom.js +0 -19
  161. package/context/index.d.ts +0 -3
  162. package/context/index.js +0 -5
  163. package/modern/context/CartesianProviderPro/CartesianProviderPro.js +0 -89
  164. package/modern/context/CartesianProviderPro/createAxisFilterMapper.js +0 -60
  165. package/modern/context/CartesianProviderPro/index.js +0 -1
  166. package/modern/context/ChartDataProviderPro/ChartDataProviderPro.js +0 -299
  167. package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -43
  168. package/modern/context/ZoomProvider/ZoomContext.js +0 -16
  169. package/modern/context/ZoomProvider/ZoomProvider.js +0 -56
  170. package/modern/context/ZoomProvider/ZoomSetup.js +0 -16
  171. package/modern/context/ZoomProvider/defaultizeZoom.js +0 -32
  172. package/modern/context/ZoomProvider/index.js +0 -3
  173. package/modern/context/ZoomProvider/initializeZoomData.js +0 -13
  174. package/modern/context/ZoomProvider/useSetupPan.js +0 -106
  175. package/modern/context/ZoomProvider/useSetupZoom.js +0 -274
  176. package/modern/context/ZoomProvider/useZoom.js +0 -19
  177. package/modern/context/index.js +0 -5
  178. package/node/context/CartesianProviderPro/CartesianProviderPro.js +0 -95
  179. package/node/context/CartesianProviderPro/createAxisFilterMapper.js +0 -68
  180. package/node/context/ChartDataProviderPro/ChartDataProviderPro.js +0 -305
  181. package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +0 -50
  182. package/node/context/ZoomProvider/ZoomContext.js +0 -23
  183. package/node/context/ZoomProvider/ZoomProvider.js +0 -63
  184. package/node/context/ZoomProvider/ZoomSetup.js +0 -20
  185. package/node/context/ZoomProvider/defaultizeZoom.js +0 -40
  186. package/node/context/ZoomProvider/index.js +0 -38
  187. package/node/context/ZoomProvider/initializeZoomData.js +0 -20
  188. package/node/context/ZoomProvider/useSetupPan.js +0 -114
  189. package/node/context/ZoomProvider/useSetupZoom.js +0 -281
  190. package/node/context/ZoomProvider/useZoom.js +0 -25
  191. package/node/context/index.js +0 -27
  192. /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.d.ts +0 -0
  193. /package/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  194. /package/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
  195. /package/{modern/context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/zoom.types.js} +0 -0
  196. /package/modern/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  197. /package/node/{context/ChartDataProviderPro → ChartDataProviderPro}/index.js +0 -0
  198. /package/node/{context/ZoomProvider/Zoom.types.js → internals/plugins/useChartProZoom/useChartProZoom.types.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { BarChartProps } from '@mui/x-charts/BarChart';
3
- import { ZoomProps } from '../context/ZoomProvider';
4
- export interface BarChartProProps extends BarChartProps, ZoomProps {
3
+ import { ChartContainerProProps } from '../ChartContainerPro';
4
+ export interface BarChartProProps extends Omit<BarChartProps, 'apiRef'>, Omit<ChartContainerProProps<'bar'>, 'series' | 'plugins' | 'seriesConfig'> {
5
5
  }
6
6
  /**
7
7
  * Demos:
@@ -2,12 +2,11 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["zoom", "onZoomChange"];
5
+ const _excluded = ["initialZoom", "onZoomChange", "apiRef"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { useThemeProps } from '@mui/material/styles';
9
9
  import { BarPlot } from '@mui/x-charts/BarChart';
10
- import { ChartsOnAxisClickHandler } from '@mui/x-charts/ChartsOnAxisClickHandler';
11
10
  import { ChartsGrid } from '@mui/x-charts/ChartsGrid';
12
11
  import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
13
12
  import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
@@ -15,17 +14,17 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
15
14
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
16
15
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
16
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
- import { useBarChartProps } from '@mui/x-charts/internals';
19
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
20
- import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
- import { useZoom } from "../context/ZoomProvider/useZoom.js";
17
+ import { useBarChartProps, ChartsWrapper } from '@mui/x-charts/internals';
18
+ import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
19
+ import { useIsZoomInteracting } from "../hooks/zoom/index.js";
20
+ import { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
21
+ import { ChartDataProviderPro } from "../ChartDataProviderPro/index.js";
22
+ import { BAR_CHART_PRO_PLUGINS } from "./BarChartPro.plugins.js";
22
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
24
  function BarChartPlotZoom(props) {
24
- const {
25
- isInteracting
26
- } = useZoom();
25
+ const isInteracting = useIsZoomInteracting();
27
26
  return /*#__PURE__*/_jsx(BarPlot, _extends({}, props, {
28
- skipAnimation: isInteracting || undefined
27
+ skipAnimation: isInteracting || props.skipAnimation
29
28
  }));
30
29
  }
31
30
  process.env.NODE_ENV !== "production" ? BarChartPlotZoom.propTypes = {
@@ -84,14 +83,15 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
84
83
  name: 'MuiBarChartPro'
85
84
  });
86
85
  const {
87
- zoom,
88
- onZoomChange
86
+ initialZoom,
87
+ onZoomChange,
88
+ apiRef
89
89
  } = props,
90
90
  other = _objectWithoutPropertiesLoose(props, _excluded);
91
91
  const {
92
+ chartsWrapperProps,
92
93
  chartContainerProps,
93
94
  barPlotProps,
94
- axisClickHandlerProps,
95
95
  gridProps,
96
96
  clipPathProps,
97
97
  clipPathGroupProps,
@@ -101,15 +101,24 @@ const BarChartPro = /*#__PURE__*/React.forwardRef(function BarChartPro(inProps,
101
101
  legendProps,
102
102
  children
103
103
  } = useBarChartProps(other);
104
+ const {
105
+ chartDataProviderProProps,
106
+ chartsSurfaceProps
107
+ } = useChartContainerProProps(_extends({}, chartContainerProps, {
108
+ initialZoom,
109
+ onZoomChange,
110
+ apiRef,
111
+ plugins: BAR_CHART_PRO_PLUGINS
112
+ }), ref);
104
113
  const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
105
- return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
106
- ref: ref
107
- }, chartContainerProps, {
108
- zoom: zoom,
109
- onZoomChange: onZoomChange,
110
- children: [props.onAxisClick && /*#__PURE__*/_jsx(ChartsOnAxisClickHandler, _extends({}, axisClickHandlerProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
111
- children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
112
- })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
114
+ return /*#__PURE__*/_jsx(ChartDataProviderPro, _extends({}, chartDataProviderProProps, {
115
+ children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
116
+ children: [!props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
117
+ children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
118
+ children: [/*#__PURE__*/_jsx(BarChartPlotZoom, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
119
+ })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
120
+ }))]
121
+ }))
113
122
  }));
114
123
  });
115
124
  process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
@@ -117,6 +126,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
117
126
  // | These PropTypes are generated from the TypeScript type definitions |
118
127
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
119
128
  // ----------------------------------------------------------------------
129
+ apiRef: PropTypes.shape({
130
+ current: PropTypes.shape({
131
+ setZoomData: PropTypes.func.isRequired
132
+ })
133
+ }),
120
134
  /**
121
135
  * The configuration of axes highlight.
122
136
  * Default is set to 'band' in the bar direction.
@@ -149,7 +163,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
149
163
  className: PropTypes.string,
150
164
  /**
151
165
  * Color palette used to colorize multiple series.
152
- * @default blueberryTwilightPalette
166
+ * @default rainbowSurgePalette
153
167
  */
154
168
  colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
155
169
  /**
@@ -179,12 +193,26 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
179
193
  */
180
194
  hideLegend: PropTypes.bool,
181
195
  /**
182
- * The item currently highlighted. Turns highlighting into a controlled prop.
196
+ * The highlighted item.
197
+ * Used when the highlight is controlled.
183
198
  */
184
199
  highlightedItem: PropTypes.shape({
185
200
  dataIndex: PropTypes.number,
186
- seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
201
+ seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
187
202
  }),
203
+ /**
204
+ * This prop is used to help implement the accessibility logic.
205
+ * If you don't provide this prop. It falls back to a randomly generated id.
206
+ */
207
+ id: PropTypes.string,
208
+ /**
209
+ * The list of zoom data related to each axis.
210
+ */
211
+ initialZoom: PropTypes.arrayOf(PropTypes.shape({
212
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
213
+ end: PropTypes.number.isRequired,
214
+ start: PropTypes.number.isRequired
215
+ })),
188
216
  /**
189
217
  * The direction of the bar elements.
190
218
  * @default 'vertical'
@@ -205,7 +233,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
205
233
  * The margin between the SVG and the drawing area.
206
234
  * It's used for leaving some space for extra information such as the x- and y-axis or legend.
207
235
  * Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
208
- * @default object Depends on the charts type.
209
236
  */
210
237
  margin: PropTypes.shape({
211
238
  bottom: PropTypes.number,
@@ -265,6 +292,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
265
292
  */
266
293
  slots: PropTypes.object,
267
294
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
295
+ theme: PropTypes.oneOf(['dark', 'light']),
268
296
  title: PropTypes.string,
269
297
  /**
270
298
  * Indicate which axis to display the top of the charts.
@@ -307,7 +335,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
307
335
  hideTooltip: PropTypes.bool,
308
336
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
309
337
  label: PropTypes.string,
310
- labelFontSize: PropTypes.number,
311
338
  labelStyle: PropTypes.object,
312
339
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
313
340
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -318,7 +345,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
318
345
  slots: PropTypes.object,
319
346
  stroke: PropTypes.string,
320
347
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
321
- tickFontSize: PropTypes.number,
322
348
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
323
349
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
324
350
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
@@ -370,7 +396,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
370
396
  hideTooltip: PropTypes.bool,
371
397
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
372
398
  label: PropTypes.string,
373
- labelFontSize: PropTypes.number,
374
399
  labelStyle: PropTypes.object,
375
400
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
376
401
  min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -381,7 +406,6 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
381
406
  slots: PropTypes.object,
382
407
  stroke: PropTypes.string,
383
408
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
384
- tickFontSize: PropTypes.number,
385
409
  tickInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.array, PropTypes.func]),
386
410
  tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
387
411
  tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
@@ -403,12 +427,29 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
403
427
  }), PropTypes.bool])
404
428
  })),
405
429
  /**
406
- * The list of zoom data related to each axis.
430
+ * The configuration of the z-axes.
407
431
  */
408
- zoom: PropTypes.arrayOf(PropTypes.shape({
409
- axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
410
- end: PropTypes.number.isRequired,
411
- start: PropTypes.number.isRequired
432
+ zAxis: PropTypes.arrayOf(PropTypes.shape({
433
+ colorMap: PropTypes.oneOfType([PropTypes.shape({
434
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
435
+ type: PropTypes.oneOf(['ordinal']).isRequired,
436
+ unknownColor: PropTypes.string,
437
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
438
+ }), PropTypes.shape({
439
+ color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
440
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
441
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
442
+ type: PropTypes.oneOf(['continuous']).isRequired
443
+ }), PropTypes.shape({
444
+ colors: PropTypes.arrayOf(PropTypes.string).isRequired,
445
+ thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
446
+ type: PropTypes.oneOf(['piecewise']).isRequired
447
+ })]),
448
+ data: PropTypes.array,
449
+ dataKey: PropTypes.string,
450
+ id: PropTypes.string,
451
+ max: PropTypes.number,
452
+ min: PropTypes.number
412
453
  }))
413
454
  } : void 0;
414
455
  export { BarChartPro };
@@ -0,0 +1,10 @@
1
+ import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ import { UseChartProZoomSignature } from '../internals/plugins/useChartProZoom';
3
+ export type BarChartProPluginsSignatures = [
4
+ UseChartZAxisSignature,
5
+ UseChartCartesianAxisSignature<'bar'>,
6
+ UseChartInteractionSignature,
7
+ UseChartHighlightSignature,
8
+ UseChartProZoomSignature
9
+ ];
10
+ export declare const BAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<BarChartProPluginsSignatures>;
@@ -0,0 +1,3 @@
1
+ import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
2
+ import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
3
+ export const BAR_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];