@mui/x-charts 7.0.0-beta.1 → 7.0.0-beta.3
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.d.ts +21 -5
- package/BarChart/BarChart.js +37 -13
- package/BarChart/BarElement.d.ts +20 -13
- package/BarChart/BarElement.js +1 -0
- package/BarChart/BarPlot.d.ts +3 -5
- package/BarChart/BarPlot.js +9 -10
- package/CHANGELOG.md +223 -1
- package/ChartContainer/ChartContainer.js +6 -4
- package/ChartsAxis/ChartsAxis.js +4 -4
- package/ChartsGrid/ChartsGrid.d.ts +30 -0
- package/ChartsGrid/ChartsGrid.js +128 -0
- package/ChartsGrid/chartsGridClasses.d.ts +13 -0
- package/ChartsGrid/chartsGridClasses.js +14 -0
- package/ChartsGrid/index.d.ts +2 -0
- package/ChartsGrid/index.js +27 -0
- package/ChartsGrid/package.json +6 -0
- package/ChartsLegend/ChartsLegend.d.ts +5 -54
- package/ChartsLegend/ChartsLegend.js +2 -307
- package/ChartsLegend/DefaultChartsLegend.d.ts +60 -0
- package/ChartsLegend/DefaultChartsLegend.js +294 -0
- package/ChartsLegend/index.d.ts +1 -0
- package/ChartsLegend/index.js +11 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/common.d.ts +2 -1
- package/ChartsSurface.js +6 -4
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +1 -1
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
- package/ChartsTooltip/utils.d.ts +1 -0
- package/ChartsTooltip/utils.js +7 -0
- package/ChartsXAxis/ChartsXAxis.js +15 -11
- package/ChartsYAxis/ChartsYAxis.js +3 -3
- package/Gauge/Gauge.d.ts +13 -0
- package/Gauge/Gauge.js +156 -0
- package/Gauge/GaugeContainer.d.ts +19 -0
- package/Gauge/GaugeContainer.js +216 -0
- package/Gauge/GaugeProvider.d.ts +117 -0
- package/Gauge/GaugeProvider.js +96 -0
- package/Gauge/GaugeReferenceArc.d.ts +2 -0
- package/Gauge/GaugeReferenceArc.js +44 -0
- package/Gauge/GaugeValueArc.d.ts +2 -0
- package/Gauge/GaugeValueArc.js +51 -0
- package/Gauge/GaugeValueText.d.ts +15 -0
- package/Gauge/GaugeValueText.js +77 -0
- package/Gauge/gaugeClasses.d.ts +14 -0
- package/Gauge/gaugeClasses.js +15 -0
- package/Gauge/index.d.ts +7 -0
- package/Gauge/index.js +87 -0
- package/Gauge/package.json +6 -0
- package/Gauge/utils.d.ts +19 -0
- package/Gauge/utils.js +75 -0
- package/LineChart/AnimatedArea.js +1 -1
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AreaElement.d.ts +2 -1
- package/LineChart/AreaElement.js +1 -1
- package/LineChart/LineChart.d.ts +24 -5
- package/LineChart/LineChart.js +41 -13
- package/LineChart/LineElement.d.ts +2 -1
- package/LineChart/LineElement.js +1 -1
- package/LineChart/LineHighlightElement.d.ts +3 -2
- package/LineChart/LineHighlightElement.js +2 -1
- package/LineChart/MarkElement.d.ts +3 -2
- package/LineChart/MarkElement.js +1 -0
- package/PieChart/PieArc.d.ts +7 -6
- package/PieChart/PieArc.js +10 -9
- package/PieChart/PieArcLabel.d.ts +3 -2
- package/PieChart/PieArcLabel.js +1 -0
- package/PieChart/PieArcLabelPlot.js +14 -14
- package/PieChart/PieArcPlot.js +1 -1
- package/PieChart/PieChart.d.ts +22 -0
- package/PieChart/PieChart.js +32 -8
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
- package/ResponsiveChartContainer/useChartContainerDimensions.d.ts +2 -0
- package/ResponsiveChartContainer/useChartContainerDimensions.js +76 -0
- package/ScatterChart/ScatterChart.d.ts +18 -0
- package/ScatterChart/ScatterChart.js +35 -8
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +5 -4
- package/context/CartesianContextProvider.js +8 -6
- package/esm/BarChart/BarChart.js +37 -13
- package/esm/BarChart/BarElement.js +1 -0
- package/esm/BarChart/BarPlot.js +8 -10
- package/esm/ChartContainer/ChartContainer.js +6 -4
- package/esm/ChartsAxis/ChartsAxis.js +4 -4
- package/esm/ChartsGrid/ChartsGrid.js +121 -0
- package/esm/ChartsGrid/chartsGridClasses.js +6 -0
- package/esm/ChartsGrid/index.js +2 -0
- package/esm/ChartsLegend/ChartsLegend.js +2 -307
- package/esm/ChartsLegend/DefaultChartsLegend.js +286 -0
- package/esm/ChartsLegend/index.js +1 -0
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/esm/ChartsSurface.js +6 -4
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
- package/esm/ChartsTooltip/utils.js +6 -0
- package/esm/ChartsXAxis/ChartsXAxis.js +14 -10
- package/esm/ChartsYAxis/ChartsYAxis.js +2 -2
- package/esm/Gauge/Gauge.js +149 -0
- package/esm/Gauge/GaugeContainer.js +211 -0
- package/esm/Gauge/GaugeProvider.js +85 -0
- package/esm/Gauge/GaugeReferenceArc.js +35 -0
- package/esm/Gauge/GaugeValueArc.js +42 -0
- package/esm/Gauge/GaugeValueText.js +69 -0
- package/esm/Gauge/gaugeClasses.js +7 -0
- package/esm/Gauge/index.js +7 -0
- package/esm/Gauge/utils.js +68 -0
- package/esm/LineChart/AnimatedArea.js +1 -1
- package/esm/LineChart/AnimatedLine.js +1 -1
- package/esm/LineChart/AreaElement.js +1 -1
- package/esm/LineChart/LineChart.js +41 -13
- package/esm/LineChart/LineElement.js +1 -1
- package/esm/LineChart/LineHighlightElement.js +2 -1
- package/esm/LineChart/MarkElement.js +1 -0
- package/esm/PieChart/PieArc.js +10 -9
- package/esm/PieChart/PieArcLabel.js +1 -0
- package/esm/PieChart/PieArcLabelPlot.js +14 -14
- package/esm/PieChart/PieArcPlot.js +1 -1
- package/esm/PieChart/PieChart.js +32 -8
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
- package/esm/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
- package/esm/ScatterChart/ScatterChart.js +35 -8
- package/esm/SparkLineChart/SparkLineChart.js +5 -4
- package/esm/context/CartesianContextProvider.js +8 -6
- package/esm/hooks/useTicks.js +2 -3
- package/esm/index.js +2 -0
- package/hooks/useTicks.d.ts +1 -2
- package/hooks/useTicks.js +2 -3
- package/index.d.ts +2 -0
- package/index.js +23 -1
- package/internals/defaultizeColor.d.ts +16 -16
- package/internals/defaultizeValueFormatter.d.ts +4 -7
- package/internals/stackSeries.d.ts +4 -7
- package/legacy/BarChart/BarChart.js +37 -13
- package/legacy/BarChart/BarElement.js +1 -0
- package/legacy/BarChart/BarPlot.js +10 -10
- package/legacy/ChartContainer/ChartContainer.js +6 -4
- package/legacy/ChartsAxis/ChartsAxis.js +4 -4
- package/legacy/ChartsGrid/ChartsGrid.js +119 -0
- package/legacy/ChartsGrid/chartsGridClasses.js +6 -0
- package/legacy/ChartsGrid/index.js +2 -0
- package/legacy/ChartsLegend/ChartsLegend.js +2 -323
- package/legacy/ChartsLegend/DefaultChartsLegend.js +302 -0
- package/legacy/ChartsLegend/index.js +1 -0
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/legacy/ChartsSurface.js +5 -3
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
- package/legacy/ChartsTooltip/utils.js +6 -0
- package/legacy/ChartsXAxis/ChartsXAxis.js +13 -9
- package/legacy/ChartsYAxis/ChartsYAxis.js +2 -2
- package/legacy/Gauge/Gauge.js +146 -0
- package/legacy/Gauge/GaugeContainer.js +215 -0
- package/legacy/Gauge/GaugeProvider.js +87 -0
- package/legacy/Gauge/GaugeReferenceArc.js +37 -0
- package/legacy/Gauge/GaugeValueArc.js +44 -0
- package/legacy/Gauge/GaugeValueText.js +66 -0
- package/legacy/Gauge/gaugeClasses.js +7 -0
- package/legacy/Gauge/index.js +7 -0
- package/legacy/Gauge/utils.js +84 -0
- package/legacy/LineChart/AnimatedArea.js +1 -1
- package/legacy/LineChart/AnimatedLine.js +1 -1
- package/legacy/LineChart/AreaElement.js +1 -1
- package/legacy/LineChart/LineChart.js +41 -13
- package/legacy/LineChart/LineElement.js +1 -1
- package/legacy/LineChart/LineHighlightElement.js +2 -1
- package/legacy/LineChart/MarkElement.js +1 -0
- package/legacy/PieChart/PieArc.js +11 -10
- package/legacy/PieChart/PieArcLabel.js +1 -0
- package/legacy/PieChart/PieArcLabelPlot.js +15 -15
- package/legacy/PieChart/PieArcPlot.js +1 -1
- package/legacy/PieChart/PieChart.js +32 -8
- package/legacy/ResponsiveChartContainer/ResponsiveChartContainer.js +13 -81
- package/legacy/ResponsiveChartContainer/useChartContainerDimensions.js +73 -0
- package/legacy/ScatterChart/ScatterChart.js +35 -8
- package/legacy/SparkLineChart/SparkLineChart.js +6 -5
- package/legacy/context/CartesianContextProvider.js +8 -6
- package/legacy/hooks/useTicks.js +2 -3
- package/legacy/index.js +3 -1
- package/models/axis.d.ts +7 -2
- package/models/seriesType/common.d.ts +2 -1
- package/models/seriesType/config.d.ts +7 -12
- package/models/seriesType/line.d.ts +2 -2
- package/models/seriesType/pie.d.ts +7 -3
- package/models/seriesType/scatter.d.ts +5 -2
- package/modern/BarChart/BarChart.js +37 -13
- package/modern/BarChart/BarElement.js +1 -0
- package/modern/BarChart/BarPlot.js +8 -10
- package/modern/ChartContainer/ChartContainer.js +6 -4
- package/modern/ChartsAxis/ChartsAxis.js +4 -4
- package/modern/ChartsGrid/ChartsGrid.js +121 -0
- package/modern/ChartsGrid/chartsGridClasses.js +6 -0
- package/modern/ChartsGrid/index.js +2 -0
- package/modern/ChartsLegend/ChartsLegend.js +2 -307
- package/modern/ChartsLegend/DefaultChartsLegend.js +286 -0
- package/modern/ChartsLegend/index.js +1 -0
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/modern/ChartsSurface.js +6 -4
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -1
- package/modern/ChartsTooltip/utils.js +6 -0
- package/modern/ChartsXAxis/ChartsXAxis.js +14 -10
- package/modern/ChartsYAxis/ChartsYAxis.js +2 -2
- package/modern/Gauge/Gauge.js +149 -0
- package/modern/Gauge/GaugeContainer.js +208 -0
- package/modern/Gauge/GaugeProvider.js +85 -0
- package/modern/Gauge/GaugeReferenceArc.js +35 -0
- package/modern/Gauge/GaugeValueArc.js +42 -0
- package/modern/Gauge/GaugeValueText.js +69 -0
- package/modern/Gauge/gaugeClasses.js +7 -0
- package/modern/Gauge/index.js +7 -0
- package/modern/Gauge/utils.js +68 -0
- package/modern/LineChart/AnimatedArea.js +1 -1
- package/modern/LineChart/AnimatedLine.js +1 -1
- package/modern/LineChart/AreaElement.js +1 -1
- package/modern/LineChart/LineChart.js +41 -13
- package/modern/LineChart/LineElement.js +1 -1
- package/modern/LineChart/LineHighlightElement.js +2 -1
- package/modern/LineChart/MarkElement.js +1 -0
- package/modern/PieChart/PieArc.js +10 -9
- package/modern/PieChart/PieArcLabel.js +1 -0
- package/modern/PieChart/PieArcLabelPlot.js +14 -14
- package/modern/PieChart/PieArcPlot.js +1 -1
- package/modern/PieChart/PieChart.js +32 -8
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +8 -70
- package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +66 -0
- package/modern/ScatterChart/ScatterChart.js +35 -8
- package/modern/SparkLineChart/SparkLineChart.js +5 -4
- package/modern/context/CartesianContextProvider.js +8 -6
- package/modern/hooks/useTicks.js +2 -3
- package/modern/index.js +3 -1
- package/package.json +4 -4
|
@@ -3,74 +3,10 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["width", "height"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
7
|
-
import ownerWindow from '@mui/utils/ownerWindow';
|
|
8
6
|
import { styled } from '@mui/material/styles';
|
|
9
7
|
import { ChartContainer } from '../ChartContainer';
|
|
8
|
+
import { useChartContainerDimensions } from './useChartContainerDimensions';
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const useChartDimensions = (inWidth, inHeight) => {
|
|
12
|
-
const rootRef = React.useRef(null);
|
|
13
|
-
const displayError = React.useRef(false);
|
|
14
|
-
const [width, setWidth] = React.useState(0);
|
|
15
|
-
const [height, setHeight] = React.useState(0);
|
|
16
|
-
|
|
17
|
-
// Adaptation of the `computeSizeAndPublishResizeEvent` from the grid.
|
|
18
|
-
const computeSize = React.useCallback(() => {
|
|
19
|
-
const mainEl = rootRef?.current;
|
|
20
|
-
if (!mainEl) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const win = ownerWindow(mainEl);
|
|
24
|
-
const computedStyle = win.getComputedStyle(mainEl);
|
|
25
|
-
const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;
|
|
26
|
-
const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;
|
|
27
|
-
setWidth(newWidth);
|
|
28
|
-
setHeight(newHeight);
|
|
29
|
-
}, []);
|
|
30
|
-
React.useEffect(() => {
|
|
31
|
-
// Ensure the error detection occurs after the first rendering.
|
|
32
|
-
displayError.current = true;
|
|
33
|
-
}, []);
|
|
34
|
-
useEnhancedEffect(() => {
|
|
35
|
-
if (inWidth !== undefined && inHeight !== undefined) {
|
|
36
|
-
return () => {};
|
|
37
|
-
}
|
|
38
|
-
computeSize();
|
|
39
|
-
const elementToObserve = rootRef.current;
|
|
40
|
-
if (typeof ResizeObserver === 'undefined') {
|
|
41
|
-
return () => {};
|
|
42
|
-
}
|
|
43
|
-
let animationFrame;
|
|
44
|
-
const observer = new ResizeObserver(() => {
|
|
45
|
-
// See https://github.com/mui/mui-x/issues/8733
|
|
46
|
-
animationFrame = requestAnimationFrame(() => {
|
|
47
|
-
computeSize();
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
if (elementToObserve) {
|
|
51
|
-
observer.observe(elementToObserve);
|
|
52
|
-
}
|
|
53
|
-
return () => {
|
|
54
|
-
if (animationFrame) {
|
|
55
|
-
window.cancelAnimationFrame(animationFrame);
|
|
56
|
-
}
|
|
57
|
-
if (elementToObserve) {
|
|
58
|
-
observer.unobserve(elementToObserve);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}, [computeSize, inHeight, inWidth]);
|
|
62
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
63
|
-
if (displayError.current && inWidth === undefined && width === 0) {
|
|
64
|
-
console.error(`MUI X Charts: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`);
|
|
65
|
-
displayError.current = false;
|
|
66
|
-
}
|
|
67
|
-
if (displayError.current && inHeight === undefined && height === 0) {
|
|
68
|
-
console.error(`MUI X Charts: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`);
|
|
69
|
-
displayError.current = false;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return [rootRef, inWidth ?? width, inHeight ?? height];
|
|
73
|
-
};
|
|
74
10
|
const ResizableContainer = styled('div', {
|
|
75
11
|
name: 'MuiResponsiveChart',
|
|
76
12
|
slot: 'Container'
|
|
@@ -97,7 +33,7 @@ const ResponsiveChartContainer = /*#__PURE__*/React.forwardRef(function Responsi
|
|
|
97
33
|
height: inHeight
|
|
98
34
|
} = props,
|
|
99
35
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
100
|
-
const [containerRef, width, height] =
|
|
36
|
+
const [containerRef, width, height] = useChartContainerDimensions(inWidth, inHeight);
|
|
101
37
|
return /*#__PURE__*/_jsx(ResizableContainer, {
|
|
102
38
|
ref: containerRef,
|
|
103
39
|
ownerState: {
|
|
@@ -175,7 +111,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
175
111
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
176
112
|
*/
|
|
177
113
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
178
|
-
axisId: PropTypes.string,
|
|
114
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
179
115
|
classes: PropTypes.object,
|
|
180
116
|
data: PropTypes.array,
|
|
181
117
|
dataKey: PropTypes.string,
|
|
@@ -183,13 +119,14 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
183
119
|
disableTicks: PropTypes.bool,
|
|
184
120
|
fill: PropTypes.string,
|
|
185
121
|
hideTooltip: PropTypes.bool,
|
|
186
|
-
id: PropTypes.string,
|
|
122
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
187
123
|
label: PropTypes.string,
|
|
188
124
|
labelFontSize: PropTypes.number,
|
|
189
125
|
labelStyle: PropTypes.object,
|
|
190
126
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
191
127
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
192
128
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
129
|
+
reverse: PropTypes.bool,
|
|
193
130
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
194
131
|
slotProps: PropTypes.object,
|
|
195
132
|
slots: PropTypes.object,
|
|
@@ -209,7 +146,7 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
209
146
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
210
147
|
*/
|
|
211
148
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
212
|
-
axisId: PropTypes.string,
|
|
149
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
213
150
|
classes: PropTypes.object,
|
|
214
151
|
data: PropTypes.array,
|
|
215
152
|
dataKey: PropTypes.string,
|
|
@@ -217,13 +154,14 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainer.propTypes = {
|
|
|
217
154
|
disableTicks: PropTypes.bool,
|
|
218
155
|
fill: PropTypes.string,
|
|
219
156
|
hideTooltip: PropTypes.bool,
|
|
220
|
-
id: PropTypes.string,
|
|
157
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
221
158
|
label: PropTypes.string,
|
|
222
159
|
labelFontSize: PropTypes.number,
|
|
223
160
|
labelStyle: PropTypes.object,
|
|
224
161
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
225
162
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
226
163
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
164
|
+
reverse: PropTypes.bool,
|
|
227
165
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
228
166
|
slotProps: PropTypes.object,
|
|
229
167
|
slots: PropTypes.object,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
3
|
+
import ownerWindow from '@mui/utils/ownerWindow';
|
|
4
|
+
export const useChartContainerDimensions = (inWidth, inHeight) => {
|
|
5
|
+
const rootRef = React.useRef(null);
|
|
6
|
+
const displayError = React.useRef(false);
|
|
7
|
+
const [width, setWidth] = React.useState(0);
|
|
8
|
+
const [height, setHeight] = React.useState(0);
|
|
9
|
+
|
|
10
|
+
// Adaptation of the `computeSizeAndPublishResizeEvent` from the grid.
|
|
11
|
+
const computeSize = React.useCallback(() => {
|
|
12
|
+
const mainEl = rootRef?.current;
|
|
13
|
+
if (!mainEl) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const win = ownerWindow(mainEl);
|
|
17
|
+
const computedStyle = win.getComputedStyle(mainEl);
|
|
18
|
+
const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;
|
|
19
|
+
const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;
|
|
20
|
+
setWidth(newWidth);
|
|
21
|
+
setHeight(newHeight);
|
|
22
|
+
}, []);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
// Ensure the error detection occurs after the first rendering.
|
|
25
|
+
displayError.current = true;
|
|
26
|
+
}, []);
|
|
27
|
+
useEnhancedEffect(() => {
|
|
28
|
+
if (inWidth !== undefined && inHeight !== undefined) {
|
|
29
|
+
return () => {};
|
|
30
|
+
}
|
|
31
|
+
computeSize();
|
|
32
|
+
const elementToObserve = rootRef.current;
|
|
33
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
34
|
+
return () => {};
|
|
35
|
+
}
|
|
36
|
+
let animationFrame;
|
|
37
|
+
const observer = new ResizeObserver(() => {
|
|
38
|
+
// See https://github.com/mui/mui-x/issues/8733
|
|
39
|
+
animationFrame = requestAnimationFrame(() => {
|
|
40
|
+
computeSize();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
if (elementToObserve) {
|
|
44
|
+
observer.observe(elementToObserve);
|
|
45
|
+
}
|
|
46
|
+
return () => {
|
|
47
|
+
if (animationFrame) {
|
|
48
|
+
window.cancelAnimationFrame(animationFrame);
|
|
49
|
+
}
|
|
50
|
+
if (elementToObserve) {
|
|
51
|
+
observer.unobserve(elementToObserve);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, [computeSize, inHeight, inWidth]);
|
|
55
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
56
|
+
if (displayError.current && inWidth === undefined && width === 0) {
|
|
57
|
+
console.error(`MUI X Charts: ChartContainer does not have \`width\` prop, and its container has no \`width\` defined.`);
|
|
58
|
+
displayError.current = false;
|
|
59
|
+
}
|
|
60
|
+
if (displayError.current && inHeight === undefined && height === 0) {
|
|
61
|
+
console.error(`MUI X Charts: ChartContainer does not have \`height\` prop, and its container has no \`height\` defined.`);
|
|
62
|
+
displayError.current = false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return [rootRef, inWidth ?? width, inHeight ?? height];
|
|
66
|
+
};
|
|
@@ -8,6 +8,7 @@ import { ChartsTooltip } from '../ChartsTooltip';
|
|
|
8
8
|
import { ChartsLegend } from '../ChartsLegend';
|
|
9
9
|
import { ChartsAxisHighlight } from '../ChartsAxisHighlight';
|
|
10
10
|
import { ChartsVoronoiHandler } from '../ChartsVoronoiHandler/ChartsVoronoiHandler';
|
|
11
|
+
import { ChartsGrid } from '../ChartsGrid';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
/**
|
|
@@ -35,6 +36,7 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props,
|
|
|
35
36
|
margin,
|
|
36
37
|
colors,
|
|
37
38
|
sx,
|
|
39
|
+
grid,
|
|
38
40
|
topAxis,
|
|
39
41
|
leftAxis,
|
|
40
42
|
rightAxis,
|
|
@@ -66,6 +68,9 @@ const ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props,
|
|
|
66
68
|
bottomAxis: bottomAxis,
|
|
67
69
|
slots: slots,
|
|
68
70
|
slotProps: slotProps
|
|
71
|
+
}), grid && /*#__PURE__*/_jsx(ChartsGrid, {
|
|
72
|
+
vertical: grid.vertical,
|
|
73
|
+
horizontal: grid.horizontal
|
|
69
74
|
}), /*#__PURE__*/_jsx(ScatterPlot, {
|
|
70
75
|
slots: slots,
|
|
71
76
|
slotProps: slotProps,
|
|
@@ -86,6 +91,11 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
86
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
87
92
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
88
93
|
// ----------------------------------------------------------------------
|
|
94
|
+
/**
|
|
95
|
+
* The configuration of axes highlight.
|
|
96
|
+
* @see See {@link https://mui.com/x/react-charts/tooltip/#highlights highlight docs} for more details.
|
|
97
|
+
* @default { x: 'none', y: 'none' }
|
|
98
|
+
*/
|
|
89
99
|
axisHighlight: PropTypes.shape({
|
|
90
100
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
91
101
|
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
@@ -96,7 +106,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
96
106
|
* @default xAxisIds[0] The id of the first provided axis
|
|
97
107
|
*/
|
|
98
108
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
99
|
-
axisId: PropTypes.string,
|
|
109
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
100
110
|
classes: PropTypes.object,
|
|
101
111
|
disableLine: PropTypes.bool,
|
|
102
112
|
disableTicks: PropTypes.bool,
|
|
@@ -140,6 +150,13 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
140
150
|
* @default false
|
|
141
151
|
*/
|
|
142
152
|
disableVoronoi: PropTypes.bool,
|
|
153
|
+
/**
|
|
154
|
+
* Option to display a cartesian grid in the background.
|
|
155
|
+
*/
|
|
156
|
+
grid: PropTypes.shape({
|
|
157
|
+
horizontal: PropTypes.bool,
|
|
158
|
+
vertical: PropTypes.bool
|
|
159
|
+
}),
|
|
143
160
|
/**
|
|
144
161
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
145
162
|
* @default undefined
|
|
@@ -151,7 +168,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
151
168
|
* @default yAxisIds[0] The id of the first provided axis
|
|
152
169
|
*/
|
|
153
170
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
154
|
-
axisId: PropTypes.string,
|
|
171
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
155
172
|
classes: PropTypes.object,
|
|
156
173
|
disableLine: PropTypes.bool,
|
|
157
174
|
disableTicks: PropTypes.bool,
|
|
@@ -210,7 +227,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
210
227
|
* @default null
|
|
211
228
|
*/
|
|
212
229
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
213
|
-
axisId: PropTypes.string,
|
|
230
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
214
231
|
classes: PropTypes.object,
|
|
215
232
|
disableLine: PropTypes.bool,
|
|
216
233
|
disableTicks: PropTypes.bool,
|
|
@@ -231,6 +248,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
231
248
|
tickNumber: PropTypes.number,
|
|
232
249
|
tickSize: PropTypes.number
|
|
233
250
|
}), PropTypes.string]),
|
|
251
|
+
/**
|
|
252
|
+
* The series to display in the scatter chart.
|
|
253
|
+
*/
|
|
234
254
|
series: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
235
255
|
/**
|
|
236
256
|
* The props used for each component slot.
|
|
@@ -244,6 +264,11 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
244
264
|
slots: PropTypes.object,
|
|
245
265
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
246
266
|
title: PropTypes.string,
|
|
267
|
+
/**
|
|
268
|
+
* The configuration of the tooltip.
|
|
269
|
+
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
270
|
+
* @default { trigger: 'item' }
|
|
271
|
+
*/
|
|
247
272
|
tooltip: PropTypes.shape({
|
|
248
273
|
axisContent: PropTypes.elementType,
|
|
249
274
|
classes: PropTypes.object,
|
|
@@ -258,7 +283,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
258
283
|
* @default null
|
|
259
284
|
*/
|
|
260
285
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
261
|
-
axisId: PropTypes.string,
|
|
286
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
262
287
|
classes: PropTypes.object,
|
|
263
288
|
disableLine: PropTypes.bool,
|
|
264
289
|
disableTicks: PropTypes.bool,
|
|
@@ -301,7 +326,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
301
326
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
302
327
|
*/
|
|
303
328
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
304
|
-
axisId: PropTypes.string,
|
|
329
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
305
330
|
classes: PropTypes.object,
|
|
306
331
|
data: PropTypes.array,
|
|
307
332
|
dataKey: PropTypes.string,
|
|
@@ -309,13 +334,14 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
309
334
|
disableTicks: PropTypes.bool,
|
|
310
335
|
fill: PropTypes.string,
|
|
311
336
|
hideTooltip: PropTypes.bool,
|
|
312
|
-
id: PropTypes.string,
|
|
337
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
313
338
|
label: PropTypes.string,
|
|
314
339
|
labelFontSize: PropTypes.number,
|
|
315
340
|
labelStyle: PropTypes.object,
|
|
316
341
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
317
342
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
318
343
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
344
|
+
reverse: PropTypes.bool,
|
|
319
345
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
320
346
|
slotProps: PropTypes.object,
|
|
321
347
|
slots: PropTypes.object,
|
|
@@ -335,7 +361,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
335
361
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
336
362
|
*/
|
|
337
363
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
338
|
-
axisId: PropTypes.string,
|
|
364
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
339
365
|
classes: PropTypes.object,
|
|
340
366
|
data: PropTypes.array,
|
|
341
367
|
dataKey: PropTypes.string,
|
|
@@ -343,13 +369,14 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
343
369
|
disableTicks: PropTypes.bool,
|
|
344
370
|
fill: PropTypes.string,
|
|
345
371
|
hideTooltip: PropTypes.bool,
|
|
346
|
-
id: PropTypes.string,
|
|
372
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
347
373
|
label: PropTypes.string,
|
|
348
374
|
labelFontSize: PropTypes.number,
|
|
349
375
|
labelStyle: PropTypes.object,
|
|
350
376
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
351
377
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
352
378
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
379
|
+
reverse: PropTypes.bool,
|
|
353
380
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
354
381
|
slotProps: PropTypes.object,
|
|
355
382
|
slots: PropTypes.object,
|
|
@@ -42,7 +42,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
42
42
|
slotProps,
|
|
43
43
|
data,
|
|
44
44
|
plotType = 'line',
|
|
45
|
-
valueFormatter =
|
|
45
|
+
valueFormatter = value => value === null ? '' : value.toString(),
|
|
46
46
|
area,
|
|
47
47
|
curve = 'linear'
|
|
48
48
|
} = props;
|
|
@@ -207,7 +207,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
207
207
|
* Formatter used by the tooltip.
|
|
208
208
|
* @param {number} value The value to format.
|
|
209
209
|
* @returns {string} the formatted value.
|
|
210
|
-
* @default (
|
|
210
|
+
* @default (value: number | null) => (value === null ? '' : value.toString())
|
|
211
211
|
*/
|
|
212
212
|
valueFormatter: PropTypes.func,
|
|
213
213
|
viewBox: PropTypes.shape({
|
|
@@ -226,7 +226,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
226
226
|
* Notice it is a single configuration object, not an array of configuration.
|
|
227
227
|
*/
|
|
228
228
|
xAxis: PropTypes.shape({
|
|
229
|
-
axisId: PropTypes.string,
|
|
229
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
230
230
|
classes: PropTypes.object,
|
|
231
231
|
data: PropTypes.array,
|
|
232
232
|
dataKey: PropTypes.string,
|
|
@@ -234,13 +234,14 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
234
234
|
disableTicks: PropTypes.bool,
|
|
235
235
|
fill: PropTypes.string,
|
|
236
236
|
hideTooltip: PropTypes.bool,
|
|
237
|
-
id: PropTypes.string,
|
|
237
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
238
238
|
label: PropTypes.string,
|
|
239
239
|
labelFontSize: PropTypes.number,
|
|
240
240
|
labelStyle: PropTypes.object,
|
|
241
241
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
242
242
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
243
243
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
244
|
+
reverse: PropTypes.bool,
|
|
244
245
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
245
246
|
slotProps: PropTypes.object,
|
|
246
247
|
slots: PropTypes.object,
|
|
@@ -107,7 +107,7 @@ function CartesianContextProvider(props) {
|
|
|
107
107
|
allXAxis.forEach((axis, axisIndex) => {
|
|
108
108
|
const isDefaultAxis = axisIndex === 0;
|
|
109
109
|
const [minData, maxData] = getAxisExtremum(axis, xExtremumGetters, isDefaultAxis);
|
|
110
|
-
const range = [drawingArea.left, drawingArea.left + drawingArea.width];
|
|
110
|
+
const range = axis.reverse ? [drawingArea.left + drawingArea.width, drawingArea.left] : [drawingArea.left, drawingArea.left + drawingArea.width];
|
|
111
111
|
if (isBandScaleConfig(axis)) {
|
|
112
112
|
const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;
|
|
113
113
|
const barGapRatio = axis.barGapRatio ?? DEFAULT_BAR_GAP_RATIO;
|
|
@@ -156,7 +156,7 @@ function CartesianContextProvider(props) {
|
|
|
156
156
|
allYAxis.forEach((axis, axisIndex) => {
|
|
157
157
|
const isDefaultAxis = axisIndex === 0;
|
|
158
158
|
const [minData, maxData] = getAxisExtremum(axis, yExtremumGetters, isDefaultAxis);
|
|
159
|
-
const range = [drawingArea.top + drawingArea.height, drawingArea.top];
|
|
159
|
+
const range = axis.reverse ? [drawingArea.top, drawingArea.top + drawingArea.height] : [drawingArea.top + drawingArea.height, drawingArea.top];
|
|
160
160
|
if (isBandScaleConfig(axis)) {
|
|
161
161
|
const categoryGapRatio = axis.categoryGapRatio ?? DEFAULT_CATEGORY_GAP_RATIO;
|
|
162
162
|
completedYAxis[axis.id] = _extends({
|
|
@@ -225,7 +225,7 @@ process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
|
225
225
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
226
226
|
*/
|
|
227
227
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
228
|
-
axisId: PropTypes.string,
|
|
228
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
229
229
|
classes: PropTypes.object,
|
|
230
230
|
data: PropTypes.array,
|
|
231
231
|
dataKey: PropTypes.string,
|
|
@@ -233,13 +233,14 @@ process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
|
233
233
|
disableTicks: PropTypes.bool,
|
|
234
234
|
fill: PropTypes.string,
|
|
235
235
|
hideTooltip: PropTypes.bool,
|
|
236
|
-
id: PropTypes.string,
|
|
236
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
237
237
|
label: PropTypes.string,
|
|
238
238
|
labelFontSize: PropTypes.number,
|
|
239
239
|
labelStyle: PropTypes.object,
|
|
240
240
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
241
241
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
242
242
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
243
|
+
reverse: PropTypes.bool,
|
|
243
244
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
244
245
|
slotProps: PropTypes.object,
|
|
245
246
|
slots: PropTypes.object,
|
|
@@ -259,7 +260,7 @@ process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
|
259
260
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
260
261
|
*/
|
|
261
262
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
262
|
-
axisId: PropTypes.string,
|
|
263
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
263
264
|
classes: PropTypes.object,
|
|
264
265
|
data: PropTypes.array,
|
|
265
266
|
dataKey: PropTypes.string,
|
|
@@ -267,13 +268,14 @@ process.env.NODE_ENV !== "production" ? CartesianContextProvider.propTypes = {
|
|
|
267
268
|
disableTicks: PropTypes.bool,
|
|
268
269
|
fill: PropTypes.string,
|
|
269
270
|
hideTooltip: PropTypes.bool,
|
|
270
|
-
id: PropTypes.string,
|
|
271
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
271
272
|
label: PropTypes.string,
|
|
272
273
|
labelFontSize: PropTypes.number,
|
|
273
274
|
labelStyle: PropTypes.object,
|
|
274
275
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
275
276
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
276
277
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
278
|
+
reverse: PropTypes.bool,
|
|
277
279
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
278
280
|
slotProps: PropTypes.object,
|
|
279
281
|
slots: PropTypes.object,
|
package/modern/hooks/useTicks.js
CHANGED
|
@@ -13,7 +13,7 @@ export function getTickNumber(params) {
|
|
|
13
13
|
const defaultizedTickNumber = tickNumber ?? Math.floor(Math.abs(range[1] - range[0]) / 50);
|
|
14
14
|
return Math.min(maxTicks, Math.max(minTicks, defaultizedTickNumber));
|
|
15
15
|
}
|
|
16
|
-
function useTicks(options) {
|
|
16
|
+
export function useTicks(options) {
|
|
17
17
|
const {
|
|
18
18
|
scale,
|
|
19
19
|
tickNumber,
|
|
@@ -55,5 +55,4 @@ function useTicks(options) {
|
|
|
55
55
|
labelOffset: 0
|
|
56
56
|
}));
|
|
57
57
|
}, [tickNumber, scale, valueFormatter, tickInterval]);
|
|
58
|
-
}
|
|
59
|
-
export default useTicks;
|
|
58
|
+
}
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts v7.0.0-beta.
|
|
2
|
+
* @mui/x-charts v7.0.0-beta.3
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -15,6 +15,7 @@ export * from './ChartsReferenceLine';
|
|
|
15
15
|
export * from './ChartsAxis';
|
|
16
16
|
export * from './ChartsXAxis';
|
|
17
17
|
export * from './ChartsYAxis';
|
|
18
|
+
export * from './ChartsGrid';
|
|
18
19
|
export * from './ChartsText';
|
|
19
20
|
export * from './ChartsTooltip';
|
|
20
21
|
export * from './ChartsLegend';
|
|
@@ -26,6 +27,7 @@ export * from './LineChart';
|
|
|
26
27
|
export * from './PieChart';
|
|
27
28
|
export * from './ScatterChart';
|
|
28
29
|
export * from './SparkLineChart';
|
|
30
|
+
export * from './Gauge';
|
|
29
31
|
export * from './ChartContainer';
|
|
30
32
|
export * from './ChartsSurface';
|
|
31
33
|
export * from './ResponsiveChartContainer';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.3",
|
|
4
4
|
"description": "The community edition of the charts components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.23.9",
|
|
32
|
-
"@mui/base": "^5.0.0-beta.
|
|
33
|
-
"@mui/system": "^5.15.
|
|
34
|
-
"@mui/utils": "^5.15.
|
|
32
|
+
"@mui/base": "^5.0.0-beta.36",
|
|
33
|
+
"@mui/system": "^5.15.9",
|
|
34
|
+
"@mui/utils": "^5.15.9",
|
|
35
35
|
"@react-spring/rafz": "^9.7.3",
|
|
36
36
|
"@react-spring/web": "^9.7.3",
|
|
37
37
|
"clsx": "^2.1.0",
|