@mui/x-charts-premium 8.27.2 → 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/BarChartPremium/BarChartPremium.js +3 -3
- package/CHANGELOG.md +89 -0
- package/ChartContainerPremium/ChartContainerPremium.d.ts +17 -31
- package/ChartContainerPremium/ChartContainerPremium.js +15 -43
- package/ChartContainerPremium/useChartContainerPremiumProps.d.ts +10 -9
- package/ChartContainerPremium/useChartContainerPremiumProps.js +10 -27
- package/ChartDataProviderPremium/ChartDataProviderPremium.d.ts +18 -44
- package/ChartDataProviderPremium/ChartDataProviderPremium.js +21 -143
- package/ChartDataProviderPremium/useChartDataProviderPremiumProps.d.ts +7 -7
- package/ChartDataProviderPremium/useChartDataProviderPremiumProps.js +5 -18
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainerPremium/ChartsContainerPremium.d.ts +37 -0
- package/ChartsContainerPremium/ChartsContainerPremium.js +52 -0
- package/ChartsContainerPremium/index.d.ts +2 -0
- package/ChartsContainerPremium/index.js +17 -0
- package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +9 -0
- package/ChartsContainerPremium/useChartsContainerPremiumProps.js +33 -0
- package/ChartsContainerPro/index.d.ts +1 -0
- package/ChartsContainerPro/index.js +16 -0
- package/ChartsDataProvider/index.d.ts +1 -0
- package/ChartsDataProvider/index.js +16 -0
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.ts +49 -0
- package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +153 -0
- package/ChartsDataProviderPremium/index.d.ts +2 -0
- package/ChartsDataProviderPremium/index.js +13 -0
- package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.ts +10 -0
- package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.js +25 -0
- package/ChartsDataProviderPro/index.d.ts +1 -0
- package/ChartsDataProviderPro/index.js +16 -0
- package/ChartsZoomSlider/index.d.ts +1 -0
- package/ChartsZoomSlider/index.js +16 -0
- package/context/useChartPremiumApiContext.d.ts +1 -1
- package/context/useChartPremiumApiContext.js +1 -1
- package/esm/BarChartPremium/BarChartPremium.js +3 -3
- package/esm/ChartContainerPremium/ChartContainerPremium.d.ts +17 -31
- package/esm/ChartContainerPremium/ChartContainerPremium.js +16 -42
- package/esm/ChartContainerPremium/useChartContainerPremiumProps.d.ts +10 -9
- package/esm/ChartContainerPremium/useChartContainerPremiumProps.js +10 -25
- package/esm/ChartDataProviderPremium/ChartDataProviderPremium.d.ts +18 -44
- package/esm/ChartDataProviderPremium/ChartDataProviderPremium.js +17 -143
- package/esm/ChartDataProviderPremium/useChartDataProviderPremiumProps.d.ts +7 -7
- package/esm/ChartDataProviderPremium/useChartDataProviderPremiumProps.js +6 -17
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +2 -0
- package/esm/ChartsContainerPremium/ChartsContainerPremium.d.ts +37 -0
- package/esm/ChartsContainerPremium/ChartsContainerPremium.js +46 -0
- package/esm/ChartsContainerPremium/index.d.ts +2 -0
- package/esm/ChartsContainerPremium/index.js +2 -0
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +9 -0
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.js +27 -0
- package/esm/ChartsContainerPro/index.d.ts +1 -0
- package/esm/ChartsContainerPro/index.js +2 -0
- package/esm/ChartsDataProvider/index.d.ts +1 -0
- package/esm/ChartsDataProvider/index.js +2 -0
- package/esm/ChartsDataProviderPremium/ChartsDataProviderPremium.d.ts +49 -0
- package/esm/ChartsDataProviderPremium/ChartsDataProviderPremium.js +148 -0
- package/esm/ChartsDataProviderPremium/index.d.ts +2 -0
- package/esm/ChartsDataProviderPremium/index.js +2 -0
- package/esm/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.ts +10 -0
- package/esm/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.js +19 -0
- package/esm/ChartsDataProviderPro/index.d.ts +1 -0
- package/esm/ChartsDataProviderPro/index.js +2 -0
- package/esm/ChartsZoomSlider/index.d.ts +1 -0
- package/esm/ChartsZoomSlider/index.js +2 -0
- package/esm/context/useChartPremiumApiContext.d.ts +1 -1
- package/esm/context/useChartPremiumApiContext.js +1 -1
- package/esm/index.d.ts +7 -0
- package/esm/index.js +7 -1
- package/index.d.ts +7 -0
- package/index.js +69 -1
- package/package.json +5 -5
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/RangeBarPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/RangeBarPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/RangeBarPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/RangeBarPreviewPlot.js +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import { type ChartDataProviderPremiumProps } from "../ChartDataProviderPremium/index.js";
|
|
6
|
+
export interface ChartsContainerPremiumSlots {}
|
|
7
|
+
export interface ChartsContainerPremiumSlotProps {}
|
|
8
|
+
export type ChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartDataProviderPremiumProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
9
|
+
type ChartsContainerPremiumComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures> & {
|
|
10
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
14
|
+
*
|
|
15
|
+
* This is a combination of both the `ChartsDataProviderPremium` and `ChartsSurface` components.
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [ChartsContainerPremium API](https://mui.com/x/api/charts/charts-container-premium/)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <ChartsContainerPremium
|
|
28
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
29
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
30
|
+
* >
|
|
31
|
+
* <BarPlot />
|
|
32
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
33
|
+
* </ChartsContainerPremium>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const ChartsContainerPremium: ChartsContainerPremiumComponent;
|
|
37
|
+
export { ChartsContainerPremium };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.ChartsContainerPremium = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
|
|
13
|
+
var _ChartDataProviderPremium = require("../ChartDataProviderPremium");
|
|
14
|
+
var _useChartsContainerPremiumProps = require("./useChartsContainerPremiumProps");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
/**
|
|
17
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
18
|
+
*
|
|
19
|
+
* This is a combination of both the `ChartsDataProviderPremium` and `ChartsSurface` components.
|
|
20
|
+
*
|
|
21
|
+
* Demos:
|
|
22
|
+
*
|
|
23
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
24
|
+
*
|
|
25
|
+
* API:
|
|
26
|
+
*
|
|
27
|
+
* - [ChartsContainerPremium API](https://mui.com/x/api/charts/charts-container-premium/)
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <ChartsContainerPremium
|
|
32
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
33
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
34
|
+
* >
|
|
35
|
+
* <BarPlot />
|
|
36
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
37
|
+
* </ChartsContainerPremium>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
const ChartsContainerPremium = exports.ChartsContainerPremium = /*#__PURE__*/React.forwardRef(function ChartsContainerPremium(props, ref) {
|
|
41
|
+
const {
|
|
42
|
+
chartDataProviderPremiumProps,
|
|
43
|
+
children,
|
|
44
|
+
chartsSurfaceProps
|
|
45
|
+
} = (0, _useChartsContainerPremiumProps.useChartsContainerPremiumProps)(props, ref);
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPremium.ChartDataProviderPremium, (0, _extends2.default)({}, chartDataProviderPremiumProps, {
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
48
|
+
children: children
|
|
49
|
+
}))
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
52
|
+
if (process.env.NODE_ENV !== "production") ChartsContainerPremium.displayName = "ChartsContainerPremium";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
require("../typeOverloads");
|
|
7
|
+
var _ChartsContainerPremium = require("./ChartsContainerPremium");
|
|
8
|
+
Object.keys(_ChartsContainerPremium).forEach(function (key) {
|
|
9
|
+
if (key === "default" || key === "__esModule") return;
|
|
10
|
+
if (key in exports && exports[key] === _ChartsContainerPremium[key]) return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return _ChartsContainerPremium[key];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
3
|
+
import { type ChartDataProviderProps } from '@mui/x-charts/ChartDataProvider';
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
import type { ChartsContainerPremiumProps } from "./ChartsContainerPremium.js";
|
|
6
|
+
export type UseChartsContainerPremiumPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
|
+
chartDataProviderPremiumProps: ChartDataProviderProps<TSeries, TSignatures>;
|
|
8
|
+
};
|
|
9
|
+
export declare function useChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>): UseChartsContainerPremiumPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useChartsContainerPremiumProps = useChartsContainerPremiumProps;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
+
var _internals = require("@mui/x-charts-pro/internals");
|
|
12
|
+
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
13
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
14
|
+
function useChartsContainerPremiumProps(props, ref) {
|
|
15
|
+
const _ref = props,
|
|
16
|
+
{
|
|
17
|
+
plugins
|
|
18
|
+
} = _ref,
|
|
19
|
+
baseProps = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
20
|
+
const {
|
|
21
|
+
chartDataProviderProProps,
|
|
22
|
+
chartsSurfaceProps,
|
|
23
|
+
children
|
|
24
|
+
} = (0, _internals.useChartsContainerProProps)(baseProps, ref);
|
|
25
|
+
const chartDataProviderPremiumProps = (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
26
|
+
plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
chartDataProviderPremiumProps,
|
|
30
|
+
chartsSurfaceProps,
|
|
31
|
+
children
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts-pro/ChartsContainerPro';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChartsContainerPro = require("@mui/x-charts-pro/ChartsContainerPro");
|
|
7
|
+
Object.keys(_ChartsContainerPro).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChartsContainerPro[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ChartsContainerPro[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/ChartsDataProvider';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChartsDataProvider = require("@mui/x-charts/ChartsDataProvider");
|
|
7
|
+
Object.keys(_ChartsDataProvider).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChartsDataProvider[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ChartsDataProvider[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartsProviderProps, type ChartSeriesConfig } from '@mui/x-charts/internals';
|
|
2
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from '@mui/x-charts-pro/internals';
|
|
3
|
+
import { type ChartsDataProviderProProps } from '@mui/x-charts-pro/ChartsDataProviderPro';
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
export interface ChartsDataProviderPremiumSlots extends ChartsSlotsPro {}
|
|
6
|
+
export interface ChartsDataProviderPremiumSlotProps extends ChartsSlotPropsPro {}
|
|
7
|
+
export type ChartsDataProviderPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsDataProviderProProps<TSeries, TSignatures> & ChartsProviderProps<TSeries, TSignatures>['pluginParams'] & {
|
|
8
|
+
/**
|
|
9
|
+
* Slots to customize charts' components.
|
|
10
|
+
*/
|
|
11
|
+
slots?: Partial<ChartsDataProviderPremiumSlots>;
|
|
12
|
+
/**
|
|
13
|
+
* The props for the slots.
|
|
14
|
+
*/
|
|
15
|
+
slotProps?: Partial<ChartsDataProviderPremiumSlotProps>;
|
|
16
|
+
};
|
|
17
|
+
export declare const defaultSeriesConfigPremium: ChartSeriesConfig<'bar' | 'rangeBar' | 'scatter' | 'line' | 'pie'>;
|
|
18
|
+
/**
|
|
19
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
20
|
+
*
|
|
21
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
22
|
+
*
|
|
23
|
+
* Demos:
|
|
24
|
+
*
|
|
25
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [ChartsDataProviderPremium API](https://mui.com/x/api/charts/charts-data-provider-premium/)
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```jsx
|
|
33
|
+
* <ChartsDataProviderPremium
|
|
34
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
35
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
36
|
+
* >
|
|
37
|
+
* <ChartsSurface>
|
|
38
|
+
* <BarPlot />
|
|
39
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
40
|
+
* </ChartsSurface>
|
|
41
|
+
* {'Custom Legend Component'}
|
|
42
|
+
* </ChartsDataProviderPremium>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function ChartsDataProviderPremium<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsDataProviderPremiumProps<TSeries, TSignatures>): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare namespace ChartsDataProviderPremium {
|
|
47
|
+
var propTypes: any;
|
|
48
|
+
}
|
|
49
|
+
export { ChartsDataProviderPremium };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ChartsDataProviderPremium = ChartsDataProviderPremium;
|
|
9
|
+
exports.defaultSeriesConfigPremium = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _Watermark = require("@mui/x-license/Watermark");
|
|
13
|
+
var _internals = require("@mui/x-charts/internals");
|
|
14
|
+
var _ChartsLocalizationProvider = require("@mui/x-charts/ChartsLocalizationProvider");
|
|
15
|
+
var _internals2 = require("@mui/x-charts-pro/internals");
|
|
16
|
+
var _useLicenseVerifier = require("@mui/x-license/useLicenseVerifier");
|
|
17
|
+
var _seriesConfig = require("../BarChartPremium/RangeBar/seriesConfig");
|
|
18
|
+
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
19
|
+
var _useChartsDataProviderPremiumProps = require("./useChartsDataProviderPremiumProps");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
|
|
22
|
+
const packageIdentifier = 'x-charts-premium';
|
|
23
|
+
const defaultSeriesConfigPremium = exports.defaultSeriesConfigPremium = (0, _extends2.default)({}, _internals2.defaultSeriesConfigPro, {
|
|
24
|
+
rangeBar: _seriesConfig.rangeBarSeriesConfig
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
29
|
+
*
|
|
30
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
31
|
+
*
|
|
32
|
+
* Demos:
|
|
33
|
+
*
|
|
34
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
35
|
+
*
|
|
36
|
+
* API:
|
|
37
|
+
*
|
|
38
|
+
* - [ChartsDataProviderPremium API](https://mui.com/x/api/charts/charts-data-provider-premium/)
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```jsx
|
|
42
|
+
* <ChartsDataProviderPremium
|
|
43
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
44
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
45
|
+
* >
|
|
46
|
+
* <ChartsSurface>
|
|
47
|
+
* <BarPlot />
|
|
48
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
49
|
+
* </ChartsSurface>
|
|
50
|
+
* {'Custom Legend Component'}
|
|
51
|
+
* </ChartsDataProviderPremium>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
function ChartsDataProviderPremium(props) {
|
|
55
|
+
const {
|
|
56
|
+
children,
|
|
57
|
+
localeText,
|
|
58
|
+
chartProviderProps,
|
|
59
|
+
slots,
|
|
60
|
+
slotProps
|
|
61
|
+
} = (0, _useChartsDataProviderPremiumProps.useChartsDataProviderPremiumProps)((0, _extends2.default)({}, props, {
|
|
62
|
+
seriesConfig: props.seriesConfig ?? defaultSeriesConfigPremium,
|
|
63
|
+
plugins: props.plugins ?? _allPlugins.DEFAULT_PLUGINS
|
|
64
|
+
}));
|
|
65
|
+
(0, _useLicenseVerifier.useLicenseVerifier)(packageIdentifier, releaseInfo);
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsProvider, (0, _extends2.default)({}, chartProviderProps, {
|
|
67
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLocalizationProvider.ChartsLocalizationProvider, {
|
|
68
|
+
localeText: localeText,
|
|
69
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.ChartsSlotsProvider, {
|
|
70
|
+
slots: slots,
|
|
71
|
+
slotProps: slotProps,
|
|
72
|
+
defaultSlots: _internals2.defaultSlotsMaterial,
|
|
73
|
+
children: children
|
|
74
|
+
})
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Watermark.Watermark, {
|
|
76
|
+
packageName: packageIdentifier,
|
|
77
|
+
releaseInfo: releaseInfo
|
|
78
|
+
})]
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
process.env.NODE_ENV !== "production" ? ChartsDataProviderPremium.propTypes = {
|
|
82
|
+
// ----------------------------- Warning --------------------------------
|
|
83
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
84
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
85
|
+
// ----------------------------------------------------------------------
|
|
86
|
+
apiRef: _propTypes.default.shape({
|
|
87
|
+
current: _propTypes.default.any
|
|
88
|
+
}),
|
|
89
|
+
/**
|
|
90
|
+
* Color palette used to colorize multiple series.
|
|
91
|
+
* @default rainbowSurgePalette
|
|
92
|
+
*/
|
|
93
|
+
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
94
|
+
/**
|
|
95
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
96
|
+
*/
|
|
97
|
+
dataset: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
98
|
+
/**
|
|
99
|
+
* Options to enable features planned for the next major.
|
|
100
|
+
*/
|
|
101
|
+
experimentalFeatures: _propTypes.default.shape({
|
|
102
|
+
preferStrictDomainInLineCharts: _propTypes.default.bool
|
|
103
|
+
}),
|
|
104
|
+
/**
|
|
105
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
106
|
+
*/
|
|
107
|
+
height: _propTypes.default.number,
|
|
108
|
+
/**
|
|
109
|
+
* This prop is used to help implement the accessibility logic.
|
|
110
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
111
|
+
*/
|
|
112
|
+
id: _propTypes.default.string,
|
|
113
|
+
/**
|
|
114
|
+
* Localized text for chart components.
|
|
115
|
+
*/
|
|
116
|
+
localeText: _propTypes.default.object,
|
|
117
|
+
/**
|
|
118
|
+
* The margin between the SVG and the drawing area.
|
|
119
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
120
|
+
*
|
|
121
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
122
|
+
*/
|
|
123
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
124
|
+
bottom: _propTypes.default.number,
|
|
125
|
+
left: _propTypes.default.number,
|
|
126
|
+
right: _propTypes.default.number,
|
|
127
|
+
top: _propTypes.default.number
|
|
128
|
+
})]),
|
|
129
|
+
/**
|
|
130
|
+
* The array of series to display.
|
|
131
|
+
* Each type of series has its own specificity.
|
|
132
|
+
* Please refer to the appropriate docs page to learn more about it.
|
|
133
|
+
*/
|
|
134
|
+
series: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
135
|
+
/**
|
|
136
|
+
* If `true`, animations are skipped.
|
|
137
|
+
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
138
|
+
*/
|
|
139
|
+
skipAnimation: _propTypes.default.bool,
|
|
140
|
+
/**
|
|
141
|
+
* The props for the slots.
|
|
142
|
+
*/
|
|
143
|
+
slotProps: _propTypes.default.object,
|
|
144
|
+
/**
|
|
145
|
+
* Slots to customize charts' components.
|
|
146
|
+
*/
|
|
147
|
+
slots: _propTypes.default.object,
|
|
148
|
+
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
149
|
+
/**
|
|
150
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
151
|
+
*/
|
|
152
|
+
width: _propTypes.default.number
|
|
153
|
+
} : void 0;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ChartsDataProviderPremium", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ChartsDataProviderPremium.ChartsDataProviderPremium;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
require("../typeOverloads");
|
|
13
|
+
var _ChartsDataProviderPremium = require("./ChartsDataProviderPremium");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import type { ChartsDataProviderPremiumProps } from "./ChartsDataProviderPremium.js";
|
|
3
|
+
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
|
+
export declare const useChartsDataProviderPremiumProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsDataProviderPremiumProps<TSeries, TSignatures>) => {
|
|
5
|
+
children: import("react").ReactNode;
|
|
6
|
+
localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
|
|
7
|
+
chartProviderProps: import("@mui/x-charts/internals").ChartsProviderProps<TSeries, TSignatures>;
|
|
8
|
+
slots: Partial<import("@mui/x-charts").ChartsDataProviderSlots> | undefined;
|
|
9
|
+
slotProps: Partial<import("@mui/x-charts").ChartsDataProviderSlotProps> | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useChartsDataProviderPremiumProps = void 0;
|
|
8
|
+
var _internals = require("@mui/x-charts/internals");
|
|
9
|
+
const useChartsDataProviderPremiumProps = props => {
|
|
10
|
+
const {
|
|
11
|
+
chartProviderProps,
|
|
12
|
+
localeText,
|
|
13
|
+
slots,
|
|
14
|
+
slotProps,
|
|
15
|
+
children
|
|
16
|
+
} = (0, _internals.useChartsDataProviderProps)(props);
|
|
17
|
+
return {
|
|
18
|
+
children,
|
|
19
|
+
localeText,
|
|
20
|
+
chartProviderProps,
|
|
21
|
+
slots,
|
|
22
|
+
slotProps
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
exports.useChartsDataProviderPremiumProps = useChartsDataProviderPremiumProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts-pro/ChartsDataProviderPro';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChartsDataProviderPro = require("@mui/x-charts-pro/ChartsDataProviderPro");
|
|
7
|
+
Object.keys(_ChartsDataProviderPro).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChartsDataProviderPro[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ChartsDataProviderPro[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts-pro/ChartsZoomSlider';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChartsZoomSlider = require("@mui/x-charts-pro/ChartsZoomSlider");
|
|
7
|
+
Object.keys(_ChartsZoomSlider).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChartsZoomSlider[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ChartsZoomSlider[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ChartPremiumApi } from "./ChartPremiumApi.js";
|
|
2
2
|
/**
|
|
3
3
|
* The `useChartPremiumApiContext` hook provides access to the chart API.
|
|
4
|
-
* This is only available when the chart is rendered within a chart or a `
|
|
4
|
+
* This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
|
|
5
5
|
* If you want to access the chart API outside those components, you should use the `apiRef` prop instead.
|
|
6
6
|
* @example
|
|
7
7
|
* const apiRef = useChartPremiumApiContext<ChartPremiumApi<'bar'>>();
|
|
@@ -7,7 +7,7 @@ exports.useChartPremiumApiContext = useChartPremiumApiContext;
|
|
|
7
7
|
var _context = require("@mui/x-charts/context");
|
|
8
8
|
/**
|
|
9
9
|
* The `useChartPremiumApiContext` hook provides access to the chart API.
|
|
10
|
-
* This is only available when the chart is rendered within a chart or a `
|
|
10
|
+
* This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
|
|
11
11
|
* If you want to access the chart API outside those components, you should use the `apiRef` prop instead.
|
|
12
12
|
* @example
|
|
13
13
|
* const apiRef = useChartPremiumApiContext<ChartPremiumApi<'bar'>>();
|
|
@@ -16,7 +16,7 @@ import { BarPlot } from '@mui/x-charts/BarChart';
|
|
|
16
16
|
import { ChartsOverlay } from '@mui/x-charts/ChartsOverlay';
|
|
17
17
|
import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
|
|
18
18
|
import { ChartsAxis } from '@mui/x-charts/ChartsAxis';
|
|
19
|
-
import {
|
|
19
|
+
import { ChartsZoomSlider } from '@mui/x-charts-pro/ChartsZoomSlider';
|
|
20
20
|
import { ChartsBrushOverlay } from '@mui/x-charts/ChartsBrushOverlay';
|
|
21
21
|
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
|
|
22
22
|
import { seriesPreviewPlotMap, useChartContainerProProps } from '@mui/x-charts-pro/internals';
|
|
@@ -24,7 +24,7 @@ import { useBarChartPremiumProps } from "./useBarChartPremiumProps.js";
|
|
|
24
24
|
import { BAR_CHART_PREMIUM_PLUGINS } from "./BarChartPremium.plugins.js";
|
|
25
25
|
import { ChartDataProviderPremium } from "../ChartDataProviderPremium/index.js";
|
|
26
26
|
import { RangeBarPlot } from "./RangeBar/RangeBarPlot.js";
|
|
27
|
-
import { RangeBarPreviewPlot } from "../
|
|
27
|
+
import { RangeBarPreviewPlot } from "../ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.js";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
seriesPreviewPlotMap.set('rangeBar', RangeBarPreviewPlot);
|
|
30
30
|
/**
|
|
@@ -82,7 +82,7 @@ const BarChartPremium = /*#__PURE__*/React.forwardRef(function BarChartPremium(i
|
|
|
82
82
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
83
83
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
84
84
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(RangeBarPlot, _extends({}, rangeBarPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps))]
|
|
85
|
-
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(
|
|
85
|
+
})), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsZoomSlider, {}), /*#__PURE__*/_jsx(ChartsBrushOverlay, {}), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), children]
|
|
86
86
|
})), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip))]
|
|
87
87
|
}))
|
|
88
88
|
}));
|
|
@@ -1,35 +1,21 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type ChartsSurfaceProps } from '@mui/x-charts/ChartsSurface';
|
|
3
1
|
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
4
2
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
-
import { type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { type ChartsContainerPremiumProps, type ChartsContainerPremiumSlotProps, type ChartsContainerPremiumSlots } from "../ChartsContainerPremium/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `ChartsContainerPremiumSlots` instead. We added S to the charts prefix to align with other components.
|
|
6
|
+
*/
|
|
7
|
+
export type ChartContainerPremiumSlots = ChartsContainerPremiumSlots;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `ChartsContainerPremiumSlotProps` instead. We added S to the charts prefix to align with other components.
|
|
10
|
+
*/
|
|
11
|
+
export type ChartContainerPremiumSlotProps = ChartsContainerPremiumSlotProps;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `ChartsContainerPremiumProps` instead. We added S to the charts prefix to align with other components.
|
|
14
|
+
*/
|
|
15
|
+
export type ChartContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsContainerPremiumProps<TSeries, TSignatures>;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* This is a combination of both the `ChartDataProviderPremium` and `ChartsSurface` components.
|
|
14
|
-
*
|
|
15
|
-
* Demos:
|
|
16
|
-
*
|
|
17
|
-
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
-
*
|
|
19
|
-
* API:
|
|
20
|
-
*
|
|
21
|
-
* - [ChartContainer API](https://mui.com/x/api/charts/chart-container/)
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```jsx
|
|
25
|
-
* <ChartContainerPremium
|
|
26
|
-
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
27
|
-
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
28
|
-
* >
|
|
29
|
-
* <BarPlot />
|
|
30
|
-
* <ChartsXAxis axisId="x-axis" />
|
|
31
|
-
* </ChartContainerPremium>
|
|
32
|
-
* ```
|
|
17
|
+
* @deprecated Use `ChartsContainerPremium` instead. We added S to the charts prefix to align with other components.
|
|
33
18
|
*/
|
|
34
|
-
declare const ChartContainerPremium:
|
|
35
|
-
|
|
19
|
+
export declare const ChartContainerPremium: <TSeries extends ChartSeriesType = keyof import("@mui/x-charts/internals").ChartsSeriesConfig, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures> & {
|
|
20
|
+
ref?: React.ForwardedRef<SVGSVGElement>;
|
|
21
|
+
}) => React.JSX.Element;
|