@mui/x-charts 8.0.0 → 8.1.0
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/BarChart/BarChart.js +4 -0
- package/BarChart/BarPlot.js +1 -2
- package/CHANGELOG.md +106 -0
- package/ChartContainer/ChartContainer.d.ts +1 -0
- package/ChartContainer/ChartContainer.js +4 -0
- package/ChartContainer/useChartContainerProps.js +4 -2
- package/ChartDataProvider/ChartDataProvider.d.ts +2 -1
- package/ChartDataProvider/ChartDataProvider.js +10 -1
- package/ChartDataProvider/useChartDataProviderProps.d.ts +3 -1
- package/ChartDataProvider/useChartDataProviderProps.js +3 -1
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.js +1 -2
- package/ChartsGrid/styledComponents.js +1 -2
- package/ChartsLabel/ChartsLabelGradient.js +1 -2
- package/ChartsLabel/ChartsLabelMark.js +1 -2
- package/ChartsLegend/ChartsLegend.js +1 -2
- package/ChartsLegend/ContinuousColorLegend.js +1 -2
- package/ChartsLegend/PiecewiseColorLegend.js +1 -2
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +27 -0
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +73 -0
- package/ChartsLocalizationProvider/index.d.ts +2 -0
- package/ChartsLocalizationProvider/index.js +12 -0
- package/ChartsOverlay/ChartsLoadingOverlay.js +5 -1
- package/ChartsOverlay/ChartsNoDataOverlay.js +5 -1
- package/ChartsOverlay/ChartsOverlay.d.ts +2 -0
- package/ChartsTooltip/ChartsTooltipContainer.js +11 -10
- package/ChartsTooltip/ChartsTooltipTable.js +3 -5
- package/ChartsTooltip/utils.d.ts +1 -1
- package/ChartsTooltip/utils.js +0 -1
- package/ChartsXAxis/ChartsXAxis.js +1 -2
- package/ChartsYAxis/ChartsYAxis.js +1 -2
- package/Gauge/GaugeReferenceArc.js +1 -2
- package/Gauge/GaugeValueArc.js +1 -2
- package/LineChart/AreaPlot.js +1 -2
- package/LineChart/LineChart.js +4 -0
- package/LineChart/LinePlot.js +1 -2
- package/LineChart/MarkElement.js +1 -2
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.js +1 -2
- package/PieChart/PieChart.js +4 -0
- package/RadarChart/RadarChart.js +4 -0
- package/RadarChart/RadarDataProvider/RadarDataProvider.js +4 -0
- package/ScatterChart/ScatterChart.js +4 -0
- package/SparkLineChart/SparkLineChart.js +4 -0
- package/context/ChartProvider/ChartProvider.types.d.ts +4 -0
- package/esm/BarChart/BarChart.js +4 -0
- package/esm/BarChart/BarPlot.js +1 -2
- package/esm/ChartContainer/ChartContainer.d.ts +1 -0
- package/esm/ChartContainer/ChartContainer.js +4 -0
- package/esm/ChartContainer/useChartContainerProps.js +4 -2
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -1
- package/esm/ChartDataProvider/ChartDataProvider.js +10 -1
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +3 -1
- package/esm/ChartDataProvider/useChartDataProviderProps.js +3 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.js +1 -2
- package/esm/ChartsGrid/styledComponents.js +1 -2
- package/esm/ChartsLabel/ChartsLabelGradient.js +1 -2
- package/esm/ChartsLabel/ChartsLabelMark.js +1 -2
- package/esm/ChartsLegend/ChartsLegend.js +1 -2
- package/esm/ChartsLegend/ContinuousColorLegend.js +1 -2
- package/esm/ChartsLegend/PiecewiseColorLegend.js +1 -2
- package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +27 -0
- package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.js +66 -0
- package/esm/ChartsLocalizationProvider/index.d.ts +2 -0
- package/esm/ChartsLocalizationProvider/index.js +1 -0
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +5 -1
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +5 -1
- package/esm/ChartsOverlay/ChartsOverlay.d.ts +2 -0
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +11 -10
- package/esm/ChartsTooltip/ChartsTooltipTable.js +3 -5
- package/esm/ChartsTooltip/utils.d.ts +1 -1
- package/esm/ChartsTooltip/utils.js +0 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -2
- package/esm/Gauge/GaugeReferenceArc.js +1 -2
- package/esm/Gauge/GaugeValueArc.js +1 -2
- package/esm/LineChart/AreaPlot.js +1 -2
- package/esm/LineChart/LineChart.js +4 -0
- package/esm/LineChart/LinePlot.js +1 -2
- package/esm/LineChart/MarkElement.js +1 -2
- package/esm/PieChart/PieArc.js +1 -1
- package/esm/PieChart/PieArcLabel.js +1 -2
- package/esm/PieChart/PieChart.js +4 -0
- package/esm/RadarChart/RadarChart.js +4 -0
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.js +4 -0
- package/esm/ScatterChart/ScatterChart.js +4 -0
- package/esm/SparkLineChart/SparkLineChart.js +4 -0
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +4 -0
- package/esm/hooks/index.d.ts +3 -1
- package/esm/hooks/index.js +3 -1
- package/esm/hooks/useChartRootRef.d.ts +6 -0
- package/esm/hooks/useChartRootRef.js +12 -0
- package/esm/hooks/useChartsLocalization.d.ts +1 -0
- package/esm/hooks/useChartsLocalization.js +9 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/components/AxisSharedComponents.js +1 -2
- package/esm/internals/components/ChartsWrapper/ChartsWrapper.js +4 -2
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +0 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +15 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +8 -0
- package/esm/internals/plugins/models/plugin.d.ts +4 -0
- package/esm/internals/store/useCharts.d.ts +1 -0
- package/esm/internals/store/useCharts.js +4 -1
- package/esm/locales/enUS.d.ts +15 -0
- package/esm/locales/enUS.js +11 -0
- package/esm/locales/frFR.d.ts +14 -0
- package/esm/locales/frFR.js +7 -0
- package/esm/locales/index.d.ts +3 -0
- package/esm/locales/index.js +3 -0
- package/esm/locales/utils/chartsLocaleTextApi.d.ts +11 -0
- package/esm/locales/utils/chartsLocaleTextApi.js +1 -0
- package/esm/locales/utils/getChartsLocalization.d.ts +18 -0
- package/esm/locales/utils/getChartsLocalization.js +17 -0
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/props.d.ts +2 -0
- package/hooks/index.d.ts +3 -1
- package/hooks/index.js +24 -0
- package/hooks/useChartRootRef.d.ts +6 -0
- package/hooks/useChartRootRef.js +16 -0
- package/hooks/useChartsLocalization.d.ts +1 -0
- package/hooks/useChartsLocalization.js +17 -0
- package/index.d.ts +1 -0
- package/index.js +12 -1
- package/internals/components/AxisSharedComponents.js +1 -2
- package/internals/components/ChartsWrapper/ChartsWrapper.js +4 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +0 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +15 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +8 -0
- package/internals/plugins/models/plugin.d.ts +4 -0
- package/internals/store/useCharts.d.ts +1 -0
- package/internals/store/useCharts.js +4 -1
- package/locales/enUS.d.ts +15 -0
- package/locales/enUS.js +16 -0
- package/locales/frFR.d.ts +14 -0
- package/locales/frFR.js +13 -0
- package/locales/index.d.ts +3 -0
- package/locales/index.js +27 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +11 -0
- package/locales/utils/chartsLocaleTextApi.js +5 -0
- package/locales/utils/getChartsLocalization.d.ts +18 -0
- package/locales/utils/getChartsLocalization.js +25 -0
- package/package.json +1 -2
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/props.d.ts +2 -0
|
@@ -83,8 +83,7 @@ function shortenLabels(visibleLabels, drawingArea, maxWidth, isRtl, tickLabelSty
|
|
|
83
83
|
}
|
|
84
84
|
const YAxisRoot = styled(AxisRoot, {
|
|
85
85
|
name: 'MuiChartsYAxis',
|
|
86
|
-
slot: 'Root'
|
|
87
|
-
overridesResolver: (props, styles) => styles.root
|
|
86
|
+
slot: 'Root'
|
|
88
87
|
})({});
|
|
89
88
|
const defaultProps = {
|
|
90
89
|
disableLine: false,
|
|
@@ -8,8 +8,7 @@ import { useGaugeState } from "./GaugeProvider.js";
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
const StyledPath = styled('path', {
|
|
10
10
|
name: 'MuiGauge',
|
|
11
|
-
slot: 'ReferenceArc'
|
|
12
|
-
overridesResolver: (props, styles) => styles.referenceArc
|
|
11
|
+
slot: 'ReferenceArc'
|
|
13
12
|
})(({
|
|
14
13
|
theme
|
|
15
14
|
}) => ({
|
|
@@ -12,8 +12,7 @@ import { useGaugeState } from "./GaugeProvider.js";
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
const StyledPath = styled('path', {
|
|
14
14
|
name: 'MuiGauge',
|
|
15
|
-
slot: 'ReferenceArc'
|
|
16
|
-
overridesResolver: (props, styles) => styles.referenceArc
|
|
15
|
+
slot: 'ReferenceArc'
|
|
17
16
|
})(({
|
|
18
17
|
theme
|
|
19
18
|
}) => ({
|
|
@@ -20,8 +20,7 @@ import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugin
|
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const AreaPlotRoot = styled('g', {
|
|
22
22
|
name: 'MuiAreaPlot',
|
|
23
|
-
slot: 'Root'
|
|
24
|
-
overridesResolver: (_, styles) => styles.root
|
|
23
|
+
slot: 'Root'
|
|
25
24
|
})({
|
|
26
25
|
[`& .${areaElementClasses.root}`]: {
|
|
27
26
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in'
|
|
@@ -142,6 +142,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
142
142
|
* @default false
|
|
143
143
|
*/
|
|
144
144
|
loading: PropTypes.bool,
|
|
145
|
+
/**
|
|
146
|
+
* Localized text for chart components.
|
|
147
|
+
*/
|
|
148
|
+
localeText: PropTypes.object,
|
|
145
149
|
/**
|
|
146
150
|
* The margin between the SVG and the drawing area.
|
|
147
151
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -21,8 +21,7 @@ import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugin
|
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const LinePlotRoot = styled('g', {
|
|
23
23
|
name: 'MuiAreaPlot',
|
|
24
|
-
slot: 'Root'
|
|
25
|
-
overridesResolver: (_, styles) => styles.root
|
|
24
|
+
slot: 'Root'
|
|
26
25
|
})({
|
|
27
26
|
[`& .${lineElementClasses.root}`]: {
|
|
28
27
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in'
|
|
@@ -18,8 +18,7 @@ import { useStore } from "../internals/store/useStore.js";
|
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
19
|
const MarkElementPath = styled('path', {
|
|
20
20
|
name: 'MuiMarkElement',
|
|
21
|
-
slot: 'Root'
|
|
22
|
-
overridesResolver: (_, styles) => styles.root
|
|
21
|
+
slot: 'Root'
|
|
23
22
|
})(({
|
|
24
23
|
ownerState,
|
|
25
24
|
theme
|
package/esm/PieChart/PieArc.js
CHANGED
|
@@ -33,7 +33,7 @@ const useUtilityClasses = ownerState => {
|
|
|
33
33
|
const PieArcRoot = styled('path', {
|
|
34
34
|
name: 'MuiPieArc',
|
|
35
35
|
slot: 'Root',
|
|
36
|
-
overridesResolver: (_, styles) => styles.arc
|
|
36
|
+
overridesResolver: (_, styles) => styles.arc // FIXME: Inconsistent naming with slot
|
|
37
37
|
})(({
|
|
38
38
|
theme
|
|
39
39
|
}) => ({
|
package/esm/PieChart/PieChart.js
CHANGED
|
@@ -148,6 +148,10 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
148
148
|
* @default false
|
|
149
149
|
*/
|
|
150
150
|
loading: PropTypes.bool,
|
|
151
|
+
/**
|
|
152
|
+
* Localized text for chart components.
|
|
153
|
+
*/
|
|
154
|
+
localeText: PropTypes.object,
|
|
151
155
|
/**
|
|
152
156
|
* The margin between the SVG and the drawing area.
|
|
153
157
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -99,6 +99,10 @@ process.env.NODE_ENV !== "production" ? RadarChart.propTypes = {
|
|
|
99
99
|
* @default false
|
|
100
100
|
*/
|
|
101
101
|
loading: PropTypes.bool,
|
|
102
|
+
/**
|
|
103
|
+
* Localized text for chart components.
|
|
104
|
+
*/
|
|
105
|
+
localeText: PropTypes.object,
|
|
102
106
|
/**
|
|
103
107
|
* The margin between the SVG and the drawing area.
|
|
104
108
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -134,6 +134,10 @@ process.env.NODE_ENV !== "production" ? RadarDataProvider.propTypes = {
|
|
|
134
134
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
135
135
|
*/
|
|
136
136
|
id: PropTypes.string,
|
|
137
|
+
/**
|
|
138
|
+
* Localized text for chart components.
|
|
139
|
+
*/
|
|
140
|
+
localeText: PropTypes.object,
|
|
137
141
|
/**
|
|
138
142
|
* The margin between the SVG and the drawing area.
|
|
139
143
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -134,6 +134,10 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
134
134
|
* @default false
|
|
135
135
|
*/
|
|
136
136
|
loading: PropTypes.bool,
|
|
137
|
+
/**
|
|
138
|
+
* Localized text for chart components.
|
|
139
|
+
*/
|
|
140
|
+
localeText: PropTypes.object,
|
|
137
141
|
/**
|
|
138
142
|
* The margin between the SVG and the drawing area.
|
|
139
143
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -177,6 +177,10 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
177
177
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
178
178
|
*/
|
|
179
179
|
id: PropTypes.string,
|
|
180
|
+
/**
|
|
181
|
+
* Localized text for chart components.
|
|
182
|
+
*/
|
|
183
|
+
localeText: PropTypes.object,
|
|
180
184
|
/**
|
|
181
185
|
* The margin between the SVG and the drawing area.
|
|
182
186
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
@@ -22,6 +22,10 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
|
|
|
22
22
|
* The ref to the <svg />.
|
|
23
23
|
*/
|
|
24
24
|
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
25
|
+
/**
|
|
26
|
+
* The ref to the chart root element.
|
|
27
|
+
*/
|
|
28
|
+
chartRootRef: React.RefObject<HTMLDivElement | null>;
|
|
25
29
|
};
|
|
26
30
|
export type ChartPluginParams<TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures, ...TSignatures], 'params'>;
|
|
27
31
|
export interface ChartProviderProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = []> {
|
package/esm/hooks/index.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export * from "./useItemHighlighted.js";
|
|
|
14
14
|
export * from "./useItemHighlightedGetter.js";
|
|
15
15
|
export * from "./useLegend.js";
|
|
16
16
|
export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.js";
|
|
17
|
-
export * from "./animation/index.js";
|
|
17
|
+
export * from "./animation/index.js";
|
|
18
|
+
export * from "./useChartRootRef.js";
|
|
19
|
+
export * from "./useChartsLocalization.js";
|
package/esm/hooks/index.js
CHANGED
|
@@ -14,4 +14,6 @@ export * from "./useItemHighlighted.js";
|
|
|
14
14
|
export * from "./useItemHighlightedGetter.js";
|
|
15
15
|
export * from "./useLegend.js";
|
|
16
16
|
export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.js";
|
|
17
|
-
export * from "./animation/index.js";
|
|
17
|
+
export * from "./animation/index.js";
|
|
18
|
+
export * from "./useChartRootRef.js";
|
|
19
|
+
export * from "./useChartsLocalization.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useChartContext } from "../context/ChartProvider/index.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Get the ref for the root chart element.
|
|
7
|
+
* @returns The root chart element ref.
|
|
8
|
+
*/
|
|
9
|
+
export function useChartRootRef() {
|
|
10
|
+
const context = useChartContext();
|
|
11
|
+
return context.chartRootRef;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useChartsLocalization: () => import("../ChartsLocalizationProvider/ChartsLocalizationProvider").ChartsLocalizationContextValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartsLocalizationContext } from "../ChartsLocalizationProvider/ChartsLocalizationProvider.js";
|
|
3
|
+
export const useChartsLocalization = () => {
|
|
4
|
+
const localization = React.useContext(ChartsLocalizationContext);
|
|
5
|
+
if (localization === null) {
|
|
6
|
+
throw new Error(['MUI X: Can not find the charts localization context.', 'It looks like you forgot to wrap your component in ChartsLocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-charts` package'].join('\n'));
|
|
7
|
+
}
|
|
8
|
+
return localization;
|
|
9
|
+
};
|
package/esm/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./ChartsText/index.js";
|
|
|
13
13
|
export * from "./ChartsTooltip/index.js";
|
|
14
14
|
export * from "./ChartsLabel/index.js";
|
|
15
15
|
export * from "./ChartsLegend/index.js";
|
|
16
|
+
export * from "./ChartsLocalizationProvider/index.js";
|
|
16
17
|
export * from "./ChartsAxisHighlight/index.js";
|
|
17
18
|
export * from "./BarChart/index.js";
|
|
18
19
|
export * from "./LineChart/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts v8.
|
|
2
|
+
* @mui/x-charts v8.1.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -20,6 +20,7 @@ export * from "./ChartsText/index.js";
|
|
|
20
20
|
export * from "./ChartsTooltip/index.js";
|
|
21
21
|
export * from "./ChartsLabel/index.js";
|
|
22
22
|
export * from "./ChartsLegend/index.js";
|
|
23
|
+
export * from "./ChartsLocalizationProvider/index.js";
|
|
23
24
|
export * from "./ChartsAxisHighlight/index.js";
|
|
24
25
|
export * from "./BarChart/index.js";
|
|
25
26
|
export * from "./LineChart/index.js";
|
|
@@ -3,8 +3,7 @@ import { styled } from '@mui/material/styles';
|
|
|
3
3
|
import { axisClasses } from "../../ChartsAxis/axisClasses.js";
|
|
4
4
|
export const AxisRoot = styled('g', {
|
|
5
5
|
name: 'MuiChartsAxis',
|
|
6
|
-
slot: 'Root'
|
|
7
|
-
overridesResolver: (props, styles) => styles.root
|
|
6
|
+
slot: 'Root'
|
|
8
7
|
})(({
|
|
9
8
|
theme
|
|
10
9
|
}) => ({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { useChartRootRef } from "../../../hooks/useChartRootRef.js";
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
const getDirection = (direction, position) => {
|
|
5
6
|
if (direction === 'vertical') {
|
|
@@ -34,8 +35,7 @@ const getAlign = (direction, position) => {
|
|
|
34
35
|
};
|
|
35
36
|
const Root = styled('div', {
|
|
36
37
|
name: 'MuiChartsWrapper',
|
|
37
|
-
slot: 'Root'
|
|
38
|
-
overridesResolver: (props, styles) => styles.root
|
|
38
|
+
slot: 'Root'
|
|
39
39
|
})(({
|
|
40
40
|
ownerState
|
|
41
41
|
}) => ({
|
|
@@ -57,7 +57,9 @@ function ChartsWrapper(props) {
|
|
|
57
57
|
children,
|
|
58
58
|
sx
|
|
59
59
|
} = props;
|
|
60
|
+
const chartRootRef = useChartRootRef();
|
|
60
61
|
return /*#__PURE__*/_jsx(Root, {
|
|
62
|
+
ref: chartRootRef,
|
|
61
63
|
ownerState: props,
|
|
62
64
|
sx: sx,
|
|
63
65
|
children: children
|