@mui/x-charts 8.27.0 → 8.27.4

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 (94) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/ChartContainer/ChartContainer.d.ts +16 -29
  3. package/ChartContainer/ChartContainer.js +14 -1691
  4. package/ChartContainer/useChartContainerProps.d.ts +9 -10
  5. package/ChartContainer/useChartContainerProps.js +9 -94
  6. package/ChartDataProvider/ChartDataProvider.d.ts +15 -44
  7. package/ChartDataProvider/ChartDataProvider.js +16 -130
  8. package/ChartDataProvider/useChartDataProviderProps.d.ts +7 -10
  9. package/ChartDataProvider/useChartDataProviderProps.js +5 -38
  10. package/ChartsContainer/ChartsContainer.d.ts +37 -0
  11. package/ChartsContainer/ChartsContainer.js +1702 -0
  12. package/ChartsContainer/index.d.ts +1 -0
  13. package/ChartsContainer/index.js +16 -0
  14. package/ChartsContainer/useChartsContainerProps.d.ts +15 -0
  15. package/ChartsContainer/useChartsContainerProps.js +104 -0
  16. package/ChartsDataProvider/ChartsDataProvider.d.ts +51 -0
  17. package/ChartsDataProvider/ChartsDataProvider.js +138 -0
  18. package/ChartsDataProvider/index.d.ts +1 -0
  19. package/ChartsDataProvider/index.js +16 -0
  20. package/ChartsDataProvider/useChartsDataProviderProps.d.ts +13 -0
  21. package/ChartsDataProvider/useChartsDataProviderProps.js +45 -0
  22. package/context/ChartProvider/ChartContext.d.ts +2 -3
  23. package/context/ChartProvider/ChartContext.js +3 -4
  24. package/context/ChartProvider/ChartProvider.d.ts +5 -8
  25. package/context/ChartProvider/ChartProvider.js +6 -41
  26. package/context/ChartProvider/ChartProvider.types.d.ts +14 -41
  27. package/context/ChartProvider/useChartContext.d.ts +4 -3
  28. package/context/ChartProvider/useChartContext.js +5 -11
  29. package/context/ChartsProvider/ChartsContext.d.ts +6 -0
  30. package/context/ChartsProvider/ChartsContext.js +14 -0
  31. package/context/ChartsProvider/ChartsProvider.d.ts +8 -0
  32. package/context/ChartsProvider/ChartsProvider.js +47 -0
  33. package/context/ChartsProvider/ChartsProvider.types.d.ts +40 -0
  34. package/context/ChartsProvider/ChartsProvider.types.js +5 -0
  35. package/context/ChartsProvider/index.d.ts +3 -0
  36. package/context/ChartsProvider/index.js +38 -0
  37. package/context/ChartsProvider/useChartsContext.d.ts +3 -0
  38. package/context/ChartsProvider/useChartsContext.js +18 -0
  39. package/context/ChartsSlotsContext.d.ts +1 -1
  40. package/context/ChartsSlotsContext.js +1 -1
  41. package/esm/ChartContainer/ChartContainer.d.ts +16 -29
  42. package/esm/ChartContainer/ChartContainer.js +15 -1690
  43. package/esm/ChartContainer/useChartContainerProps.d.ts +9 -10
  44. package/esm/ChartContainer/useChartContainerProps.js +10 -93
  45. package/esm/ChartDataProvider/ChartDataProvider.d.ts +15 -44
  46. package/esm/ChartDataProvider/ChartDataProvider.js +16 -128
  47. package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +7 -10
  48. package/esm/ChartDataProvider/useChartDataProviderProps.js +6 -36
  49. package/esm/ChartsContainer/ChartsContainer.d.ts +37 -0
  50. package/esm/ChartsContainer/ChartsContainer.js +1696 -0
  51. package/esm/ChartsContainer/index.d.ts +1 -0
  52. package/esm/ChartsContainer/index.js +1 -0
  53. package/esm/ChartsContainer/useChartsContainerProps.d.ts +15 -0
  54. package/esm/ChartsContainer/useChartsContainerProps.js +97 -0
  55. package/esm/ChartsDataProvider/ChartsDataProvider.d.ts +51 -0
  56. package/esm/ChartsDataProvider/ChartsDataProvider.js +132 -0
  57. package/esm/ChartsDataProvider/index.d.ts +1 -0
  58. package/esm/ChartsDataProvider/index.js +1 -0
  59. package/esm/ChartsDataProvider/useChartsDataProviderProps.d.ts +13 -0
  60. package/esm/ChartsDataProvider/useChartsDataProviderProps.js +38 -0
  61. package/esm/context/ChartProvider/ChartContext.d.ts +2 -3
  62. package/esm/context/ChartProvider/ChartContext.js +4 -3
  63. package/esm/context/ChartProvider/ChartProvider.d.ts +5 -8
  64. package/esm/context/ChartProvider/ChartProvider.js +5 -38
  65. package/esm/context/ChartProvider/ChartProvider.types.d.ts +14 -41
  66. package/esm/context/ChartProvider/useChartContext.d.ts +4 -3
  67. package/esm/context/ChartProvider/useChartContext.js +6 -9
  68. package/esm/context/ChartsProvider/ChartsContext.d.ts +6 -0
  69. package/esm/context/ChartsProvider/ChartsContext.js +8 -0
  70. package/esm/context/ChartsProvider/ChartsProvider.d.ts +8 -0
  71. package/esm/context/ChartsProvider/ChartsProvider.js +41 -0
  72. package/esm/context/ChartsProvider/ChartsProvider.types.d.ts +40 -0
  73. package/esm/context/ChartsProvider/ChartsProvider.types.js +1 -0
  74. package/esm/context/ChartsProvider/index.d.ts +3 -0
  75. package/esm/context/ChartsProvider/index.js +3 -0
  76. package/esm/context/ChartsProvider/useChartsContext.d.ts +3 -0
  77. package/esm/context/ChartsProvider/useChartsContext.js +11 -0
  78. package/esm/context/ChartsSlotsContext.d.ts +1 -1
  79. package/esm/context/ChartsSlotsContext.js +1 -1
  80. package/esm/index.d.ts +4 -1
  81. package/esm/index.js +3 -1
  82. package/esm/internals/index.d.ts +3 -0
  83. package/esm/internals/index.js +3 -0
  84. package/esm/internals/store/useStore.js +1 -1
  85. package/esm/themeAugmentation/components.d.ts +4 -0
  86. package/esm/themeAugmentation/props.d.ts +4 -2
  87. package/index.d.ts +4 -1
  88. package/index.js +21 -1
  89. package/internals/index.d.ts +3 -0
  90. package/internals/index.js +36 -0
  91. package/internals/store/useStore.js +1 -1
  92. package/package.json +3 -3
  93. package/themeAugmentation/components.d.ts +4 -0
  94. package/themeAugmentation/props.d.ts +4 -2
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./ChartsProvider.js";
2
+ export * from "./ChartsProvider.types.js";
3
+ export * from "./useChartsContext.js";
@@ -0,0 +1,3 @@
1
+ export * from "./ChartsProvider.js";
2
+ export * from "./ChartsProvider.types.js";
3
+ export * from "./useChartsContext.js";
@@ -0,0 +1,3 @@
1
+ import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.js";
2
+ import { type ChartsContextValue } from "./ChartsProvider.types.js";
3
+ export declare const useChartsContext: <TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []>() => ChartsContextValue<TSignatures, TOptionalSignatures>;
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { ChartsContext } from "./ChartsContext.js";
5
+ export const useChartsContext = () => {
6
+ const context = React.useContext(ChartsContext);
7
+ if (context == null) {
8
+ throw new Error('MUI X Charts: Could not find the Charts context. ' + 'This happens when the component is rendered outside of a ChartsDataProvider or ChartsContainer parent component, ' + 'which means the required context is not available. ' + 'Wrap your component in a ChartsDataProvider or ChartsContainer. ' + 'This can also happen if you are bundling multiple versions of the library.');
9
+ }
10
+ return context;
11
+ };
@@ -7,7 +7,7 @@ export interface ChartsSlotsContextValue<T extends ChartsSlots & Record<keyof T,
7
7
  }
