@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.
- package/CHANGELOG.md +214 -0
- package/ChartContainer/ChartContainer.d.ts +16 -29
- package/ChartContainer/ChartContainer.js +14 -1691
- package/ChartContainer/useChartContainerProps.d.ts +9 -10
- package/ChartContainer/useChartContainerProps.js +9 -94
- package/ChartDataProvider/ChartDataProvider.d.ts +15 -44
- package/ChartDataProvider/ChartDataProvider.js +16 -130
- package/ChartDataProvider/useChartDataProviderProps.d.ts +7 -10
- package/ChartDataProvider/useChartDataProviderProps.js +5 -38
- package/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/ChartsContainer/ChartsContainer.js +1702 -0
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainer/useChartsContainerProps.d.ts +15 -0
- package/ChartsContainer/useChartsContainerProps.js +104 -0
- package/ChartsDataProvider/ChartsDataProvider.d.ts +51 -0
- package/ChartsDataProvider/ChartsDataProvider.js +138 -0
- package/ChartsDataProvider/index.d.ts +1 -0
- package/ChartsDataProvider/index.js +16 -0
- package/ChartsDataProvider/useChartsDataProviderProps.d.ts +13 -0
- package/ChartsDataProvider/useChartsDataProviderProps.js +45 -0
- package/context/ChartProvider/ChartContext.d.ts +2 -3
- package/context/ChartProvider/ChartContext.js +3 -4
- package/context/ChartProvider/ChartProvider.d.ts +5 -8
- package/context/ChartProvider/ChartProvider.js +6 -41
- package/context/ChartProvider/ChartProvider.types.d.ts +14 -41
- package/context/ChartProvider/useChartContext.d.ts +4 -3
- package/context/ChartProvider/useChartContext.js +5 -11
- package/context/ChartsProvider/ChartsContext.d.ts +6 -0
- package/context/ChartsProvider/ChartsContext.js +14 -0
- package/context/ChartsProvider/ChartsProvider.d.ts +8 -0
- package/context/ChartsProvider/ChartsProvider.js +47 -0
- package/context/ChartsProvider/ChartsProvider.types.d.ts +40 -0
- package/context/ChartsProvider/ChartsProvider.types.js +5 -0
- package/context/ChartsProvider/index.d.ts +3 -0
- package/context/ChartsProvider/index.js +38 -0
- package/context/ChartsProvider/useChartsContext.d.ts +3 -0
- package/context/ChartsProvider/useChartsContext.js +18 -0
- package/context/ChartsSlotsContext.d.ts +1 -1
- package/context/ChartsSlotsContext.js +1 -1
- package/esm/ChartContainer/ChartContainer.d.ts +16 -29
- package/esm/ChartContainer/ChartContainer.js +15 -1690
- package/esm/ChartContainer/useChartContainerProps.d.ts +9 -10
- package/esm/ChartContainer/useChartContainerProps.js +10 -93
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +15 -44
- package/esm/ChartDataProvider/ChartDataProvider.js +16 -128
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +7 -10
- package/esm/ChartDataProvider/useChartDataProviderProps.js +6 -36
- package/esm/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/esm/ChartsContainer/ChartsContainer.js +1696 -0
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +1 -0
- package/esm/ChartsContainer/useChartsContainerProps.d.ts +15 -0
- package/esm/ChartsContainer/useChartsContainerProps.js +97 -0
- package/esm/ChartsDataProvider/ChartsDataProvider.d.ts +51 -0
- package/esm/ChartsDataProvider/ChartsDataProvider.js +132 -0
- package/esm/ChartsDataProvider/index.d.ts +1 -0
- package/esm/ChartsDataProvider/index.js +1 -0
- package/esm/ChartsDataProvider/useChartsDataProviderProps.d.ts +13 -0
- package/esm/ChartsDataProvider/useChartsDataProviderProps.js +38 -0
- package/esm/context/ChartProvider/ChartContext.d.ts +2 -3
- package/esm/context/ChartProvider/ChartContext.js +4 -3
- package/esm/context/ChartProvider/ChartProvider.d.ts +5 -8
- package/esm/context/ChartProvider/ChartProvider.js +5 -38
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +14 -41
- package/esm/context/ChartProvider/useChartContext.d.ts +4 -3
- package/esm/context/ChartProvider/useChartContext.js +6 -9
- package/esm/context/ChartsProvider/ChartsContext.d.ts +6 -0
- package/esm/context/ChartsProvider/ChartsContext.js +8 -0
- package/esm/context/ChartsProvider/ChartsProvider.d.ts +8 -0
- package/esm/context/ChartsProvider/ChartsProvider.js +41 -0
- package/esm/context/ChartsProvider/ChartsProvider.types.d.ts +40 -0
- package/esm/context/ChartsProvider/ChartsProvider.types.js +1 -0
- package/esm/context/ChartsProvider/index.d.ts +3 -0
- package/esm/context/ChartsProvider/index.js +3 -0
- package/esm/context/ChartsProvider/useChartsContext.d.ts +3 -0
- package/esm/context/ChartsProvider/useChartsContext.js +11 -0
- package/esm/context/ChartsSlotsContext.d.ts +1 -1
- package/esm/context/ChartsSlotsContext.js +1 -1
- package/esm/index.d.ts +4 -1
- package/esm/index.js +3 -1
- package/esm/internals/index.d.ts +3 -0
- package/esm/internals/index.js +3 -0
- package/esm/internals/store/useStore.js +1 -1
- package/esm/themeAugmentation/components.d.ts +4 -0
- package/esm/themeAugmentation/props.d.ts +4 -2
- package/index.d.ts +4 -1
- package/index.js +21 -1
- package/internals/index.d.ts +3 -0
- package/internals/index.js +36 -0
- package/internals/store/useStore.js +1 -1
- package/package.json +3 -3
- package/themeAugmentation/components.d.ts +4 -0
- package/themeAugmentation/props.d.ts +4 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 `
|
|
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 `
|
|
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.
|
|
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";
|
package/esm/internals/index.d.ts
CHANGED
|
@@ -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";
|
package/esm/internals/index.js
CHANGED
|
@@ -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(
|
|
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
|
|
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
|
-
|
|
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.
|
|
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;
|
package/internals/index.d.ts
CHANGED
|
@@ -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";
|
package/internals/index.js
CHANGED
|
@@ -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(
|
|
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.
|
|
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
|
|
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
|
-
|
|
21
|
+
MuiChartsDataProvider: ChartsDataProviderProps;
|
|
22
|
+
/** @deprecated Use `MuiChartsDataProvider` instead. */
|
|
23
|
+
MuiChartDataProvider: ChartsDataProviderProps;
|
|
22
24
|
MuiBarChart: BarChartProps;
|
|
23
25
|
MuiBarLabel: BarLabelProps;
|
|
24
26
|
MuiLineChart: LineChartProps;
|