@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.
Files changed (148) hide show
  1. package/BarChart/BarChart.js +4 -0
  2. package/BarChart/BarPlot.js +1 -2
  3. package/CHANGELOG.md +106 -0
  4. package/ChartContainer/ChartContainer.d.ts +1 -0
  5. package/ChartContainer/ChartContainer.js +4 -0
  6. package/ChartContainer/useChartContainerProps.js +4 -2
  7. package/ChartDataProvider/ChartDataProvider.d.ts +2 -1
  8. package/ChartDataProvider/ChartDataProvider.js +10 -1
  9. package/ChartDataProvider/useChartDataProviderProps.d.ts +3 -1
  10. package/ChartDataProvider/useChartDataProviderProps.js +3 -1
  11. package/ChartsAxisHighlight/ChartsAxisHighlightPath.js +1 -2
  12. package/ChartsGrid/styledComponents.js +1 -2
  13. package/ChartsLabel/ChartsLabelGradient.js +1 -2
  14. package/ChartsLabel/ChartsLabelMark.js +1 -2
  15. package/ChartsLegend/ChartsLegend.js +1 -2
  16. package/ChartsLegend/ContinuousColorLegend.js +1 -2
  17. package/ChartsLegend/PiecewiseColorLegend.js +1 -2
  18. package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +27 -0
  19. package/ChartsLocalizationProvider/ChartsLocalizationProvider.js +73 -0
  20. package/ChartsLocalizationProvider/index.d.ts +2 -0
  21. package/ChartsLocalizationProvider/index.js +12 -0
  22. package/ChartsOverlay/ChartsLoadingOverlay.js +5 -1
  23. package/ChartsOverlay/ChartsNoDataOverlay.js +5 -1
  24. package/ChartsOverlay/ChartsOverlay.d.ts +2 -0
  25. package/ChartsTooltip/ChartsTooltipContainer.js +11 -10
  26. package/ChartsTooltip/ChartsTooltipTable.js +3 -5
  27. package/ChartsTooltip/utils.d.ts +1 -1
  28. package/ChartsTooltip/utils.js +0 -1
  29. package/ChartsXAxis/ChartsXAxis.js +1 -2
  30. package/ChartsYAxis/ChartsYAxis.js +1 -2
  31. package/Gauge/GaugeReferenceArc.js +1 -2
  32. package/Gauge/GaugeValueArc.js +1 -2
  33. package/LineChart/AreaPlot.js +1 -2
  34. package/LineChart/LineChart.js +4 -0
  35. package/LineChart/LinePlot.js +1 -2
  36. package/LineChart/MarkElement.js +1 -2
  37. package/PieChart/PieArc.js +1 -1
  38. package/PieChart/PieArcLabel.js +1 -2
  39. package/PieChart/PieChart.js +4 -0
  40. package/RadarChart/RadarChart.js +4 -0
  41. package/RadarChart/RadarDataProvider/RadarDataProvider.js +4 -0
  42. package/ScatterChart/ScatterChart.js +4 -0
  43. package/SparkLineChart/SparkLineChart.js +4 -0
  44. package/context/ChartProvider/ChartProvider.types.d.ts +4 -0
  45. package/esm/BarChart/BarChart.js +4 -0
  46. package/esm/BarChart/BarPlot.js +1 -2
  47. package/esm/ChartContainer/ChartContainer.d.ts +1 -0
  48. package/esm/ChartContainer/ChartContainer.js +4 -0
  49. package/esm/ChartContainer/useChartContainerProps.js +4 -2
  50. package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -1
  51. package/esm/ChartDataProvider/ChartDataProvider.js +10 -1
  52. package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +3 -1
  53. package/esm/ChartDataProvider/useChartDataProviderProps.js +3 -1
  54. package/esm/ChartsAxisHighlight/ChartsAxisHighlightPath.js +1 -2
  55. package/esm/ChartsGrid/styledComponents.js +1 -2
  56. package/esm/ChartsLabel/ChartsLabelGradient.js +1 -2
  57. package/esm/ChartsLabel/ChartsLabelMark.js +1 -2
  58. package/esm/ChartsLegend/ChartsLegend.js +1 -2
  59. package/esm/ChartsLegend/ContinuousColorLegend.js +1 -2
  60. package/esm/ChartsLegend/PiecewiseColorLegend.js +1 -2
  61. package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +27 -0
  62. package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.js +66 -0
  63. package/esm/ChartsLocalizationProvider/index.d.ts +2 -0
  64. package/esm/ChartsLocalizationProvider/index.js +1 -0
  65. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +5 -1
  66. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +5 -1
  67. package/esm/ChartsOverlay/ChartsOverlay.d.ts +2 -0
  68. package/esm/ChartsTooltip/ChartsTooltipContainer.js +11 -10
  69. package/esm/ChartsTooltip/ChartsTooltipTable.js +3 -5
  70. package/esm/ChartsTooltip/utils.d.ts +1 -1
  71. package/esm/ChartsTooltip/utils.js +0 -1
  72. package/esm/ChartsXAxis/ChartsXAxis.js +1 -2
  73. package/esm/ChartsYAxis/ChartsYAxis.js +1 -2
  74. package/esm/Gauge/GaugeReferenceArc.js +1 -2
  75. package/esm/Gauge/GaugeValueArc.js +1 -2
  76. package/esm/LineChart/AreaPlot.js +1 -2
  77. package/esm/LineChart/LineChart.js +4 -0
  78. package/esm/LineChart/LinePlot.js +1 -2
  79. package/esm/LineChart/MarkElement.js +1 -2
  80. package/esm/PieChart/PieArc.js +1 -1
  81. package/esm/PieChart/PieArcLabel.js +1 -2
  82. package/esm/PieChart/PieChart.js +4 -0
  83. package/esm/RadarChart/RadarChart.js +4 -0
  84. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.js +4 -0
  85. package/esm/ScatterChart/ScatterChart.js +4 -0
  86. package/esm/SparkLineChart/SparkLineChart.js +4 -0
  87. package/esm/context/ChartProvider/ChartProvider.types.d.ts +4 -0
  88. package/esm/hooks/index.d.ts +3 -1
  89. package/esm/hooks/index.js +3 -1
  90. package/esm/hooks/useChartRootRef.d.ts +6 -0
  91. package/esm/hooks/useChartRootRef.js +12 -0
  92. package/esm/hooks/useChartsLocalization.d.ts +1 -0
  93. package/esm/hooks/useChartsLocalization.js +9 -0
  94. package/esm/index.d.ts +1 -0
  95. package/esm/index.js +2 -1
  96. package/esm/internals/components/AxisSharedComponents.js +1 -2
  97. package/esm/internals/components/ChartsWrapper/ChartsWrapper.js +4 -2
  98. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +0 -1
  99. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +3 -3
  100. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +15 -0
  101. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
  102. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +8 -0
  103. package/esm/internals/plugins/models/plugin.d.ts +4 -0
  104. package/esm/internals/store/useCharts.d.ts +1 -0
  105. package/esm/internals/store/useCharts.js +4 -1
  106. package/esm/locales/enUS.d.ts +15 -0
  107. package/esm/locales/enUS.js +11 -0
  108. package/esm/locales/frFR.d.ts +14 -0
  109. package/esm/locales/frFR.js +7 -0
  110. package/esm/locales/index.d.ts +3 -0
  111. package/esm/locales/index.js +3 -0
  112. package/esm/locales/utils/chartsLocaleTextApi.d.ts +11 -0
  113. package/esm/locales/utils/chartsLocaleTextApi.js +1 -0
  114. package/esm/locales/utils/getChartsLocalization.d.ts +18 -0
  115. package/esm/locales/utils/getChartsLocalization.js +17 -0
  116. package/esm/themeAugmentation/components.d.ts +3 -0
  117. package/esm/themeAugmentation/props.d.ts +2 -0
  118. package/hooks/index.d.ts +3 -1
  119. package/hooks/index.js +24 -0
  120. package/hooks/useChartRootRef.d.ts +6 -0
  121. package/hooks/useChartRootRef.js +16 -0
  122. package/hooks/useChartsLocalization.d.ts +1 -0
  123. package/hooks/useChartsLocalization.js +17 -0
  124. package/index.d.ts +1 -0
  125. package/index.js +12 -1
  126. package/internals/components/AxisSharedComponents.js +1 -2
  127. package/internals/components/ChartsWrapper/ChartsWrapper.js +4 -2
  128. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +0 -1
  129. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +3 -3
  130. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +15 -0
  131. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
  132. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +8 -0
  133. package/internals/plugins/models/plugin.d.ts +4 -0
  134. package/internals/store/useCharts.d.ts +1 -0
  135. package/internals/store/useCharts.js +4 -1
  136. package/locales/enUS.d.ts +15 -0
  137. package/locales/enUS.js +16 -0
  138. package/locales/frFR.d.ts +14 -0
  139. package/locales/frFR.js +13 -0
  140. package/locales/index.d.ts +3 -0
  141. package/locales/index.js +27 -0
  142. package/locales/utils/chartsLocaleTextApi.d.ts +11 -0
  143. package/locales/utils/chartsLocaleTextApi.js +5 -0
  144. package/locales/utils/getChartsLocalization.d.ts +18 -0
  145. package/locales/utils/getChartsLocalization.js +25 -0
  146. package/package.json +1 -2
  147. package/themeAugmentation/components.d.ts +3 -0
  148. package/themeAugmentation/props.d.ts +2 -0