8
8
  export declare const ChartsSlotsContext: React.Context<ChartsSlotsContextValue<ChartsSlots> | null>;
9
9
  /**
10
- * Get the slots and slotProps from the nearest `ChartDataProvider` or `ChartDataProviderPro`.
10
+ * Get the slots and slotProps from the nearest `ChartsDataProvider` or `ChartsDataProviderPro`.
11
11
  * @returns {ChartsSlotsContextValue} The slots and slotProps from the context.
12
12
  */
13
13
  export declare function useChartsSlots<T extends ChartsSlots & Record<keyof T, React.ComponentType<any>> = ChartsSlots>(): ChartsSlotsContextValue<T>;
@@ -6,7 +6,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  export const ChartsSlotsContext = /*#__PURE__*/React.createContext(null);
7
7
 
8
8
  /**
9
- * Get the slots and slotProps from the nearest `ChartDataProvider` or `ChartDataProviderPro`.
9
+ * Get the slots and slotProps from the nearest `ChartsDataProvider` or `ChartsDataProviderPro`.
10
10
  * @returns {ChartsSlotsContextValue} The slots and slotProps from the context.
11
11
  */
12
12
  if (process.env.NODE_ENV !== "production") ChartsSlotsContext.displayName = "ChartsSlotsContext";
