@mui/x-charts 7.17.0 → 7.19.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 (180) hide show
  1. package/BarChart/BarChart.js +10 -0
  2. package/BarChart/BarElement.d.ts +1 -1
  3. package/BarChart/BarLabel/BarLabel.d.ts +1 -1
  4. package/BarChart/formatter.js +5 -4
  5. package/CHANGELOG.md +208 -5
  6. package/ChartContainer/useDefaultizeAxis.d.ts +4 -4
  7. package/ChartContainer/useDefaultizeAxis.js +1 -1
  8. package/ChartsAxis/ChartsAxis.js +4 -4
  9. package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -1
  10. package/ChartsGrid/styledCommonents.d.ts +2 -2
  11. package/ChartsLegend/ChartsLegend.d.ts +2 -2
  12. package/ChartsLegend/DefaultChartsLegend.js +1 -1
  13. package/ChartsLegend/LegendPerItem.d.ts +1 -1
  14. package/ChartsLegend/LegendPerItem.js +1 -1
  15. package/ChartsLegend/PiecewiseColorLegend.js +1 -1
  16. package/ChartsReferenceLine/common.d.ts +1 -1
  17. package/ChartsTooltip/ChartsTooltipTable.d.ts +5 -5
  18. package/ChartsTooltip/index.d.ts +3 -0
  19. package/ChartsTooltip/index.js +4 -1
  20. package/ChartsTooltip/useAxisTooltip.d.ts +18 -0
  21. package/ChartsTooltip/useAxisTooltip.js +84 -0
  22. package/ChartsTooltip/useItemTooltip.d.ts +10 -0
  23. package/ChartsTooltip/useItemTooltip.js +64 -0
  24. package/ChartsTooltip/utils.d.ts +2 -1
  25. package/LineChart/AnimatedArea.d.ts +1 -1
  26. package/LineChart/AnimatedArea.js +9 -45
  27. package/LineChart/AnimatedLine.d.ts +1 -1
  28. package/LineChart/AnimatedLine.js +9 -46
  29. package/LineChart/AppearingMask.d.ts +12 -0
  30. package/LineChart/AppearingMask.js +42 -0
  31. package/LineChart/LineChart.js +10 -0
  32. package/LineChart/formatter.js +5 -5
  33. package/PieChart/PieChart.js +10 -0
  34. package/ResponsiveChartContainer/ResizableContainer.d.ts +1 -1
  35. package/ResponsiveChartContainer/ResponsiveChartContainer.d.ts +10 -0
  36. package/ResponsiveChartContainer/ResponsiveChartContainer.js +10 -0
  37. package/ResponsiveChartContainer/useChartContainerDimensions.d.ts +1 -1
  38. package/ResponsiveChartContainer/useChartContainerDimensions.js +32 -8
  39. package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +1 -1
  40. package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -2
  41. package/ScatterChart/ScatterChart.js +10 -0
  42. package/SparkLineChart/SparkLineChart.d.ts +1 -1
  43. package/SparkLineChart/SparkLineChart.js +10 -0
  44. package/context/CartesianProvider/CartesianProvider.js +3 -3
  45. package/context/CartesianProvider/defaultizeAxis.d.ts +4 -4
  46. package/context/CartesianProvider/getAxisExtremum.d.ts +1 -1
  47. package/context/CartesianProvider/getAxisExtremum.js +5 -4
  48. package/context/CartesianProvider/index.d.ts +0 -5
  49. package/context/CartesianProvider/index.js +1 -6
  50. package/context/PluginProvider/ExtremumGetter.types.d.ts +1 -0
  51. package/context/PluginProvider/Plugin.types.d.ts +4 -0
  52. package/context/PluginProvider/PluginContext.js +3 -1
  53. package/context/PluginProvider/index.d.ts +2 -0
  54. package/context/PluginProvider/index.js +3 -1
  55. package/context/PluginProvider/mergePlugins.d.ts +14 -4
  56. package/context/PluginProvider/mergePlugins.js +11 -1
  57. package/context/PluginProvider/useRadiusExtremumGetter.d.ts +4 -0
  58. package/context/PluginProvider/useRadiusExtremumGetter.js +17 -0
  59. package/context/PluginProvider/useRotationExtremumGetter.d.ts +4 -0
  60. package/context/PluginProvider/useRotationExtremumGetter.js +17 -0
  61. package/context/PolarProvider/Polar.types.d.ts +42 -0
  62. package/context/PolarProvider/Polar.types.js +1 -0
  63. package/context/PolarProvider/PolarContext.d.ts +4 -0
  64. package/context/PolarProvider/PolarContext.js +13 -0
  65. package/context/PolarProvider/PolarProvider.d.ts +4 -0
  66. package/context/PolarProvider/PolarProvider.js +49 -0
  67. package/context/PolarProvider/getAxisExtremum.d.ts +4 -0
  68. package/context/PolarProvider/getAxisExtremum.js +20 -0
  69. package/context/PolarProvider/index.d.ts +0 -0
  70. package/context/PolarProvider/index.js +0 -0
  71. package/context/PolarProvider/usePolarContext.d.ts +2 -0
  72. package/context/PolarProvider/usePolarContext.js +10 -0
  73. package/context/ZAxisContextProvider.js +1 -1
  74. package/hooks/useReducedMotion.js +2 -2
  75. package/hooks/useSeries.d.ts +4 -4
  76. package/hooks/useSeries.js +4 -4
  77. package/index.js +1 -1
  78. package/internals/components/AxisSharedComponents.d.ts +1 -1
  79. package/internals/computeAxisValue.d.ts +38 -0
  80. package/{context/CartesianProvider/computeValue.js → internals/computeAxisValue.js} +28 -15
  81. package/internals/configInit.d.ts +1 -1
  82. package/internals/defaultizeColor.d.ts +8 -8
  83. package/internals/domUtils.js +1 -1
  84. package/internals/geometry.js +3 -5
  85. package/internals/getPercentageValue.js +1 -1
  86. package/internals/index.d.ts +1 -0
  87. package/internals/index.js +1 -0
  88. package/models/axis.d.ts +20 -0
  89. package/models/seriesType/config.d.ts +6 -2
  90. package/models/seriesType/line.d.ts +5 -0
  91. package/modern/BarChart/BarChart.js +10 -0
  92. package/modern/BarChart/formatter.js +5 -4
  93. package/modern/ChartContainer/useDefaultizeAxis.js +1 -1
  94. package/modern/ChartsAxis/ChartsAxis.js +4 -4
  95. package/modern/ChartsLegend/DefaultChartsLegend.js +1 -1
  96. package/modern/ChartsLegend/LegendPerItem.js +1 -1
  97. package/modern/ChartsLegend/PiecewiseColorLegend.js +1 -1
  98. package/modern/ChartsTooltip/index.js +4 -1
  99. package/modern/ChartsTooltip/useAxisTooltip.js +84 -0
  100. package/modern/ChartsTooltip/useItemTooltip.js +64 -0
  101. package/modern/LineChart/AnimatedArea.js +9 -45
  102. package/modern/LineChart/AnimatedLine.js +9 -46
  103. package/modern/LineChart/AppearingMask.js +42 -0
  104. package/modern/LineChart/LineChart.js +10 -0
  105. package/modern/LineChart/formatter.js +5 -5
  106. package/modern/PieChart/PieChart.js +10 -0
  107. package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +10 -0
  108. package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +32 -8
  109. package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -2
  110. package/modern/ScatterChart/ScatterChart.js +10 -0
  111. package/modern/SparkLineChart/SparkLineChart.js +10 -0
  112. package/modern/context/CartesianProvider/CartesianProvider.js +3 -3
  113. package/modern/context/CartesianProvider/getAxisExtremum.js +5 -4
  114. package/modern/context/CartesianProvider/index.js +1 -6
  115. package/modern/context/PluginProvider/PluginContext.js +3 -1
  116. package/modern/context/PluginProvider/index.js +3 -1
  117. package/modern/context/PluginProvider/mergePlugins.js +11 -1
  118. package/modern/context/PluginProvider/useRadiusExtremumGetter.js +17 -0
  119. package/modern/context/PluginProvider/useRotationExtremumGetter.js +17 -0
  120. package/modern/context/PolarProvider/Polar.types.js +1 -0
  121. package/modern/context/PolarProvider/PolarContext.js +13 -0
  122. package/modern/context/PolarProvider/PolarProvider.js +49 -0
  123. package/modern/context/PolarProvider/getAxisExtremum.js +20 -0
  124. package/modern/context/PolarProvider/index.js +0 -0
  125. package/modern/context/PolarProvider/usePolarContext.js +10 -0
  126. package/modern/context/ZAxisContextProvider.js +1 -1
  127. package/modern/hooks/useReducedMotion.js +2 -2
  128. package/modern/hooks/useSeries.js +4 -4
  129. package/modern/index.js +1 -1
  130. package/modern/{context/CartesianProvider/computeValue.js → internals/computeAxisValue.js} +28 -15
  131. package/modern/internals/domUtils.js +1 -1
  132. package/modern/internals/geometry.js +3 -5
  133. package/modern/internals/getPercentageValue.js +1 -1
  134. package/modern/internals/index.js +1 -0
  135. package/node/BarChart/BarChart.js +10 -0
  136. package/node/BarChart/formatter.js +5 -4
  137. package/node/ChartContainer/useDefaultizeAxis.js +1 -1
  138. package/node/ChartsAxis/ChartsAxis.js +4 -4
  139. package/node/ChartsLegend/DefaultChartsLegend.js +1 -1
  140. package/node/ChartsLegend/LegendPerItem.js +1 -1
  141. package/node/ChartsLegend/PiecewiseColorLegend.js +1 -1
  142. package/node/ChartsTooltip/index.js +42 -1
  143. package/node/ChartsTooltip/useAxisTooltip.js +90 -0
  144. package/node/ChartsTooltip/useItemTooltip.js +71 -0
  145. package/node/LineChart/AnimatedArea.js +8 -44
  146. package/node/LineChart/AnimatedLine.js +8 -45
  147. package/node/LineChart/AppearingMask.js +48 -0
  148. package/node/LineChart/LineChart.js +10 -0
  149. package/node/LineChart/formatter.js +5 -5
  150. package/node/PieChart/PieChart.js +10 -0
  151. package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +10 -0
  152. package/node/ResponsiveChartContainer/useChartContainerDimensions.js +32 -8
  153. package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +3 -2
  154. package/node/ScatterChart/ScatterChart.js +10 -0
  155. package/node/SparkLineChart/SparkLineChart.js +10 -0
  156. package/node/context/CartesianProvider/CartesianProvider.js +3 -3
  157. package/node/context/CartesianProvider/getAxisExtremum.js +5 -4
  158. package/node/context/CartesianProvider/index.js +1 -13
  159. package/node/context/PluginProvider/PluginContext.js +3 -1
  160. package/node/context/PluginProvider/index.js +22 -0
  161. package/node/context/PluginProvider/mergePlugins.js +11 -1
  162. package/node/context/PluginProvider/useRadiusExtremumGetter.js +23 -0
  163. package/node/context/PluginProvider/useRotationExtremumGetter.js +23 -0
  164. package/node/context/PolarProvider/Polar.types.js +5 -0
  165. package/node/context/PolarProvider/PolarContext.js +20 -0
  166. package/node/context/PolarProvider/PolarProvider.js +54 -0
  167. package/node/context/PolarProvider/getAxisExtremum.js +27 -0
  168. package/node/context/PolarProvider/index.js +1 -0
  169. package/node/context/PolarProvider/usePolarContext.js +17 -0
  170. package/node/context/ZAxisContextProvider.js +1 -1
  171. package/node/hooks/useReducedMotion.js +2 -2
  172. package/node/hooks/useSeries.js +4 -4
  173. package/node/index.js +1 -1
  174. package/node/{context/CartesianProvider/computeValue.js → internals/computeAxisValue.js} +29 -16
  175. package/node/internals/domUtils.js +1 -1
  176. package/node/internals/geometry.js +3 -5
  177. package/node/internals/getPercentageValue.js +1 -1
  178. package/node/internals/index.js +12 -0
  179. package/package.json +4 -4
  180. package/context/CartesianProvider/computeValue.d.ts +0 -30
