@mui/x-charts-pro 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/BarChartPro/BarChartPro.js +2 -2
- package/CHANGELOG.md +214 -0
- package/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/ChartContainerPro/ChartContainerPro.js +14 -287
- package/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
- package/ChartContainerPro/useChartContainerProProps.js +9 -34
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +18 -44
- package/ChartDataProviderPro/ChartDataProviderPro.js +22 -141
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
- package/ChartDataProviderPro/useChartDataProviderProProps.js +5 -18
- package/ChartZoomSlider/index.d.ts +29 -3
- package/ChartZoomSlider/index.js +33 -30
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/ChartsContainerPro/ChartsContainerPro.js +188 -0
- package/ChartsContainerPro/index.d.ts +9 -0
- package/ChartsContainerPro/index.js +17 -0
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
- package/ChartsContainerPro/useChartsContainerProProps.js +44 -0
- package/ChartsDataProvider/index.d.ts +1 -0
- package/ChartsDataProvider/index.js +16 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +49 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +150 -0
- package/ChartsDataProviderPro/index.d.ts +2 -0
- package/ChartsDataProviderPro/index.js +13 -0
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +10 -0
- package/ChartsDataProviderPro/useChartsDataProviderProProps.js +25 -0
- package/ChartsZoomSlider/ChartsZoomSlider.d.ts +4 -0
- package/{ChartZoomSlider/ChartZoomSlider.js → ChartsZoomSlider/ChartsZoomSlider.js} +5 -5
- package/ChartsZoomSlider/index.d.ts +3 -0
- package/ChartsZoomSlider/index.js +26 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSlider.js → ChartsZoomSlider/internals/ChartsAxisZoomSlider.js} +8 -8
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js} +7 -7
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.js} +4 -4
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +9 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.js} +2 -2
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.d.ts +12 -0
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.js} +8 -8
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts} +3 -3
- package/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js} +4 -4
- package/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.d.ts} +5 -5
- package/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.js} +2 -2
- package/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +15 -0
- package/{ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.js} +2 -2
- package/LineChartPro/LineChartPro.js +2 -2
- package/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/BarChartPro/BarChartPro.js +2 -2
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +17 -31
- package/esm/ChartContainerPro/ChartContainerPro.js +15 -286
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +9 -5
- package/esm/ChartContainerPro/useChartContainerProProps.js +10 -33
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +18 -44
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +17 -139
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +7 -7
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +6 -17
- package/esm/ChartZoomSlider/index.d.ts +29 -3
- package/esm/ChartZoomSlider/index.js +34 -3
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +2 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.d.ts +37 -0
- package/esm/ChartsContainerPro/ChartsContainerPro.js +182 -0
- package/esm/ChartsContainerPro/index.d.ts +9 -0
- package/esm/ChartsContainerPro/index.js +6 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.d.ts +9 -0
- package/esm/ChartsContainerPro/useChartsContainerProProps.js +37 -0
- package/esm/ChartsDataProvider/index.d.ts +1 -0
- package/esm/ChartsDataProvider/index.js +2 -0
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +49 -0
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.js +144 -0
- package/esm/ChartsDataProviderPro/index.d.ts +2 -0
- package/esm/ChartsDataProviderPro/index.js +2 -0
- package/esm/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +10 -0
- package/esm/ChartsDataProviderPro/useChartsDataProviderProProps.js +19 -0
- package/esm/ChartsZoomSlider/ChartsZoomSlider.d.ts +4 -0
- package/esm/{ChartZoomSlider/ChartZoomSlider.js → ChartsZoomSlider/ChartsZoomSlider.js} +4 -4
- package/esm/ChartsZoomSlider/index.d.ts +3 -0
- package/esm/ChartsZoomSlider/index.js +3 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSlider.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSlider.js → ChartsZoomSlider/internals/ChartsAxisZoomSlider.js} +7 -7
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js} +5 -5
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreview.js} +3 -3
- package/esm/ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.d.ts +9 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderPreviewContent.js} +1 -1
- package/esm/ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.d.ts +12 -0
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderThumb.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderThumb.js} +6 -6
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.d.ts} +3 -3
- package/esm/{ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js → ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js} +2 -2
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.d.ts → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.d.ts} +5 -5
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderThumbClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.js} +1 -1
- package/esm/ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.d.ts +15 -0
- package/esm/{ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.js → ChartsZoomSlider/internals/chartsAxisZoomSliderTrackClasses.js} +1 -1
- package/esm/LineChartPro/LineChartPro.js +2 -2
- package/esm/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/index.d.ts +6 -1
- package/esm/index.js +5 -1
- package/esm/internals/index.d.ts +5 -3
- package/esm/internals/index.js +3 -2
- package/esm/internals/plugins/useChartProExport/exportImage.js +8 -0
- package/index.d.ts +6 -1
- package/index.js +45 -1
- package/internals/index.d.ts +5 -3
- package/internals/index.js +10 -3
- package/internals/plugins/useChartProExport/exportImage.js +8 -0
- package/package.json +3 -3
- package/ChartZoomSlider/ChartZoomSlider.d.ts +0 -4
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +0 -9
- package/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +0 -12
- package/ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.d.ts +0 -15
- package/esm/ChartZoomSlider/ChartZoomSlider.d.ts +0 -4
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +0 -9
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderThumb.d.ts +0 -12
- package/esm/ChartZoomSlider/internals/chartAxisZoomSliderTrackClasses.d.ts +0 -15
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.js +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.d.ts +0 -0
- /package/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/ChartsTooltipZoomSliderValue.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/constants.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/AreaPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/BarPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LineAreaPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/LinePreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/PreviewPlot.types.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/previews/ScatterPreviewPlot.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/seriesPreviewPlotMap.js +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.d.ts +0 -0
- /package/esm/{ChartZoomSlider → ChartsZoomSlider}/internals/zoom-utils.js +0 -0
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ChartsZoomSlider, type ChartsAxisZoomSliderThumbClasses, type ChartsAxisZoomSliderThumbClassKey, type ChartsAxisZoomSliderTrackClasses, type ChartsAxisZoomSliderTrackClassKey } from "../ChartsZoomSlider/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `ChartsZoomSlider` instead. We added S to the charts prefix to align with other components.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ChartZoomSlider: typeof ChartsZoomSlider;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `ChartsAxisZoomSliderThumbClasses` instead. We added S to the charts prefix to align with other components.
|
|
8
|
+
*/
|
|
9
|
+
export type ChartAxisZoomSliderThumbClasses = ChartsAxisZoomSliderThumbClasses;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `ChartsAxisZoomSliderThumbClassKey` instead. We added S to the charts prefix to align with other components.
|
|
12
|
+
*/
|
|
13
|
+
export type ChartAxisZoomSliderThumbClassKey = ChartsAxisZoomSliderThumbClassKey;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `ChartsAxisZoomSliderTrackClasses` instead. We added S to the charts prefix to align with other components.
|
|
16
|
+
*/
|
|
17
|
+
export type ChartAxisZoomSliderTrackClasses = ChartsAxisZoomSliderTrackClasses;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `ChartsAxisZoomSliderTrackClassKey` instead. We added S to the charts prefix to align with other components.
|
|
20
|
+
*/
|
|
21
|
+
export type ChartAxisZoomSliderTrackClassKey = ChartsAxisZoomSliderTrackClassKey;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `chartsAxisZoomSliderThumbClasses` instead. We added S to the charts prefix to align with other components.
|
|
24
|
+
*/
|
|
25
|
+
export declare const chartAxisZoomSliderThumbClasses: ChartsAxisZoomSliderThumbClasses;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `chartsAxisZoomSliderTrackClasses` instead. We added S to the charts prefix to align with other components.
|
|
28
|
+
*/
|
|
29
|
+
export declare const chartAxisZoomSliderTrackClasses: ChartsAxisZoomSliderTrackClasses;
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { ChartsZoomSlider, chartsAxisZoomSliderThumbClasses, chartsAxisZoomSliderTrackClasses } from "../ChartsZoomSlider/index.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `ChartsZoomSlider` instead. We added S to the charts prefix to align with other components.
|
|
7
|
+
*/
|
|
8
|
+
export const ChartZoomSlider = ChartsZoomSlider;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `ChartsAxisZoomSliderThumbClasses` instead. We added S to the charts prefix to align with other components.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `ChartsAxisZoomSliderThumbClassKey` instead. We added S to the charts prefix to align with other components.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `ChartsAxisZoomSliderTrackClasses` instead. We added S to the charts prefix to align with other components.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `ChartsAxisZoomSliderTrackClassKey` instead. We added S to the charts prefix to align with other components.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `chartsAxisZoomSliderThumbClasses` instead. We added S to the charts prefix to align with other components.
|
|
28
|
+
*/
|
|
29
|
+
export const chartAxisZoomSliderThumbClasses = chartsAxisZoomSliderThumbClasses;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use `chartsAxisZoomSliderTrackClasses` instead. We added S to the charts prefix to align with other components.
|
|
33
|
+
*/
|
|
34
|
+
export const chartAxisZoomSliderTrackClasses = chartsAxisZoomSliderTrackClasses;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/ChartsContainer';
|
|
@@ -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 ChartsDataProviderProProps } from "../ChartsDataProviderPro/index.js";
|
|
6
|
+
export interface ChartsContainerProSlots {}
|
|
7
|
+
export interface ChartsContainerProSlotProps {}
|
|
8
|
+
export type ChartsContainerProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsDataProviderProProps<TSeries, TSignatures> & ChartsSurfaceProps;
|
|
9
|
+
type ChartsContainerProComponent = <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerProProps<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 `ChartsDataProviderPro` and `ChartsSurface` components.
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [ChartsContainerPro API](https://mui.com/x/api/charts/charts-container-pro/)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <ChartsContainerPro
|
|
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
|
+
* </ChartsContainerPro>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const ChartsContainerPro: ChartsContainerProComponent;
|
|
37
|
+
export { ChartsContainerPro };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { ChartsSurface } from '@mui/x-charts/ChartsSurface';
|
|
7
|
+
import { useChartsContainerProProps } from "./useChartsContainerProProps.js";
|
|
8
|
+
import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* It sets up the data providers as well as the `<svg>` for the chart.
|
|
12
|
+
*
|
|
13
|
+
* This is a combination of both the `ChartsDataProviderPro` and `ChartsSurface` components.
|
|
14
|
+
*
|
|
15
|
+
* Demos:
|
|
16
|
+
*
|
|
17
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
18
|
+
*
|
|
19
|
+
* API:
|
|
20
|
+
*
|
|
21
|
+
* - [ChartsContainerPro API](https://mui.com/x/api/charts/charts-container-pro/)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* <ChartsContainerPro
|
|
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
|
+
* </ChartsContainerPro>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
const ChartsContainerPro = /*#__PURE__*/React.forwardRef(function ChartsContainerProInner(props, ref) {
|
|
35
|
+
const {
|
|
36
|
+
chartDataProviderProProps,
|
|
37
|
+
children,
|
|
38
|
+
chartsSurfaceProps
|
|
39
|
+
} = useChartsContainerProProps(props, ref);
|
|
40
|
+
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartDataProviderProProps, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
children: children
|
|
44
|
+
}))
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// @ts-expect-error the type coercion breaks the prop types
|
|
49
|
+
if (process.env.NODE_ENV !== "production") ChartsContainerPro.displayName = "ChartsContainerPro";
|
|
50
|
+
process.env.NODE_ENV !== "production" ? ChartsContainerPro.propTypes = {
|
|
51
|
+
// ----------------------------- Warning --------------------------------
|
|
52
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
54
|
+
// ----------------------------------------------------------------------
|
|
55
|
+
apiRef: PropTypes.shape({
|
|
56
|
+
current: PropTypes.shape({
|
|
57
|
+
setZoomData: PropTypes.func.isRequired
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
children: PropTypes.node,
|
|
61
|
+
className: PropTypes.string,
|
|
62
|
+
/**
|
|
63
|
+
* Color palette used to colorize multiple series.
|
|
64
|
+
* @default blueberryTwilightPalette
|
|
65
|
+
*/
|
|
66
|
+
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
67
|
+
/**
|
|
68
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
69
|
+
*/
|
|
70
|
+
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
71
|
+
desc: PropTypes.string,
|
|
72
|
+
/**
|
|
73
|
+
* If `true`, the charts will not listen to the mouse move event.
|
|
74
|
+
* It might break interactive features, but will improve performance.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
disableAxisListener: PropTypes.bool,
|
|
78
|
+
/**
|
|
79
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
80
|
+
*/
|
|
81
|
+
height: PropTypes.number,
|
|
82
|
+
/**
|
|
83
|
+
* The highlighted item.
|
|
84
|
+
* Used when the highlight is controlled.
|
|
85
|
+
*/
|
|
86
|
+
highlightedItem: PropTypes.shape({
|
|
87
|
+
dataIndex: PropTypes.number,
|
|
88
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
89
|
+
}),
|
|
90
|
+
/**
|
|
91
|
+
* This prop is used to help implement the accessibility logic.
|
|
92
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
93
|
+
*/
|
|
94
|
+
id: PropTypes.string,
|
|
95
|
+
/**
|
|
96
|
+
* The list of zoom data related to each axis.
|
|
97
|
+
*/
|
|
98
|
+
initialZoom: PropTypes.arrayOf(PropTypes.shape({
|
|
99
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
100
|
+
end: PropTypes.number.isRequired,
|
|
101
|
+
start: PropTypes.number.isRequired
|
|
102
|
+
})),
|
|
103
|
+
/**
|
|
104
|
+
* The margin between the SVG and the drawing area.
|
|
105
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
106
|
+
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
107
|
+
*/
|
|
108
|
+
margin: PropTypes.shape({
|
|
109
|
+
bottom: PropTypes.number,
|
|
110
|
+
left: PropTypes.number,
|
|
111
|
+
right: PropTypes.number,
|
|
112
|
+
top: PropTypes.number
|
|
113
|
+
}),
|
|
114
|
+
/**
|
|
115
|
+
* The callback fired when the highlighted item changes.
|
|
116
|
+
*
|
|
117
|
+
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
|
|
118
|
+
*/
|
|
119
|
+
onHighlightChange: PropTypes.func,
|
|
120
|
+
/**
|
|
121
|
+
* Callback fired when the zoom has changed.
|
|
122
|
+
*
|
|
123
|
+
* @param {ZoomData[]} zoomData Updated zoom data.
|
|
124
|
+
*/
|
|
125
|
+
onZoomChange: PropTypes.func,
|
|
126
|
+
/**
|
|
127
|
+
* The array of series to display.
|
|
128
|
+
* Each type of series has its own specificity.
|
|
129
|
+
* Please refer to the appropriate docs page to learn more about it.
|
|
130
|
+
*/
|
|
131
|
+
series: PropTypes.arrayOf(PropTypes.object),
|
|
132
|
+
/**
|
|
133
|
+
* If `true`, animations are skipped.
|
|
134
|
+
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
135
|
+
*/
|
|
136
|
+
skipAnimation: PropTypes.bool,
|
|
137
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
138
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
139
|
+
title: PropTypes.string,
|
|
140
|
+
/**
|
|
141
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
142
|
+
*/
|
|
143
|
+
width: PropTypes.number,
|
|
144
|
+
/**
|
|
145
|
+
* The configuration of the x-axes.
|
|
146
|
+
* If not provided, a default axis config is used.
|
|
147
|
+
* An array of [[AxisConfig]] objects.
|
|
148
|
+
*/
|
|
149
|
+
xAxis: PropTypes.arrayOf(PropTypes.object),
|
|
150
|
+
/**
|
|
151
|
+
* The configuration of the y-axes.
|
|
152
|
+
* If not provided, a default axis config is used.
|
|
153
|
+
* An array of [[AxisConfig]] objects.
|
|
154
|
+
*/
|
|
155
|
+
yAxis: PropTypes.arrayOf(PropTypes.object),
|
|
156
|
+
/**
|
|
157
|
+
* The configuration of the z-axes.
|
|
158
|
+
*/
|
|
159
|
+
zAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
160
|
+
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
161
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
162
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
163
|
+
unknownColor: PropTypes.string,
|
|
164
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
165
|
+
}), PropTypes.shape({
|
|
166
|
+
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
167
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
168
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
169
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
170
|
+
}), PropTypes.shape({
|
|
171
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
172
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
173
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
174
|
+
})]),
|
|
175
|
+
data: PropTypes.array,
|
|
176
|
+
dataKey: PropTypes.string,
|
|
177
|
+
id: PropTypes.string,
|
|
178
|
+
max: PropTypes.number,
|
|
179
|
+
min: PropTypes.number
|
|
180
|
+
}))
|
|
181
|
+
} : void 0;
|
|
182
|
+
export { ChartsContainerPro };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../typeOverloads/index.js";
|
|
2
|
+
import type { ChartAnyPluginSignature } from '@mui/x-charts/internals';
|
|
3
|
+
import type { ChartProApi as ChartProApiOriginal, ProPluginsPerSeriesType } from "../context/ChartProApi.js";
|
|
4
|
+
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
export * from "./ChartsContainerPro.js";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `ChartProApi` from `@mui/x-charts/context` instead.
|
|
8
|
+
*/
|
|
9
|
+
export type ChartProApi<ChartType extends keyof ProPluginsPerSeriesType | undefined = undefined, Signatures extends readonly ChartAnyPluginSignature[] = (ChartType extends keyof ProPluginsPerSeriesType ? ProPluginsPerSeriesType[ChartType] : AllPluginSignatures)> = ChartProApiOriginal<ChartType, Signatures>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import type { ChartDataProviderProProps } from "../ChartDataProviderPro/index.js";
|
|
4
|
+
import type { ChartsContainerProProps } from "./ChartsContainerPro.js";
|
|
5
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
6
|
+
export type UseChartsContainerProPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
|
+
chartDataProviderProProps: ChartDataProviderProProps<TSeries, TSignatures>;
|
|
8
|
+
};
|
|
9
|
+
export declare const useChartsContainerProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerProProps<TSeries, TSignatures>, ref: React.Ref<SVGSVGElement>) => UseChartsContainerProPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
+
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
6
|
+
import { useChartsContainerProps } from '@mui/x-charts/internals';
|
|
7
|
+
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
8
|
+
export const useChartsContainerProProps = (props, ref) => {
|
|
9
|
+
const _ref = props,
|
|
10
|
+
{
|
|
11
|
+
initialZoom,
|
|
12
|
+
zoomData,
|
|
13
|
+
onZoomChange,
|
|
14
|
+
zoomInteractionConfig,
|
|
15
|
+
plugins,
|
|
16
|
+
apiRef
|
|
17
|
+
} = _ref,
|
|
18
|
+
baseProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
+
const {
|
|
20
|
+
chartDataProviderProps,
|
|
21
|
+
chartsSurfaceProps,
|
|
22
|
+
children
|
|
23
|
+
} = useChartsContainerProps(baseProps, ref);
|
|
24
|
+
const chartDataProviderProProps = _extends({}, chartDataProviderProps, {
|
|
25
|
+
initialZoom,
|
|
26
|
+
zoomData,
|
|
27
|
+
onZoomChange,
|
|
28
|
+
zoomInteractionConfig,
|
|
29
|
+
apiRef,
|
|
30
|
+
plugins: plugins ?? DEFAULT_PLUGINS
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
chartDataProviderProProps,
|
|
34
|
+
chartsSurfaceProps,
|
|
35
|
+
children
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mui/x-charts/ChartsDataProvider';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ChartSeriesType, type ChartAnyPluginSignature, type ChartsProviderProps, type ChartSeriesConfig } from '@mui/x-charts/internals';
|
|
2
|
+
import { type ChartsDataProviderProps } from '@mui/x-charts/ChartsDataProvider';
|
|
3
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
4
|
+
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
5
|
+
export interface ChartsDataProviderProSlots extends ChartsSlotsPro {}
|
|
6
|
+
export interface ChartsDataProviderProSlotProps extends ChartsSlotPropsPro {}
|
|
7
|
+
export type ChartsDataProviderProProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>> = ChartsDataProviderProps<TSeries, TSignatures> & ChartsProviderProps<TSeries, TSignatures>['pluginParams'] & {
|
|
8
|
+
/**
|
|
9
|
+
* Slots to customize charts' components.
|
|
10
|
+
*/
|
|
11
|
+
slots?: Partial<ChartsDataProviderProSlots>;
|
|
12
|
+
/**
|
|
13
|
+
* The props for the slots.
|
|
14
|
+
*/
|
|
15
|
+
slotProps?: Partial<ChartsDataProviderProSlotProps>;
|
|
16
|
+
};
|
|
17
|
+
export declare const defaultSeriesConfigPro: ChartSeriesConfig<'bar' | '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
|
+
* - [ChartsDataProviderPro API](https://mui.com/x/api/charts/charts-data-provider-pro/)
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```jsx
|
|
33
|
+
* <ChartsDataProviderPro
|
|
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
|
+
* </ChartsDataProviderPro>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function ChartsDataProviderPro<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsDataProviderProProps<TSeries, TSignatures>): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare namespace ChartsDataProviderPro {
|
|
47
|
+
var propTypes: any;
|
|
48
|
+
}
|
|
49
|
+
export { ChartsDataProviderPro };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { Watermark } from '@mui/x-license/Watermark';
|
|
6
|
+
import { ChartsProvider, ChartsSlotsProvider, defaultSeriesConfig } from '@mui/x-charts/internals';
|
|
7
|
+
import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
|
|
8
|
+
import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
|
|
9
|
+
import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
10
|
+
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
11
|
+
import { useChartsDataProviderProProps } from "./useChartsDataProviderProProps.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const releaseInfo = "MTc3MjY2ODgwMDAwMA==";
|
|
14
|
+
const packageIdentifier = 'x-charts-pro';
|
|
15
|
+
export const defaultSeriesConfigPro = defaultSeriesConfig;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrates the data providers for the chart components and hooks.
|
|
19
|
+
*
|
|
20
|
+
* Use this component if you have custom HTML components that need to access the chart data.
|
|
21
|
+
*
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Composition](https://mui.com/x/api/charts/composition/)
|
|
25
|
+
*
|
|
26
|
+
* API:
|
|
27
|
+
*
|
|
28
|
+
* - [ChartsDataProviderPro API](https://mui.com/x/api/charts/charts-data-provider-pro/)
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```jsx
|
|
32
|
+
* <ChartsDataProviderPro
|
|
33
|
+
* series={[{ label: "Label", type: "bar", data: [10, 20] }]}
|
|
34
|
+
* xAxis={[{ data: ["A", "B"], scaleType: "band", id: "x-axis" }]}
|
|
35
|
+
* >
|
|
36
|
+
* <ChartsSurface>
|
|
37
|
+
* <BarPlot />
|
|
38
|
+
* <ChartsXAxis axisId="x-axis" />
|
|
39
|
+
* </ChartsSurface>
|
|
40
|
+
* {'Custom Legend Component'}
|
|
41
|
+
* </ChartsDataProviderPro>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
function ChartsDataProviderPro(props) {
|
|
45
|
+
const {
|
|
46
|
+
children,
|
|
47
|
+
localeText,
|
|
48
|
+
chartProviderProps,
|
|
49
|
+
slots,
|
|
50
|
+
slotProps
|
|
51
|
+
} = useChartsDataProviderProProps(_extends({}, props, {
|
|
52
|
+
seriesConfig: props.seriesConfig ?? defaultSeriesConfigPro,
|
|
53
|
+
plugins: props.plugins ?? DEFAULT_PLUGINS
|
|
54
|
+
}));
|
|
55
|
+
useLicenseVerifier(packageIdentifier, releaseInfo);
|
|
56
|
+
return /*#__PURE__*/_jsxs(ChartsProvider, _extends({}, chartProviderProps, {
|
|
57
|
+
children: [/*#__PURE__*/_jsx(ChartsLocalizationProvider, {
|
|
58
|
+
localeText: localeText,
|
|
59
|
+
children: /*#__PURE__*/_jsx(ChartsSlotsProvider, {
|
|
60
|
+
slots: slots,
|
|
61
|
+
slotProps: slotProps,
|
|
62
|
+
defaultSlots: defaultSlotsMaterial,
|
|
63
|
+
children: children
|
|
64
|
+
})
|
|
65
|
+
}), /*#__PURE__*/_jsx(Watermark, {
|
|
66
|
+
packageName: packageIdentifier,
|
|
67
|
+
releaseInfo: releaseInfo
|
|
68
|
+
})]
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
process.env.NODE_ENV !== "production" ? ChartsDataProviderPro.propTypes = {
|
|
72
|
+
// ----------------------------- Warning --------------------------------
|
|
73
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
74
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
75
|
+
// ----------------------------------------------------------------------
|
|
76
|
+
apiRef: PropTypes.shape({
|
|
77
|
+
current: PropTypes.any
|
|
78
|
+
}),
|
|
79
|
+
/**
|
|
80
|
+
* Color palette used to colorize multiple series.
|
|
81
|
+
* @default rainbowSurgePalette
|
|
82
|
+
*/
|
|
83
|
+
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
84
|
+
/**
|
|
85
|
+
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
86
|
+
*/
|
|
87
|
+
dataset: PropTypes.arrayOf(PropTypes.object),
|
|
88
|
+
/**
|
|
89
|
+
* Options to enable features planned for the next major.
|
|
90
|
+
*/
|
|
91
|
+
experimentalFeatures: PropTypes.shape({
|
|
92
|
+
preferStrictDomainInLineCharts: PropTypes.bool
|
|
93
|
+
}),
|
|
94
|
+
/**
|
|
95
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
96
|
+
*/
|
|
97
|
+
height: PropTypes.number,
|
|
98
|
+
/**
|
|
99
|
+
* This prop is used to help implement the accessibility logic.
|
|
100
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
101
|
+
*/
|
|
102
|
+
id: PropTypes.string,
|
|
103
|
+
/**
|
|
104
|
+
* Localized text for chart components.
|
|
105
|
+
*/
|
|
106
|
+
localeText: PropTypes.object,
|
|
107
|
+
/**
|
|
108
|
+
* The margin between the SVG and the drawing area.
|
|
109
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
110
|
+
*
|
|
111
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
112
|
+
*/
|
|
113
|
+
margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
114
|
+
bottom: PropTypes.number,
|
|
115
|
+
left: PropTypes.number,
|
|
116
|
+
right: PropTypes.number,
|
|
117
|
+
top: PropTypes.number
|
|
118
|
+
})]),
|
|
119
|
+
/**
|
|
120
|
+
* The array of series to display.
|
|
121
|
+
* Each type of series has its own specificity.
|
|
122
|
+
* Please refer to the appropriate docs page to learn more about it.
|
|
123
|
+
*/
|
|
124
|
+
series: PropTypes.arrayOf(PropTypes.object),
|
|
125
|
+
/**
|
|
126
|
+
* If `true`, animations are skipped.
|
|
127
|
+
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
|
|
128
|
+
*/
|
|
129
|
+
skipAnimation: PropTypes.bool,
|
|
130
|
+
/**
|
|
131
|
+
* The props for the slots.
|
|
132
|
+
*/
|
|
133
|
+
slotProps: PropTypes.object,
|
|
134
|
+
/**
|
|
135
|
+
* Slots to customize charts' components.
|
|
136
|
+
*/
|
|
137
|
+
slots: PropTypes.object,
|
|
138
|
+
theme: PropTypes.oneOf(['dark', 'light']),
|
|
139
|
+
/**
|
|
140
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
141
|
+
*/
|
|
142
|
+
width: PropTypes.number
|
|
143
|
+
} : void 0;
|
|
144
|
+
export { ChartsDataProviderPro };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ChartAnyPluginSignature, type ChartSeriesType } from '@mui/x-charts/internals';
|
|
2
|
+
import type { ChartsDataProviderProProps } from "./ChartsDataProviderPro.js";
|
|
3
|
+
import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
|
+
export declare const useChartsDataProviderProProps: <TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsDataProviderProProps<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,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useChartsDataProviderProps } from '@mui/x-charts/internals';
|
|
4
|
+
export const useChartsDataProviderProProps = props => {
|
|
5
|
+
const {
|
|
6
|
+
chartProviderProps,
|
|
7
|
+
localeText,
|
|
8
|
+
slots,
|
|
9
|
+
slotProps,
|
|
10
|
+
children
|
|
11
|
+
} = useChartsDataProviderProps(props);
|
|
12
|
+
return {
|
|
13
|
+
children,
|
|
14
|
+
localeText,
|
|
15
|
+
chartProviderProps,
|
|
16
|
+
slots,
|
|
17
|
+
slotProps
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useXAxes, useYAxes } from '@mui/x-charts/hooks';
|
|
3
|
-
import {
|
|
3
|
+
import { ChartsAxisZoomSlider } from "./internals/ChartsAxisZoomSlider.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Renders the zoom slider for all x and y axes that have it enabled.
|
|
7
7
|
*/
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export function
|
|
9
|
+
export function ChartsZoomSlider() {
|
|
10
10
|
const {
|
|
11
11
|
xAxisIds,
|
|
12
12
|
xAxis: xAxes
|
|
@@ -22,7 +22,7 @@ export function ChartZoomSlider() {
|
|
|
22
22
|
if (!slider?.enabled) {
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
return /*#__PURE__*/_jsx(
|
|
25
|
+
return /*#__PURE__*/_jsx(ChartsAxisZoomSlider, {
|
|
26
26
|
axisId: axisId,
|
|
27
27
|
axisDirection: "x"
|
|
28
28
|
}, axisId);
|
|
@@ -32,7 +32,7 @@ export function ChartZoomSlider() {
|
|
|
32
32
|
if (!slider?.enabled) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
return /*#__PURE__*/_jsx(
|
|
35
|
+
return /*#__PURE__*/_jsx(ChartsAxisZoomSlider, {
|
|
36
36
|
axisId: axisId,
|
|
37
37
|
axisDirection: "y"
|
|
38
38
|
}, axisId);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ChartsZoomSlider } from "./ChartsZoomSlider.js";
|
|
2
|
+
export { type ChartsAxisZoomSliderThumbClasses, type ChartsAxisZoomSliderThumbClassKey, chartsAxisZoomSliderThumbClasses } from "./internals/chartsAxisZoomSliderThumbClasses.js";
|
|
3
|
+
export { type ChartsAxisZoomSliderTrackClasses, type ChartsAxisZoomSliderTrackClassKey, chartsAxisZoomSliderTrackClasses } from "./internals/chartsAxisZoomSliderTrackClasses.js";
|