package/esm/index.d.ts CHANGED
@@ -24,8 +24,11 @@ export * from "./SparkLineChart/index.js";
24
24
  export * from "./Gauge/index.js";
25
25
  export * from "./RadarChart/index.js";
26
26
  export * from "./ChartsSurface/index.js";
27
+ export { ChartsContainer } from "./ChartsContainer/index.js";
28
+ export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotProps } from "./ChartsContainer/index.js";
27
29
  export { ChartContainer } from "./ChartContainer/index.js";
28
- export type { ChartContainerProps } from "./ChartContainer/index.js";
30
+ export type { ChartContainerProps, ChartContainerSlots, ChartContainerSlotProps } from "./ChartContainer/index.js";
31
+ export * from "./ChartsDataProvider/index.js";
29
32
  export * from "./ChartDataProvider/index.js";
30
33
  export * from "./Toolbar/index.js";
31
34
  export * from "./ChartsWrapper/index.js";
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v8.27.0
2
+ * @mui/x-charts v8.27.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -31,7 +31,9 @@ export * from "./SparkLineChart/index.js";
31
31
  export * from "./Gauge/index.js";
32
32
  export * from "./RadarChart/index.js";
33
33
  export * from "./ChartsSurface/index.js";
34
+ export { ChartsContainer } from "./ChartsContainer/index.js";
34
35
  export { ChartContainer } from "./ChartContainer/index.js";
36
+ export * from "./ChartsDataProvider/index.js";
35
37
  export * from "./ChartDataProvider/index.js";
36
38
  export * from "./Toolbar/index.js";
37
39
  export * from "./ChartsWrapper/index.js";
@@ -15,7 +15,9 @@ export { useLinePlotData } from "../LineChart/useLinePlotData.js";
15
15
  export * from "../BarChart/useBarChartProps.js";
16
16
  export { processBarDataForPlot } from "../BarChart/useBarPlotData.js";
17
17
  export { useRadarChartProps } from "../RadarChart/useRadarChartProps.js";
18
+ export * from "../ChartsContainer/useChartsContainerProps.js";
18
19
  export * from "../ChartContainer/useChartContainerProps.js";
20
+ export * from "../ChartsDataProvider/useChartsDataProviderProps.js";
19
21
  export * from "../ChartDataProvider/useChartDataProviderProps.js";
20
22
  export * from "./seriesSelectorOfType.js";
21
23
  export { useSkipAnimation } from "../hooks/useSkipAnimation.js";
@@ -66,6 +68,7 @@ export { getSeriesColorFn } from "./getSeriesColorFn.js";
66
68
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.js";
67
69
  export { getBandSize } from "./getBandSize.js";
68
70
  export { getAxisExtrema } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js";
71
+ export * from "../context/ChartsProvider/index.js";
69
72
  export * from "../context/ChartProvider/index.js";
70
73
  export * from "../context/ChartsSlotsContext.js";
71
74
  export * from "../models/seriesType/config.js";
@@ -18,7 +18,9 @@ export { useLinePlotData } from "../LineChart/useLinePlotData.js";
18
18
  export * from "../BarChart/useBarChartProps.js";
19
19
  export { processBarDataForPlot } from "../BarChart/useBarPlotData.js";
20
20
  export { useRadarChartProps } from "../RadarChart/useRadarChartProps.js";
21
+ export * from "../ChartsContainer/useChartsContainerProps.js";
21
22
  export * from "../ChartContainer/useChartContainerProps.js";
23
+ export * from "../ChartsDataProvider/useChartsDataProviderProps.js";
22
24
  export * from "../ChartDataProvider/useChartDataProviderProps.js";
23
25
  export * from "./seriesSelectorOfType.js";
24
26
  export { useSkipAnimation } from "../hooks/useSkipAnimation.js";