@@ -0,0 +1,18 @@
1
+ import { AxisInteractionData } from '../context/InteractionProvider';
2
+ import { SeriesId } from '../models/seriesType/common';
3
+ import { CartesianChartSeriesType, ChartsSeriesConfig } from '../models/seriesType/config';
4
+ export interface UseAxisTooltipReturnValue<SeriesT extends CartesianChartSeriesType = CartesianChartSeriesType, AxisValueT extends string | number | Date = string | number | Date> {
5
+ identifier: AxisInteractionData;
6
+ seriesItems: SeriesItem<SeriesT>[];
7
+ axisValue: AxisValueT;
8
+ axisFormattedValue: string;
9
+ }
10
+ interface SeriesItem<T extends CartesianChartSeriesType> {
11
+ seriesId: SeriesId;
12
+ color: string;
13
+ value: ChartsSeriesConfig[T]['valueType'];
14
+ formattedValue: string;
15
+ formattedLabel: string | null;
16
+ }
17
+ export declare function useAxisTooltip(): null | UseAxisTooltipReturnValue;
18
+ export {};
@@ -0,0 +1,84 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { InteractionContext } from "../context/InteractionProvider.js";
5
+ import { useSeries } from "../hooks/useSeries.js";
6
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
7
+ import { ZAxisContext } from "../context/ZAxisContextProvider.js";
8
+ import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
9
+ import { getLabel } from "../internals/getLabel.js";
10
+ import { isCartesianSeriesType } from "../internals/isCartesian.js";
11
+ import { utcFormatter } from "./utils.js";
12
+ export function useAxisTooltip() {
13
+ const {
14
+ axis
15
+ } = React.useContext(InteractionContext);
16
+ const series = useSeries();
17
+ const {
18
+ xAxis,
19
+ yAxis,
20
+ xAxisIds,
21
+ yAxisIds
22
+ } = useCartesianContext();
23
+ const {
24
+ zAxis,
25
+ zAxisIds
26
+ } = React.useContext(ZAxisContext);
27
+ const colorProcessors = useColorProcessor();
28
+
29
+ // By default use the x-axis
30
+ const isXaxis = axis.x !== null && axis.x.index !== -1;
31
+ const axisData = isXaxis ? axis.x && axis.x : axis.y && axis.y;
32
+ if (axisData === null) {
33
+ return null;
34
+ }
35
+ const {
36
+ index: dataIndex,
37
+ value: axisValue
38
+ } = axisData;
39
+ const USED_AXIS_ID = isXaxis ? xAxisIds[0] : yAxisIds[0];
40
+ const usedAxis = isXaxis ? xAxis[USED_AXIS_ID] : yAxis[USED_AXIS_ID];
41
+ const relevantSeries = Object.keys(series).filter(isCartesianSeriesType).flatMap(seriesType => {
42
+ const seriesOfType = series[seriesType];
43
+ if (!seriesOfType) {
44
+ return [];
45
+ }
46
+ return seriesOfType.seriesOrder.map(seriesId => {
47
+ const seriesToAdd = seriesOfType.series[seriesId];
48
+ const providedXAxisId = seriesToAdd.xAxisId ?? seriesToAdd.xAxisKey;
49
+ const providedYAxisId = seriesToAdd.yAxisId ?? seriesToAdd.yAxisKey;
50
+ const axisKey = isXaxis ? providedXAxisId : providedYAxisId;
51
+
52
+ // Test if the series uses the default axis
53
+ if (axisKey === undefined || axisKey === USED_AXIS_ID) {
54
+ const xAxisId = providedXAxisId ?? xAxisIds[0];
55
+ const yAxisId = providedYAxisId ?? yAxisIds[0];
56
+ const zAxisId = seriesToAdd.zAxisId ?? seriesToAdd.zAxisKey ?? zAxisIds[0];
57
+ const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[xAxisId], yAxis[yAxisId], zAxisId && zAxis[zAxisId])(dataIndex) ?? '';
58
+ const value = seriesToAdd.data[dataIndex] ?? null;
59
+ const formattedValue = seriesToAdd.valueFormatter(value, {
60
+ dataIndex
61
+ });
62
+ const formattedLabel = getLabel(seriesToAdd.label, 'tooltip') ?? null;
63
+ return {
64
+ seriesId,
65
+ color,
66
+ value,
67
+ formattedValue,
68
+ formattedLabel
69
+ };
70
+ }
71
+ return undefined;
72
+ });
73
+ }).filter(item => item != null);
74
+ const axisFormatter = usedAxis.valueFormatter ?? (v => usedAxis.scaleType === 'utc' ? utcFormatter(v) : v.toLocaleString());
75
+ const axisFormattedValue = axisFormatter(axisValue, {
76
+ location: 'tooltip'
77
+ });
78
+ return {
79
+ identifier: axis,
80
+ seriesItems: relevantSeries,
81
+ axisValue,
82
+ axisFormattedValue
83
+ };
84
+ }
@@ -0,0 +1,10 @@
1
+ import { ItemInteractionData } from '../context/InteractionProvider';
2
+ import { ChartSeriesType, ChartsSeriesConfig } from '../models/seriesType/config';
3
+ export interface UseItemTooltipReturnValue<T extends ChartSeriesType> {
4
+ identifier: ItemInteractionData<T>;
5
+ color: string;
6
+ label: string | undefined;
7
+ value: ChartsSeriesConfig[T]['valueType'];
8
+ formattedValue: string | undefined;
9
+ }
10
+ export declare function useItemTooltip<T extends ChartSeriesType>(): null | UseItemTooltipReturnValue<T>;
@@ -0,0 +1,64 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import * as React from 'react';
5
+ import { InteractionContext } from "../context/InteractionProvider.js";
6
+ import { useSeries } from "../hooks/useSeries.js";
7
+ import { useCartesianContext } from "../context/CartesianProvider/index.js";
8
+ import { ZAxisContext } from "../context/ZAxisContextProvider.js";
9
+ import { useColorProcessor } from "../context/PluginProvider/useColorProcessor.js";
10
+ import { getLabel } from "../internals/getLabel.js";
11
+ export function useItemTooltip() {
12
+ const {
13
+ item
14
+ } = React.useContext(InteractionContext);
15
+ const series = useSeries();
16
+ const {
17
+ xAxis,
18
+ yAxis,
19
+ xAxisIds,
20
+ yAxisIds
21
+ } = useCartesianContext();
22
+ const {
23
+ zAxis,
24
+ zAxisIds
25
+ } = React.useContext(ZAxisContext);
26
+ const colorProcessors = useColorProcessor();
27
+ const xAxisId = series.xAxisId ?? series.xAxisKey ?? xAxisIds[0];
28
+ const yAxisId = series.yAxisId ?? series.yAxisKey ?? yAxisIds[0];
29
+ const zAxisId = series.zAxisId ?? series.zAxisKey ?? zAxisIds[0];
30
+ if (!item || item.dataIndex === undefined) {
31
+ return null;
32
+ }
33
+ const itemSeries = series[item.type].series[item.seriesId];
34
+ const getColor = colorProcessors[itemSeries.type]?.(itemSeries, xAxisId && xAxis[xAxisId], yAxisId && yAxis[yAxisId], zAxisId && zAxis[zAxisId]) ?? (() => '');
35
+ if (itemSeries.type === 'pie') {
36
+ const point = itemSeries.data[item.dataIndex];
37
+ const label = getLabel(point.label, 'tooltip');
38
+ const value = _extends({}, point, {
39
+ label
40
+ });
41
+ const formattedValue = itemSeries.valueFormatter?.(value, {
42
+ dataIndex: item.dataIndex
43
+ });
44
+ return {
45
+ identifier: item,
46
+ color: getColor(item.dataIndex),
47
+ label,
48
+ value,
49
+ formattedValue
50
+ };
51
+ }
52
+ const label = getLabel(itemSeries.label, 'tooltip');
53
+ const value = itemSeries.data[item.dataIndex];
54
+ const formattedValue = itemSeries.valueFormatter?.(value, {
55
+ dataIndex: item.dataIndex
56
+ });
57
+ return {
58
+ identifier: item,
59
+ color: getColor(item.dataIndex),
60
+ label,
61
+ value,
62
+ formattedValue
63
+ };
64
+ }
@@ -19,7 +19,8 @@ export declare function generateVirtualElement(mousePosition: MousePosition | nu
19
19
  toJSON: () => string;
20
20
  };