@@ -1,3 +1,4 @@
1
+ import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
1
2
  import { createSelector } from "../../utils/selectors.js";
2
3
  import { selectorChartsInteractionPointerX, selectorChartsInteractionPointerY } from "../useChartInteraction/useChartInteraction.selectors.js";
3
4
  import { generateSvg2rotation } from "./coordinateTransformation.js";
@@ -62,6 +63,13 @@ export const selectorChartsInteractionTooltipRotationAxes = createSelector([sele
62
63
  axisId,
63
64
  dataIndex
64
65
  }) => axes.axis[axisId].triggerTooltip && dataIndex >= 0);
66
+ }, {
67
+ memoizeOptions: {
68
+ // Keep the same reference if array content is the same.
69
+ // If possible, avoid this pattern by creating selectors that
70
+ // uses string/number as arguments.
71
+ resultEqualityCheck: isDeepEqual
72
+ }
65
73
  });
66
74
 
67
75
  /**
@@ -25,6 +25,10 @@ export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature>
25
25
  * Reference to the main svg element.
26
26
  */
27
27
  svgRef: React.RefObject<SVGSVGElement | null>;
28
+ /**
29
+ * Reference to the chart root element.
30
+ */
31
+ chartRootRef: React.RefObject<HTMLDivElement | null>;
28
32
  /**
29
33
  * All the plugins that are used in the chart.
30
34
  */