@@ -78,6 +80,7 @@ export { getBandSize } from "./getBandSize.js";
78
80
 
79
81
  // contexts
80
82
  export { getAxisExtrema } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js";
83
+ export * from "../context/ChartsProvider/index.js";
81
84
  export * from "../context/ChartProvider/index.js";
82
85
  export * from "../context/ChartsSlotsContext.js";
83
86
 
@@ -3,7 +3,7 @@ import { useChartContext } from "../../context/ChartProvider/index.js";
3
3
  export function useStore() {
4
4
  const context = useChartContext();
5
5
  if (!context) {
6
- throw new Error(['MUI X Charts: Could not find the charts context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
6
+ throw new Error('MUI X Charts: Could not find the Charts context. ' + 'This happens when the component is rendered outside of a ChartsContainer parent component. ' + 'Wrap your component in a ChartsContainer or ChartsDataProvider.');
7
7
  }
8
8
  return context.store;
9
9
  }
@@ -33,6 +33,10 @@ export interface ChartsComponents<Theme = unknown> {
33
33
  defaultProps?: ComponentsProps['MuiChartsSurface'];
34
34
  styleOverrides?: ComponentsOverrides<Theme>['MuiChartsSurface'];
35
35
  };
36
+ MuiChartsDataProvider?: {
37
+ defaultProps?: ComponentsProps['MuiChartsDataProvider'];
38
+ };
39
+ /** @deprecated Use `MuiChartsDataProvider` instead. */
36
40
  MuiChartDataProvider?: {
37
41
  defaultProps?: ComponentsProps['MuiChartDataProvider'];
38
42
  };
@@ -9,7 +9,7 @@ import { type ScatterChartProps } from "../ScatterChart/ScatterChart.js";
9
9
  import { type PieChartProps } from "../PieChart/PieChart.js";
10
10
  import { type ChartsXAxisProps, type ChartsYAxisProps } from "../models/axis.js";
11
11
  import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
12
- import { type ChartDataProviderProps } from "../ChartDataProvider/index.js";
12
+ import { type ChartsDataProviderProps } from "../ChartsDataProvider/index.js";
13
13
  export interface ChartsComponentsPropsList {
14
14
  MuiChartsXAxis: ChartsXAxisProps;
15
15
  MuiChartsYAxis: ChartsYAxisProps;
@@ -18,7 +18,9 @@ export interface ChartsComponentsPropsList {
18
18
  MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
19
19
  MuiChartsTooltip: ChartsTooltipProps;
20
20
  MuiChartsSurface: ChartsSurfaceProps;
21
- MuiChartDataProvider: ChartDataProviderProps;
21
+ MuiChartsDataProvider: ChartsDataProviderProps;
22
+ /** @deprecated Use `MuiChartsDataProvider` instead. */
23
+ MuiChartDataProvider: ChartsDataProviderProps;
22
24
  MuiBarChart: BarChartProps;
23
25
  MuiBarLabel: BarLabelProps;
24
26
  MuiLineChart: LineChartProps;
package/index.d.ts CHANGED
@@ -24,8 +24,11 @@ export * from "./SparkLineChart/index.js";
24
24
  export * from "./Gauge/index.js";
25
25
  export * from "./RadarChart/index.js";
26
26
  export * from "./ChartsSurface/index.js";
27
+ export { ChartsContainer } from "./ChartsContainer/index.js";
28
+ export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotProps } from "./ChartsContainer/index.js";
27
29
  export { ChartContainer } from "./ChartContainer/index.js";
28
- export type { ChartContainerProps } from "./ChartContainer/index.js";
30
+ export type { ChartContainerProps, ChartContainerSlots, ChartContainerSlotProps } from "./ChartContainer/index.js";
31
+ export * from "./ChartsDataProvider/index.js";
29
32
  export * from "./ChartDataProvider/index.js";
30
33
  export * from "./Toolbar/index.js";
31
34
  export * from "./ChartsWrapper/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v8.27.0
2
+ * @mui/x-charts v8.27.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", {
11
11
  value: true
12
12
  });
13
13
  var _exportNames = {
14
+ ChartsContainer: true,
14
15
  ChartContainer: true
15
16
  };
16
17
  Object.defineProperty(exports, "ChartContainer", {
@@ -19,6 +20,12 @@ Object.defineProperty(exports, "ChartContainer", {
19
20
  return _ChartContainer.ChartContainer;
20
21
  }
21
22
  });
23
+ Object.defineProperty(exports, "ChartsContainer", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return _ChartsContainer.ChartsContainer;
27
+ }
28
+ });
22
29
  var _constants = require("./constants");