21
21
  };
22
- export declare function useMouseTracker(): MousePosition | null;
22
+ export type UseMouseTrackerReturnValue = null | MousePosition;
23
+ export declare function useMouseTracker(): UseMouseTrackerReturnValue;
23
24
  export type TriggerOptions = 'item' | 'axis' | 'none';
24
25
  export declare function getTooltipHasData(trigger: TriggerOptions, displayedData: null | AxisInteractionData | ItemInteractionData<ChartSeriesType>): boolean;
25
26
  export declare function utcFormatter(v: string | number | Date): string;
@@ -1330,7 +1330,7 @@ export declare const AreaElementPath: import("@emotion/styled").StyledComponent<
1330
1330
  scrollTop?: number | import("@react-spring/shared").FluidValue<number, any> | undefined;
1331
1331
  scrollLeft?: number | import("@react-spring/shared").FluidValue<number, any> | undefined;
1332
1332
  viewBox?: string | import("@react-spring/shared").FluidValue<string, any> | undefined;
1333
- }, "string" | "end" | "accumulate" | "local" | "color" | "clip" | "style" | "unicode" | "fill" | "stroke" | "x" | "y" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "path" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "scrollTop" | "scrollLeft"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
1333
+ }, "string" | "end" | "accumulate" | "local" | "color" | "clip" | "style" | "unicode" | "fill" | "stroke" | "x" | "y" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "path" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "scrollTop" | "scrollLeft"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
1334
1334
  ownerState: AreaElementOwnerState;