@@ -20,6 +20,7 @@ export declare function useCharts<TSeriesType extends ChartSeriesType, TSignatur
20
20
  publicAPI: ChartPublicAPI<TSignatures>;
21
21
  instance: ChartInstance<TSignatures>;
22
22
  svgRef: React.RefObject<SVGSVGElement | null>;
23
+ chartRootRef: React.RefObject<HTMLDivElement | null>;
23
24
  };
24
25
  };
25
26
  export declare function useChartApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): T;
@@ -27,6 +27,7 @@ export function useCharts(inPlugins, props, seriesConfig) {
27
27
  const instanceRef = React.useRef({});
28
28
  const instance = instanceRef.current;
29
29
  const publicAPI = useChartApiInitialization(props.apiRef);
30
+ const innerChartRootRef = React.useRef(null);
30
31
  const innerSvgRef = React.useRef(null);
31
32
  const storeRef = React.useRef(null);
32
33
  if (storeRef.current == null) {
@@ -51,6 +52,7 @@ export function useCharts(inPlugins, props, seriesConfig) {
51
52
  plugins: plugins,
52
53
  store: storeRef.current,
53
54
  svgRef: innerSvgRef,
55
+ chartRootRef: innerChartRootRef,
54
56
  seriesConfig,
55
57
  models
56
58
  });
@@ -66,7 +68,8 @@ export function useCharts(inPlugins, props, seriesConfig) {
66
68
  store: storeRef.current,
67
69
  publicAPI,
68
70
  instance,
69
- svgRef: innerSvgRef
71
+ svgRef: innerSvgRef,
72
+ chartRootRef: innerChartRootRef
70
73
  }), [instance, publicAPI]);