23
30
  Object.keys(_constants).forEach(function (key) {
24
31
  if (key === "default" || key === "__esModule") return;
@@ -331,7 +338,20 @@ Object.keys(_ChartsSurface).forEach(function (key) {
331
338
  }
332
339
  });
333
340
  });
341
+ var _ChartsContainer = require("./ChartsContainer");
334
342
  var _ChartContainer = require("./ChartContainer");
343
+ var _ChartsDataProvider = require("./ChartsDataProvider");
344
+ Object.keys(_ChartsDataProvider).forEach(function (key) {
345
+ if (key === "default" || key === "__esModule") return;
346
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
347
+ if (key in exports && exports[key] === _ChartsDataProvider[key]) return;
348
+ Object.defineProperty(exports, key, {
349
+ enumerable: true,
350
+ get: function () {
351
+ return _ChartsDataProvider[key];
352
+ }
353
+ });
354
+ });
335
355
  var _ChartDataProvider = require("./ChartDataProvider");
336
356
  Object.keys(_ChartDataProvider).forEach(function (key) {
337
357
  if (key === "default" || key === "__esModule") return;
@@ -15,7 +15,9 @@ export { useLinePlotData } from "../LineChart/useLinePlotData.js";
15
15
  export * from "../BarChart/useBarChartProps.js";
16
16
  export { processBarDataForPlot } from "../BarChart/useBarPlotData.js";
17
17
  export { useRadarChartProps } from "../RadarChart/useRadarChartProps.js";
18
+ export * from "../ChartsContainer/useChartsContainerProps.js";
18
19
  export * from "../ChartContainer/useChartContainerProps.js";
20
+ export * from "../ChartsDataProvider/useChartsDataProviderProps.js";
19
21
  export * from "../ChartDataProvider/useChartDataProviderProps.js";
20
22
  export * from "./seriesSelectorOfType.js";
21
23
  export { useSkipAnimation } from "../hooks/useSkipAnimation.js";
@@ -66,6 +68,7 @@ export { getSeriesColorFn } from "./getSeriesColorFn.js";
66
68
  export { checkBarChartScaleErrors } from "../BarChart/checkBarChartScaleErrors.js";
67
69
  export { getBandSize } from "./getBandSize.js";
68
70
  export { getAxisExtrema } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.js";
71
+ export * from "../context/ChartsProvider/index.js";
69
72
  export * from "../context/ChartProvider/index.js";
70
73
  export * from "../context/ChartsSlotsContext.js";
71
74
  export * from "../models/seriesType/config.js";
@@ -221,6 +221,18 @@ Object.keys(_useBarChartProps).forEach(function (key) {
221
221
  });
222
222
  var _useBarPlotData = require("../BarChart/useBarPlotData");
223
223
  var _useRadarChartProps = require("../RadarChart/useRadarChartProps");
224
+ var _useChartsContainerProps = require("../ChartsContainer/useChartsContainerProps");
225
+ Object.keys(_useChartsContainerProps).forEach(function (key) {
226
+ if (key === "default" || key === "__esModule") return;
227
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
228
+ if (key in exports && exports[key] === _useChartsContainerProps[key]) return;
229
+ Object.defineProperty(exports, key, {
230
+ enumerable: true,
231
+ get: function () {
232
+ return _useChartsContainerProps[key];
233
+ }
234
+ });
235
+ });
224
236
  var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
225
237
  Object.keys(_useChartContainerProps).forEach(function (key) {
226
238
  if (key === "default" || key === "__esModule") return;
@@ -233,6 +245,18 @@ Object.keys(_useChartContainerProps).forEach(function (key) {
233
245
  }
234
246
  });
235
247
  });
248
+ var _useChartsDataProviderProps = require("../ChartsDataProvider/useChartsDataProviderProps");
249
+ Object.keys(_useChartsDataProviderProps).forEach(function (key) {
250
+ if (key === "default" || key === "__esModule") return;
251
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
252
+ if (key in exports && exports[key] === _useChartsDataProviderProps[key]) return;
253
+ Object.defineProperty(exports, key, {
254
+ enumerable: true,
255
+ get: function () {
256
+ return _useChartsDataProviderProps[key];
257
+ }
258
+ });
259
+ });
236
260
  var _useChartDataProviderProps = require("../ChartDataProvider/useChartDataProviderProps");
237
261
  Object.keys(_useChartDataProviderProps).forEach(function (key) {
238
262
  if (key === "default" || key === "__esModule") return;
@@ -745,6 +769,18 @@ var _getSeriesColorFn = require("./getSeriesColorFn");
745
769
  var _checkBarChartScaleErrors = require("../BarChart/checkBarChartScaleErrors");
746
770
  var _getBandSize = require("./getBandSize");
747
771
  var _getAxisExtrema = require("./plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema");
772
+ var _ChartsProvider = require("../context/ChartsProvider");
773
+ Object.keys(_ChartsProvider).forEach(function (key) {
774
+ if (key === "default" || key === "__esModule") return;
775
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
776
+ if (key in exports && exports[key] === _ChartsProvider[key]) return;
777
+ Object.defineProperty(exports, key, {
778
+ enumerable: true,
779
+ get: function () {
780
+ return _ChartsProvider[key];
781
+ }
782
+ });
783
+ });
748
784
  var _ChartProvider = require("../context/ChartProvider");
749
785
  Object.keys(_ChartProvider).forEach(function (key) {
750
786
  if (key === "default" || key === "__esModule") return;
@@ -9,7 +9,7 @@ var _ChartProvider = require("../../context/ChartProvider");
9
9
  function useStore() {
10
10
  const context = (0, _ChartProvider.useChartContext)();
11
11
  if (!context) {
12
- throw new Error(['MUI X Charts: Could not find the charts context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
12
+ throw new Error('MUI X Charts: Could not find the Charts context. ' + 'This happens when the component is rendered outside of a ChartsContainer parent component. ' + 'Wrap your component in a ChartsContainer or ChartsDataProvider.');
13
13
  }
14
14
  return context.store;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts",
3
- "version": "8.27.0",
3
+ "version": "8.27.4",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of MUI X Charts components.",
6
6
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  "prop-types": "^15.8.1",
35
35
  "reselect": "^5.1.1",
36
36
  "use-sync-external-store": "^1.6.0",
37
- "@mui/x-charts-vendor": "8.26.0",
38
37
  "@mui/x-internal-gestures": "0.4.0",
39
- "@mui/x-internals": "8.26.0"
38
+ "@mui/x-internals": "8.26.0",
39
+ "@mui/x-charts-vendor": "8.26.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@emotion/react": "^11.9.0",
@@ -33,6 +33,10 @@ export interface ChartsComponents<Theme = unknown> {
33
33
  defaultProps?: ComponentsProps['MuiChartsSurface'];
34
34
  styleOverrides?: ComponentsOverrides<Theme>['MuiChartsSurface'];
35
35
  };
36
+ MuiChartsDataProvider?: {
37
+ defaultProps?: ComponentsProps['MuiChartsDataProvider'];
38
+ };
39
+ /** @deprecated Use `MuiChartsDataProvider` instead. */
36
40
  MuiChartDataProvider?: {
37
41
  defaultProps?: ComponentsProps['MuiChartDataProvider'];
38
42
  };
@@ -9,7 +9,7 @@ import { type ScatterChartProps } from "../ScatterChart/ScatterChart.js";
9
9
  import { type PieChartProps } from "../PieChart/PieChart.js";
10
10
  import { type ChartsXAxisProps, type ChartsYAxisProps } from "../models/axis.js";
11
11
  import { type ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
12
- import { type ChartDataProviderProps } from "../ChartDataProvider/index.js";
12
+ import { type ChartsDataProviderProps } from "../ChartsDataProvider/index.js";
13
13
  export interface ChartsComponentsPropsList {
14
14
  MuiChartsXAxis: ChartsXAxisProps;
15
15
  MuiChartsYAxis: ChartsYAxisProps;
@@ -18,7 +18,9 @@ export interface ChartsComponentsPropsList {
18
18
  MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
19
19
  MuiChartsTooltip: ChartsTooltipProps;
20
20
  MuiChartsSurface: ChartsSurfaceProps;
21
- MuiChartDataProvider: ChartDataProviderProps;
21
+ MuiChartsDataProvider: ChartsDataProviderProps;
22
+ /** @deprecated Use `MuiChartsDataProvider` instead. */
23
+ MuiChartDataProvider: ChartsDataProviderProps;
22
24
  MuiBarChart: BarChartProps;
23
25
  MuiBarLabel: BarLabelProps;
24
26
  MuiLineChart: LineChartProps;