1335
1335
  }, {}, {}>;
1336
1336
  export interface AnimatedAreaProps extends React.ComponentPropsWithoutRef<'path'> {
@@ -8,10 +8,9 @@ import PropTypes from 'prop-types';
8
8
  import { styled } from '@mui/material/styles';
9
9
  import { animated, useTransition } from '@react-spring/web';
10
10
  import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
11
- import { cleanId } from "../internals/cleanId.js";
12
- import { useChartId, useDrawingArea } from "../hooks/index.js";
13
11
  import { useStringInterpolator } from "../internals/useStringInterpolator.js";
14
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { AppearingMask } from "./AppearingMask.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
15
14
  export const AreaElementPath = styled(animated.path, {
16
15
  name: 'MuiAreaElement',
17
16
  slot: 'Root',
@@ -41,32 +40,7 @@ function AnimatedArea(props) {
41
40
  ownerState
42
41
  } = props,
43
42
  other = _objectWithoutPropertiesLoose(props, _excluded);
44
- const {
45
- left,
46
- top,
47
- right,
48
- bottom,
49
- width,
50
- height
51
- } = useDrawingArea();
52
- const chartId = useChartId();
53
43
  const stringInterpolator = useStringInterpolator(d);
54
- const transitionAppear = useTransition([1], {
55
- from: {
56
- animatedWidth: left
57
- },
58
- to: {
59
- animatedWidth: width + left + right
60
- },
61
- enter: {
62
- animatedWidth: width + left + right
63
- },
64
- leave: {
65
- animatedWidth: left
66
- },
67
- reset: false,
68
- immediate: skipAnimation
69
- });
70
44
  const transitionChange = useTransition([stringInterpolator], {
71
45
  from: {
72
46
  value: 0
@@ -80,23 +54,13 @@ function AnimatedArea(props) {
80
54
  reset: false,
81
55
  immediate: skipAnimation
82
56
  });
83
- const clipId = cleanId(`${chartId}-${ownerState.id}-area-clip`);
84
- return /*#__PURE__*/_jsxs(React.Fragment, {
85
- children: [/*#__PURE__*/_jsx("clipPath", {
86
- id: clipId,
87
- children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
88
- x: 0,
89
- y: 0,
90
- width: style.animatedWidth,
91
- height: top + height + bottom
92
- }))
93
- }), /*#__PURE__*/_jsx("g", {
94
- clipPath: `url(#${clipId})`,
95
- children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
96
- ownerState: ownerState,
97
- d: style.value.to(interpolator)
98
- })))
99
- })]
57
+ return /*#__PURE__*/_jsx(AppearingMask, {
58
+ skipAnimation: skipAnimation,
59
+ id: `${ownerState.id}-area-clip`,
60
+ children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(AreaElementPath, _extends({}, other, {
61
+ ownerState: ownerState,
62
+ d: style.value.to(interpolator)
63
+ })))
100
64
  });