71
74
  return {
72
75
  contextValue
@@ -0,0 +1,15 @@
1
+ import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
+ export declare const enUSLocaleText: ChartsLocaleText;
3
+ export declare const DEFAULT_LOCALE: ChartsLocaleText;
4
+ export declare const enUS: {
5
+ components: {
6
+ MuiChartsLocalizationProvider: {
7
+ defaultProps: {
8
+ localeText: {
9
+ loading?: string | undefined;
10
+ noData?: string | undefined;
11
+ };
12
+ };
13
+ };
14
+ };
15
+ };
@@ -0,0 +1,11 @@
1
+ import { getChartsLocalization } from "./utils/getChartsLocalization.js";
2
+
3
+ // This object is not Partial<ChartsLocaleText> because it is the default values
4
+
5
+ export const enUSLocaleText = {
6
+ // Overlay
7
+ loading: 'Loading data…',
8
+ noData: 'No data to display'
9
+ };
10
+ export const DEFAULT_LOCALE = enUSLocaleText;
11
+ export const enUS = getChartsLocalization(enUSLocaleText);
@@ -0,0 +1,14 @@
1
+ import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
+ export declare const frFRLocalText: Partial<ChartsLocaleText>;
3
+ export declare const frFR: {
4
+ components: {
5
+ MuiChartsLocalizationProvider: {
6
+ defaultProps: {
7
+ localeText: {
8
+ loading?: string | undefined;
9
+ noData?: string | undefined;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ };
@@ -0,0 +1,7 @@
1
+ import { getChartsLocalization } from "./utils/getChartsLocalization.js";
2
+ export const frFRLocalText = {
3
+ // Overlay
4
+ loading: 'Chargement…',
5
+ noData: 'Pas de données'
6
+ };
7
+ export const frFR = getChartsLocalization(frFRLocalText);
@@ -0,0 +1,3 @@
1
+ export type { ChartsLocaleText } from './utils/chartsLocaleTextApi';
2
+ export * from "./enUS.js";
3
+ export * from "./frFR.js";
@@ -0,0 +1,3 @@
1
+ export * from "./enUS.js";
2
+ export * from "./frFR.js";
3
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface ChartsLocaleText {
2
+ /**
3
+ * Title displayed in the overlay if `loading` is `true`.
4
+ */
5
+ loading: string;
6
+ /**
7
+ * Title displayed in the overlay if there is no data to display.
8
+ */
9
+ noData: string;
10
+ }
11
+ export type ChartsTranslationKeys = keyof ChartsLocaleText;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ChartsLocaleText } from "./chartsLocaleTextApi.js";
2
+ /**
3
+ * Helper to pass translation to all charts thanks to the MUI theme.
4
+ * @param chartsTranslations The translation object.
5
+ * @returns an object to pass the translation by using the MUI theme default props
6
+ */
7
+ export declare const getChartsLocalization: (chartsTranslations: Partial<ChartsLocaleText>) => {
8
+ components: {
9
+ MuiChartsLocalizationProvider: {
10
+ defaultProps: {
11
+ localeText: {
12
+ loading?: string | undefined;
13
+ noData?: string | undefined;
14
+ };
15
+ };
16
+ };
17
+ };
18
+ };
@@ -0,0 +1,17 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ /**
3
+ * Helper to pass translation to all charts thanks to the MUI theme.
4
+ * @param chartsTranslations The translation object.
5
+ * @returns an object to pass the translation by using the MUI theme default props
6
+ */
7
+ export const getChartsLocalization = chartsTranslations => {
8
+ return {
9
+ components: {
10
+ MuiChartsLocalizationProvider: {
11
+ defaultProps: {
12
+ localeText: _extends({}, chartsTranslations)
13
+ }
14
+ }
15
+ }
16
+ };
17
+ };
@@ -22,6 +22,9 @@ export interface ChartsComponents<Theme = unknown> {
22
22
  defaultProps?: ComponentsProps['MuiChartsLegend'];
23
23
  styleOverrides?: ComponentsOverrides<Theme>['MuiChartsLegend'];
24
24
  };
25
+ MuiChartsLocalizationProvider?: {
26
+ defaultProps?: ComponentsProps['MuiChartsLocalizationProvider'];
27
+ };
25
28
  MuiChartsTooltip?: {
26
29
  defaultProps?: ComponentsProps['MuiChartsTooltip'];
27
30
  styleOverrides?: ComponentsOverrides<Theme>['MuiChartsTooltip'];
@@ -8,11 +8,13 @@ import { LineChartProps } from "../LineChart/LineChart.js";
8
8
  import { ScatterChartProps } from "../ScatterChart/ScatterChart.js";
9
9
  import { PieChartProps } from "../PieChart/PieChart.js";
10
10
  import { ChartsXAxisProps, ChartsYAxisProps } from "../models/axis.js";
11
+ import { ChartsLocalizationProviderProps } from "../ChartsLocalizationProvider/index.js";
11
12
  export interface ChartsComponentsPropsList {
12
13
  MuiChartsXAxis: ChartsXAxisProps;
13
14
  MuiChartsYAxis: ChartsYAxisProps;
14
15
  MuiChartsGrid: ChartsGridProps;
15
16
  MuiChartsLegend: ChartsLegendProps;
17
+ MuiChartsLocalizationProvider: ChartsLocalizationProviderProps;
16
18
  MuiChartsTooltip: ChartsTooltipProps;
17
19
  MuiChartsSurface: ChartsSurfaceProps;
18
20
 
package/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/hooks/index.js CHANGED
@@ -211,4 +211,28 @@ Object.keys(_animation).forEach(function (key) {
211
211
  return _animation[key];
212
212
  }
213
213
  });
214
+ });
215
+ var _useChartRootRef = require("./useChartRootRef");
216
+ Object.keys(_useChartRootRef).forEach(function (key) {
217
+ if (key === "default" || key === "__esModule") return;
218
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
219
+ if (key in exports && exports[key] === _useChartRootRef[key]) return;
220
+ Object.defineProperty(exports, key, {
221
+ enumerable: true,
222
+ get: function () {
223
+ return _useChartRootRef[key];
224
+ }
225
+ });
226
+ });
227
+ var _useChartsLocalization = require("./useChartsLocalization");
228
+ Object.keys(_useChartsLocalization).forEach(function (key) {
229
+ if (key === "default" || key === "__esModule") return;
230
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
231
+ if (key in exports && exports[key] === _useChartsLocalization[key]) return;
232
+ Object.defineProperty(exports, key, {
233
+ enumerable: true,
234
+ get: function () {
235
+ return _useChartsLocalization[key];
236
+ }
237
+ });
214
238
  });
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Get the ref for the root chart element.
4
+ * @returns The root chart element ref.
5
+ */
6
+ export declare function useChartRootRef(): React.RefObject<HTMLDivElement | null>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useChartRootRef = useChartRootRef;
8
+ var _ChartProvider = require("../context/ChartProvider");
9
+ /**
10
+ * Get the ref for the root chart element.
11
+ * @returns The root chart element ref.
12
+ */
13
+ function useChartRootRef() {
14
+ const context = (0, _ChartProvider.useChartContext)();
15
+ return context.chartRootRef;
16
+ }
@@ -0,0 +1 @@
1
+ export declare const useChartsLocalization: () => import("../ChartsLocalizationProvider/ChartsLocalizationProvider").ChartsLocalizationContextValue;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useChartsLocalization = void 0;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _ChartsLocalizationProvider = require("../ChartsLocalizationProvider/ChartsLocalizationProvider");
10
+ const useChartsLocalization = () => {
11
+ const localization = React.useContext(_ChartsLocalizationProvider.ChartsLocalizationContext);
12
+ if (localization === null) {
13
+ 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'));
14
+ }
15
+ return localization;
16
+ };
17
+ exports.useChartsLocalization = useChartsLocalization;
package/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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v8.0.0
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
@@ -175,6 +175,17 @@ Object.keys(_ChartsLegend).forEach(function (key) {
175
175
  }
176
176
  });
177
177
  });
178
+ var _ChartsLocalizationProvider = require("./ChartsLocalizationProvider");
179
+ Object.keys(_ChartsLocalizationProvider).forEach(function (key) {
180
+ if (key === "default" || key === "__esModule") return;
181
+ if (key in exports && exports[key] === _ChartsLocalizationProvider[key]) return;
182
+ Object.defineProperty(exports, key, {
183
+ enumerable: true,
184
+ get: function () {
185
+ return _ChartsLocalizationProvider[key];
186
+ }
187
+ });
188
+ });
178
189
  var _ChartsAxisHighlight = require("./ChartsAxisHighlight");
179
190
  Object.keys(_ChartsAxisHighlight).forEach(function (key) {
180
191
  if (key === "default" || key === "__esModule") return;
@@ -10,8 +10,7 @@ var _styles = require("@mui/material/styles");
10
10
  var _axisClasses = require("../../ChartsAxis/axisClasses");
11
11
  const AxisRoot = exports.AxisRoot = (0, _styles.styled)('g', {
12
12
  name: 'MuiChartsAxis',
13
- slot: 'Root',
14
- overridesResolver: (props, styles) => styles.root
13
+ slot: 'Root'
15
14
  })(({
16
15
  theme
17
16
  }) => ({
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ChartsWrapper = ChartsWrapper;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _styles = require("@mui/material/styles");
10
+ var _useChartRootRef = require("../../../hooks/useChartRootRef");
10
11
  var _jsxRuntime = require("react/jsx-runtime");
11
12
  const getDirection = (direction, position) => {
12
13
  if (direction === 'vertical') {
@@ -41,8 +42,7 @@ const getAlign = (direction, position) => {
41
42
  };
42
43
  const Root = (0, _styles.styled)('div', {
43
44
  name: 'MuiChartsWrapper',
44
- slot: 'Root',
45
- overridesResolver: (props, styles) => styles.root
45
+ slot: 'Root'
46
46
  })(({
47
47
  ownerState
48
48
  }) => ({
@@ -64,7 +64,9 @@ function ChartsWrapper(props) {
64
64
  children,
65
65
  sx
66
66
  } = props;
67
+ const chartRootRef = (0, _useChartRootRef.useChartRootRef)();
67
68
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, {
69
+ ref: chartRootRef,
68
70
  ownerState: props,
69
71
  sx: sx,
70
72
  children: children
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
- /* eslint-disable react-compiler/react-compiler */
5
4
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
7
6
  Object.defineProperty(exports, "__esModule", {