101
65
  }
102
66
  process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
@@ -1330,7 +1330,7 @@ export declare const LineElementPath: import("@emotion/styled").StyledComponent<
1330
1330
  scrollTop?: number | import("@react-spring/shared").FluidValue<number, any> | undefined;
1331
1331
  scrollLeft?: number | import("@react-spring/shared").FluidValue<number, any> | undefined;
1332
1332
  viewBox?: string | import("@react-spring/shared").FluidValue<string, any> | undefined;
1333
- }, "string" | "end" | "accumulate" | "local" | "color" | "clip" | "style" | "unicode" | "fill" | "stroke" | "x" | "y" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "path" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "scrollTop" | "scrollLeft"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
1333
+ }, "string" | "end" | "accumulate" | "local" | "color" | "clip" | "style" | "unicode" | "fill" | "stroke" | "x" | "y" | "clipPath" | "cursor" | "direction" | "display" | "filter" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "additive" | "path" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "scrollTop" | "scrollLeft"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
1334
1334
  ownerState: LineElementOwnerState;
1335
1335
  }, {}, {}>;
1336
1336
  export interface AnimatedLineProps extends React.ComponentPropsWithoutRef<'path'> {
@@ -8,11 +8,9 @@ import PropTypes from 'prop-types';
8
8
  import { animated, useTransition } from '@react-spring/web';
9
9
  import { color as d3Color } from '@mui/x-charts-vendor/d3-color';
10
10
  import { styled } from '@mui/material/styles';
11
- import { cleanId } from "../internals/cleanId.js";
12
- import { useChartId } from "../hooks/useChartId.js";
13
- import { useDrawingArea } from "../hooks/useDrawingArea.js";
14
11
  import { useStringInterpolator } from "../internals/useStringInterpolator.js";
15
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { AppearingMask } from "./AppearingMask.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
16
14
  export const LineElementPath = styled(animated.path, {
17
15
  name: 'MuiLineElement',
18
16
  slot: 'Root',
@@ -44,32 +42,7 @@ function AnimatedLine(props) {
44
42
  ownerState
45
43
  } = props,
46
44
  other = _objectWithoutPropertiesLoose(props, _excluded);
47
- const {
48
- left,
49
- top,
50
- bottom,
51
- width,
52
- height,
53
- right
54
- } = useDrawingArea();
55
- const chartId = useChartId();
56
45
  const stringInterpolator = useStringInterpolator(d);
57
- const transitionAppear = useTransition([1], {
58
- from: {
59
- animatedWidth: left
60
- },
61
- to: {
62
- animatedWidth: width + left + right
63
- },
64
- enter: {
65
- animatedWidth: width + left + right
66
- },
67
- leave: {
68
- animatedWidth: left
69
- },
70
- reset: false,
71
- immediate: skipAnimation
72
- });
73
46
  const transitionChange = useTransition([stringInterpolator], {
74
47
  from: {
75
48
  value: 0
@@ -83,23 +56,13 @@ function AnimatedLine(props) {
83
56
  reset: false,
84
57
  immediate: skipAnimation
85
58
  });
86
- const clipId = cleanId(`${chartId}-${ownerState.id}-line-clip`);
87
- return /*#__PURE__*/_jsxs(React.Fragment, {
88
- children: [/*#__PURE__*/_jsx("clipPath", {
89
- id: clipId,
90
- children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
91
- x: 0,
92
- y: 0,
93
- width: style.animatedWidth,
94
- height: top + height + bottom
95
- }))
96
- }), /*#__PURE__*/_jsx("g", {
97
- clipPath: `url(#${clipId})`,
98
- children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(LineElementPath, _extends({}, other, {
99
- ownerState: ownerState,
100
- d: style.value.to(interpolator)
101
- })))
102
- })]
59
+ return /*#__PURE__*/_jsx(AppearingMask, {
60
+ skipAnimation: skipAnimation,
61
+ id: `${ownerState.id}-line-clip`,
62
+ children: transitionChange((style, interpolator) => /*#__PURE__*/_jsx(LineElementPath, _extends({}, other, {
63
+ ownerState: ownerState,
64
+ d: style.value.to(interpolator)
65
+ })))
103
66
  });
104
67
  }
105
68
  process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { SeriesId } from '../models/seriesType/common';
3
+ interface AppearingMaskProps {
4
+ id: SeriesId;
5
+ skipAnimation?: boolean;
6
+ children: React.ReactNode;
7
+ }
8
+ /**
9
+ * @ignore - internal component.
10
+ */
11
+ export declare function AppearingMask(props: AppearingMaskProps): React.JSX.Element;
12
+ export {};
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { animated, useTransition } from '@react-spring/web';
5
+ import { cleanId } from "../internals/cleanId.js";
6
+ import { useChartId, useDrawingArea } from "../hooks/index.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * @ignore - internal component.
10
+ */
11
+ export function AppearingMask(props) {
12
+ const drawingArea = useDrawingArea();
13
+ const chartId = useChartId();
14
+ const transitionAppear = useTransition([drawingArea], {
15
+ from: v => ({
16
+ animatedWidth: v.left
17
+ }),
18
+ enter: v => ({
19
+ animatedWidth: v.width + v.left + v.right
20
+ }),
21
+ leave: v => ({
22
+ animatedWidth: v.width + v.left + v.right
23
+ }),
24
+ reset: false,
25
+ immediate: props.skipAnimation
26
+ });
27
+ const clipId = cleanId(`${chartId}-${props.id}`);
28
+ return /*#__PURE__*/_jsxs(React.Fragment, {
29
+ children: [/*#__PURE__*/_jsx("clipPath", {
30
+ id: clipId,
31
+ children: transitionAppear(style => /*#__PURE__*/_jsx(animated.rect, {
32
+ x: 0,
33
+ y: 0,
34
+ width: style.animatedWidth,
35
+ height: drawingArea.top + drawingArea.height + drawingArea.bottom
36
+ }))
37
+ }), /*#__PURE__*/_jsx("g", {
38
+ clipPath: `url(#${clipId})`,
39
+ children: props.children
40
+ })]
41
+ });
42
+ }
@@ -200,6 +200,16 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
200
200
  * Callback fired when a mark element is clicked.
201
201
  */
202
202
  onMarkClick: PropTypes.func,
203
+ /**
204
+ * The chart will try to wait for the parent container to resolve its size
205
+ * before it renders for the first time.
206
+ *
207
+ * This can be useful in some scenarios where the chart appear to grow after
208
+ * the first render, like when used inside a grid.
209
+ *
210
+ * @default false
211
+ */
212
+ resolveSizeBeforeRender: PropTypes.bool,
203
213
  /**
204
214
  * Indicate which axis to display the right of the charts.
205
215
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -1,9 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { stack as d3Stack } from '@mui/x-charts-vendor/d3-shape';
3
+ import { warnOnce } from '@mui/x-internals/warning';
3
4
  import { getStackingGroups } from "../internals/stackSeries.js";
4
5
  import { defaultizeValueFormatter } from "../internals/defaultizeValueFormatter.js";
5
- let warnedOnce = false;
6
-
7
6
  // For now it's a copy past of bar charts formatter, but maybe will diverge later
8
7
  const formatter = (params, dataset) => {
9
8
  const {
@@ -54,9 +53,10 @@ const formatter = (params, dataset) => {
54
53
  data: dataKey ? dataset.map(data => {
55
54
  const value = data[dataKey];
56
55
  if (typeof value !== 'number') {
57
- if (process.env.NODE_ENV !== 'production' && !warnedOnce && value !== null) {
58
- warnedOnce = true;
59
- console.error([`MUI X: Your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, 'Line plots only support numbers and null values.']);
56
+ if (process.env.NODE_ENV !== 'production') {
57
+ if (value !== null) {
58
+ warnOnce([`MUI X: Your dataset key "${dataKey}" is used for plotting line, but contains nonnumerical elements.`, 'Line plots only support numbers and null values.']);
59
+ }
60
60
  }
61
61
  return null;
62
62
  }
@@ -240,6 +240,16 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
240
240
  * Callback fired when a pie arc is clicked.
241
241
  */
242
242
  onItemClick: PropTypes.func,
243
+ /**
244
+ * The chart will try to wait for the parent container to resolve its size
245
+ * before it renders for the first time.
246
+ *
247
+ * This can be useful in some scenarios where the chart appear to grow after
248
+ * the first render, like when used inside a grid.
249
+ *
250
+ * @default false
251
+ */
252
+ resolveSizeBeforeRender: PropTypes.bool,
243
253
  /**
244
254
  * Indicate which axis to display the right of the charts.
245
255
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -4,6 +4,6 @@ import type { ResponsiveChartContainerProps } from './ResponsiveChartContainer';
4
4
  *
5
5
  * @ignore - do not document.
6
6
  */
7
- export declare const ResizableContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
7
+ export declare const ResizableContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
8
  ownerState: Pick<ResponsiveChartContainerProps, "width" | "height">;
9
9
  }, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
@@ -9,6 +9,16 @@ export interface ResponsiveChartContainerProps extends Omit<ChartContainerProps,
9
9
  * The height of the chart in px. If not defined, it takes the height of the parent element.
10
10
  */
11
11
  height?: number;
12
+ /**
13
+ * The chart will try to wait for the parent container to resolve its size
14
+ * before it renders for the first time.
15
+ *
16
+ * This can be useful in some scenarios where the chart appear to grow after
17
+ * the first render, like when used inside a grid.
18
+ *
19
+ * @default false
20
+ */
21
+ resolveSizeBeforeRender?: boolean;
12
22
  }
13
23
  declare const ResponsiveChartContainer: React.ForwardRefExoticComponent<ResponsiveChartContainerProps & React.RefAttributes<unknown>>;
14
24
  export { ResponsiveChartContainer };
@@ -74,6 +74,16 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
74
74
  * If not provided, the container supports line, bar, scatter and pie charts.
75
75
  */
76
76
  plugins: PropTypes.arrayOf(PropTypes.object),
77
+ /**
78
+ * The chart will try to wait for the parent container to resolve its size
79
+ * before it renders for the first time.
80
+ *
81
+ * This can be useful in some scenarios where the chart appear to grow after
82
+ * the first render, like when used inside a grid.
83
+ *
84
+ * @default false
85
+ */
86
+ resolveSizeBeforeRender: PropTypes.bool,
77
87
  /**
78
88
  * The array of series to display.
79
89
  * Each type of series has its own specificity.