@mui/x-charts 6.0.0-alpha.15 → 6.0.0-alpha.17
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 +13 -2
- package/BarChart/BarChart.js +45 -3
- package/BarChart/BarElement.d.ts +1318 -3
- package/BarChart/BarElement.js +10 -8
- package/BarChart/BarPlot.d.ts +17 -1
- package/BarChart/BarPlot.js +152 -66
- package/BarChart/formatter.js +1 -1
- package/CHANGELOG.md +131 -0
- package/ChartContainer/index.js +5 -2
- package/ChartsAxis/ChartsAxis.js +18 -2
- package/ChartsAxis/axisClasses.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -2
- package/ChartsClipPath/ChartsClipPath.js +2 -2
- package/ChartsLegend/ChartsLegend.d.ts +2 -1
- package/ChartsLegend/ChartsLegend.js +12 -8
- package/ChartsSurface.js +2 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +29 -23
- package/ChartsTooltip/ChartsItemTooltipContent.js +2 -2
- package/ChartsTooltip/ChartsTooltip.js +2 -2
- package/ChartsTooltip/utils.js +2 -2
- package/ChartsXAxis/ChartsXAxis.js +123 -35
- package/ChartsYAxis/ChartsYAxis.js +38 -16
- package/LineChart/AreaElement.d.ts +10 -0
- package/LineChart/AreaElement.js +12 -2
- package/LineChart/AreaPlot.d.ts +11 -0
- package/LineChart/AreaPlot.js +24 -7
- package/LineChart/LineChart.d.ts +10 -0
- package/LineChart/LineChart.js +36 -2
- package/LineChart/LineElement.d.ts +10 -0
- package/LineChart/LineElement.js +12 -2
- package/LineChart/LineHighlightElement.d.ts +10 -0
- package/LineChart/LineHighlightElement.js +12 -2
- package/LineChart/LineHighlightPlot.d.ts +10 -0
- package/LineChart/LineHighlightPlot.js +14 -3
- package/LineChart/LinePlot.d.ts +10 -0
- package/LineChart/LinePlot.js +22 -11
- package/LineChart/MarkElement.d.ts +10 -0
- package/LineChart/MarkElement.js +12 -2
- package/LineChart/MarkPlot.d.ts +10 -0
- package/LineChart/MarkPlot.js +40 -9
- package/LineChart/formatter.js +4 -3
- package/PieChart/PieArc.js +2 -2
- package/PieChart/PieArcLabel.js +2 -2
- package/PieChart/PieChart.d.ts +10 -0
- package/PieChart/PieChart.js +37 -2
- package/PieChart/PiePlot.d.ts +10 -0
- package/PieChart/PiePlot.js +12 -2
- package/ResponsiveChartContainer/index.js +4 -4
- package/ScatterChart/Scatter.d.ts +10 -0
- package/ScatterChart/Scatter.js +12 -2
- package/ScatterChart/ScatterChart.d.ts +10 -0
- package/ScatterChart/ScatterChart.js +36 -2
- package/ScatterChart/ScatterPlot.d.ts +10 -0
- package/ScatterChart/ScatterPlot.js +12 -2
- package/SparkLineChart/SparkLineChart.d.ts +9 -0
- package/SparkLineChart/SparkLineChart.js +16 -2
- package/context/CartesianContextProvider.js +10 -2
- package/context/DrawingProvider.js +2 -2
- package/context/HighlightProvider.js +2 -2
- package/context/InteractionProvider.js +2 -2
- package/context/SeriesContextProvider.js +2 -2
- package/esm/BarChart/BarChart.js +43 -1
- package/esm/BarChart/BarElement.js +7 -4
- package/esm/BarChart/BarPlot.js +152 -67
- package/esm/BarChart/formatter.js +1 -1
- package/esm/ChartContainer/index.js +3 -0
- package/esm/ChartsAxis/ChartsAxis.js +16 -0
- package/esm/ChartsLegend/ChartsLegend.js +10 -6
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +27 -21
- package/esm/ChartsXAxis/ChartsXAxis.js +122 -34
- package/esm/ChartsYAxis/ChartsYAxis.js +36 -14
- package/esm/LineChart/AreaElement.js +10 -0
- package/esm/LineChart/AreaPlot.js +24 -6
- package/esm/LineChart/LineChart.js +34 -0
- package/esm/LineChart/LineElement.js +10 -0
- package/esm/LineChart/LineHighlightElement.js +10 -0
- package/esm/LineChart/LineHighlightPlot.js +12 -1
- package/esm/LineChart/LinePlot.js +23 -14
- package/esm/LineChart/MarkElement.js +10 -0
- package/esm/LineChart/MarkPlot.js +38 -7
- package/esm/LineChart/formatter.js +7 -3
- package/esm/PieChart/PieChart.js +35 -0
- package/esm/PieChart/PiePlot.js +10 -0
- package/esm/ResponsiveChartContainer/index.js +2 -2
- package/esm/ScatterChart/Scatter.js +10 -0
- package/esm/ScatterChart/ScatterChart.js +34 -0
- package/esm/ScatterChart/ScatterPlot.js +10 -0
- package/esm/SparkLineChart/SparkLineChart.js +14 -0
- package/esm/context/CartesianContextProvider.js +8 -0
- package/esm/hooks/useMounted.js +16 -0
- package/esm/hooks/useReducedMotion.js +27 -0
- package/esm/hooks/useTicks.js +12 -6
- package/esm/internals/components/ChartsText.js +19 -13
- package/esm/internals/geometry.js +36 -0
- package/hooks/useAxisEvents.js +2 -2
- package/hooks/useChartDimensions.js +2 -2
- package/hooks/useDrawingArea.js +2 -2
- package/hooks/useInteractionItemProps.js +2 -2
- package/hooks/useMounted.d.ts +1 -0
- package/hooks/useMounted.js +25 -0
- package/hooks/useReducedMotion.d.ts +8 -0
- package/hooks/useReducedMotion.js +33 -0
- package/hooks/useScale.d.ts +2 -2
- package/hooks/useScale.js +2 -2
- package/hooks/useTicks.d.ts +18 -9
- package/hooks/useTicks.js +14 -8
- package/index.js +1 -1
- package/internals/components/ChartsText.d.ts +11 -8
- package/internals/components/ChartsText.js +21 -15
- package/internals/defaultizeColor.d.ts +2 -2
- package/internals/domUtils.d.ts +0 -1
- package/internals/geometry.d.ts +9 -0
- package/internals/geometry.js +42 -0
- package/legacy/BarChart/BarChart.js +43 -1
- package/legacy/BarChart/BarElement.js +6 -3
- package/legacy/BarChart/BarPlot.js +151 -63
- package/legacy/BarChart/formatter.js +1 -1
- package/legacy/ChartContainer/index.js +3 -0
- package/legacy/ChartsAxis/ChartsAxis.js +16 -0
- package/legacy/ChartsLegend/ChartsLegend.js +14 -7
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +5 -1
- package/legacy/ChartsXAxis/ChartsXAxis.js +126 -36
- package/legacy/ChartsYAxis/ChartsYAxis.js +36 -14
- package/legacy/LineChart/AreaElement.js +10 -0
- package/legacy/LineChart/AreaPlot.js +27 -7
- package/legacy/LineChart/LineChart.js +34 -0
- package/legacy/LineChart/LineElement.js +10 -0
- package/legacy/LineChart/LineHighlightElement.js +10 -0
- package/legacy/LineChart/LineHighlightPlot.js +12 -1
- package/legacy/LineChart/LinePlot.js +25 -12
- package/legacy/LineChart/MarkElement.js +10 -0
- package/legacy/LineChart/MarkPlot.js +37 -7
- package/legacy/LineChart/formatter.js +7 -3
- package/legacy/PieChart/PieChart.js +35 -0
- package/legacy/PieChart/PiePlot.js +10 -0
- package/legacy/ResponsiveChartContainer/index.js +2 -2
- package/legacy/ScatterChart/Scatter.js +10 -0
- package/legacy/ScatterChart/ScatterChart.js +34 -0
- package/legacy/ScatterChart/ScatterPlot.js +10 -0
- package/legacy/SparkLineChart/SparkLineChart.js +14 -0
- package/legacy/context/CartesianContextProvider.js +8 -0
- package/legacy/hooks/useMounted.js +21 -0
- package/legacy/hooks/useReducedMotion.js +27 -0
- package/legacy/hooks/useTicks.js +13 -6
- package/legacy/index.js +1 -1
- package/legacy/internals/components/ChartsText.js +17 -15
- package/legacy/internals/geometry.js +37 -0
- package/models/axis.d.ts +19 -2
- package/models/seriesType/line.d.ts +3 -3
- package/modern/BarChart/BarChart.js +43 -1
- package/modern/BarChart/BarElement.js +7 -4
- package/modern/BarChart/BarPlot.js +149 -65
- package/modern/BarChart/formatter.js +1 -1
- package/modern/ChartContainer/index.js +3 -0
- package/modern/ChartsAxis/ChartsAxis.js +16 -0
- package/modern/ChartsLegend/ChartsLegend.js +10 -6
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +27 -21
- package/modern/ChartsXAxis/ChartsXAxis.js +122 -34
- package/modern/ChartsYAxis/ChartsYAxis.js +36 -14
- package/modern/LineChart/AreaElement.js +10 -0
- package/modern/LineChart/AreaPlot.js +22 -5
- package/modern/LineChart/LineChart.js +34 -0
- package/modern/LineChart/LineElement.js +10 -0
- package/modern/LineChart/LineHighlightElement.js +10 -0
- package/modern/LineChart/LineHighlightPlot.js +12 -1
- package/modern/LineChart/LinePlot.js +20 -9
- package/modern/LineChart/MarkElement.js +10 -0
- package/modern/LineChart/MarkPlot.js +38 -7
- package/modern/LineChart/formatter.js +4 -3
- package/modern/PieChart/PieChart.js +35 -0
- package/modern/PieChart/PiePlot.js +10 -0
- package/modern/ResponsiveChartContainer/index.js +2 -2
- package/modern/ScatterChart/Scatter.js +10 -0
- package/modern/ScatterChart/ScatterChart.js +34 -0
- package/modern/ScatterChart/ScatterPlot.js +10 -0
- package/modern/SparkLineChart/SparkLineChart.js +14 -0
- package/modern/context/CartesianContextProvider.js +8 -0
- package/modern/hooks/useMounted.js +16 -0
- package/modern/hooks/useReducedMotion.js +27 -0
- package/modern/hooks/useTicks.js +12 -6
- package/modern/index.js +1 -1
- package/modern/internals/components/ChartsText.js +19 -13
- package/modern/internals/geometry.js +36 -0
- package/package.json +5 -3
package/LineChart/MarkPlot.js
CHANGED
|
@@ -15,8 +15,18 @@ var _MarkElement = require("./MarkElement");
|
|
|
15
15
|
var _useScale = require("../hooks/useScale");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["slots", "slotProps"];
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
/**
|
|
21
|
+
* Demos:
|
|
22
|
+
*
|
|
23
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
24
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
25
|
+
*
|
|
26
|
+
* API:
|
|
27
|
+
*
|
|
28
|
+
* - [MarkPlot API](https://mui.com/x/api/charts/mark-plot/)
|
|
29
|
+
*/
|
|
20
30
|
function MarkPlot(props) {
|
|
21
31
|
const {
|
|
22
32
|
slots,
|
|
@@ -50,6 +60,7 @@ function MarkPlot(props) {
|
|
|
50
60
|
xAxisKey = defaultXAxisId,
|
|
51
61
|
yAxisKey = defaultYAxisId,
|
|
52
62
|
stackedData,
|
|
63
|
+
data,
|
|
53
64
|
showMark = true
|
|
54
65
|
} = series[seriesId];
|
|
55
66
|
if (showMark === false) {
|
|
@@ -76,28 +87,48 @@ function MarkPlot(props) {
|
|
|
76
87
|
throw new Error(`Axis of id "${xAxisKey}" should have data property to be able to display a line plot`);
|
|
77
88
|
}
|
|
78
89
|
return xData?.map((x, index) => {
|
|
79
|
-
const
|
|
90
|
+
const value = data[index] == null ? null : stackedData[index][1];
|
|
80
91
|
return {
|
|
81
92
|
x: xScale(x),
|
|
82
|
-
y: yScale(
|
|
93
|
+
y: value === null ? null : yScale(value),
|
|
83
94
|
position: x,
|
|
84
|
-
value
|
|
95
|
+
value,
|
|
85
96
|
index
|
|
86
97
|
};
|
|
87
|
-
}).filter(
|
|
98
|
+
}).filter(({
|
|
88
99
|
x,
|
|
89
100
|
y,
|
|
90
101
|
index,
|
|
91
102
|
position,
|
|
92
103
|
value
|
|
93
104
|
}) => {
|
|
94
|
-
|
|
105
|
+
if (value === null || y === null) {
|
|
106
|
+
// Remove missing data point
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (!isInRange({
|
|
110
|
+
x,
|
|
111
|
+
y
|
|
112
|
+
})) {
|
|
113
|
+
// Remove out of range
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (showMark === true) {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
return showMark({
|
|
95
120
|
x,
|
|
96
121
|
y,
|
|
97
122
|
index,
|
|
98
123
|
position,
|
|
99
124
|
value
|
|
100
|
-
})
|
|
125
|
+
});
|
|
126
|
+
}).map(({
|
|
127
|
+
x,
|
|
128
|
+
y,
|
|
129
|
+
index
|
|
130
|
+
}) => {
|
|
131
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Mark, (0, _extends2.default)({
|
|
101
132
|
id: seriesId,
|
|
102
133
|
dataIndex: index,
|
|
103
134
|
shape: "circle",
|
|
@@ -105,7 +136,7 @@ function MarkPlot(props) {
|
|
|
105
136
|
x: x,
|
|
106
137
|
y: y,
|
|
107
138
|
highlightScope: series[seriesId].highlightScope
|
|
108
|
-
}, slotProps?.mark), `${seriesId}-${index}`)
|
|
139
|
+
}, slotProps?.mark), `${seriesId}-${index}`);
|
|
109
140
|
});
|
|
110
141
|
});
|
|
111
142
|
})
|
package/LineChart/formatter.js
CHANGED
|
@@ -31,7 +31,7 @@ const formatter = (params, dataset) => {
|
|
|
31
31
|
d3Dataset[index][id] = value;
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
} else if (dataset === undefined) {
|
|
34
|
+
} else if (dataset === undefined && process.env.NODE_ENV !== 'production') {
|
|
35
35
|
throw new Error([`MUI: line series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -47,7 +47,8 @@ const formatter = (params, dataset) => {
|
|
|
47
47
|
// Use dataKey if needed and available
|
|
48
48
|
const dataKey = series[id].dataKey;
|
|
49
49
|
return series[id].data === undefined && dataKey !== undefined ? dataKey : id;
|
|
50
|
-
})).
|
|
50
|
+
})).value((d, key) => d[key] ?? 0) // defaultize null value to 0
|
|
51
|
+
.order(stackingOrder).offset(stackingOffset)(d3Dataset);
|
|
51
52
|
ids.forEach((id, index) => {
|
|
52
53
|
const dataKey = series[id].dataKey;
|
|
53
54
|
completedSeries[id] = (0, _extends2.default)({}, series[id], {
|
|
@@ -59,7 +60,7 @@ const formatter = (params, dataset) => {
|
|
|
59
60
|
return {
|
|
60
61
|
seriesOrder,
|
|
61
62
|
stackingGroups,
|
|
62
|
-
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v
|
|
63
|
+
series: (0, _defaultizeValueFormatter.default)(completedSeries, v => v?.toLocaleString())
|
|
63
64
|
};
|
|
64
65
|
};
|
|
65
66
|
var _default = exports.default = formatter;
|
package/PieChart/PieArc.js
CHANGED
|
@@ -20,8 +20,8 @@ var _InteractionProvider = require("../context/InteractionProvider");
|
|
|
20
20
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "innerRadius", "outerRadius", "cornerRadius", "highlighted", "faded", "onClick"];
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
25
|
function getPieArcUtilityClass(slot) {
|
|
26
26
|
return (0, _generateUtilityClass.default)('MuiPieArc', slot);
|
|
27
27
|
}
|
package/PieChart/PieArcLabel.js
CHANGED
|
@@ -20,8 +20,8 @@ var _InteractionProvider = require("../context/InteractionProvider");
|
|
|
20
20
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["id", "dataIndex", "classes", "color", "highlightScope", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel"];
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
25
|
function getPieArcLabelUtilityClass(slot) {
|
|
26
26
|
return (0, _generateUtilityClass.default)('MuiPieArcLabel', slot);
|
|
27
27
|
}
|
package/PieChart/PieChart.d.ts
CHANGED
|
@@ -29,6 +29,16 @@ export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'seri
|
|
|
29
29
|
*/
|
|
30
30
|
slotProps?: PieChartSlotComponentProps;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Demos:
|
|
34
|
+
*
|
|
35
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
36
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
37
|
+
*
|
|
38
|
+
* API:
|
|
39
|
+
*
|
|
40
|
+
* - [PieChart API](https://mui.com/x/api/charts/pie-chart/)
|
|
41
|
+
*/
|
|
32
42
|
declare function PieChart(props: PieChartProps): React.JSX.Element;
|
|
33
43
|
declare namespace PieChart {
|
|
34
44
|
var propTypes: any;
|
package/PieChart/PieChart.js
CHANGED
|
@@ -16,14 +16,25 @@ var _ChartsLegend = require("../ChartsLegend");
|
|
|
16
16
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
17
17
|
var _PiePlot = require("./PiePlot");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
const defaultMargin = {
|
|
22
22
|
top: 5,
|
|
23
23
|
bottom: 5,
|
|
24
24
|
left: 5,
|
|
25
25
|
right: 100
|
|
26
26
|
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Demos:
|
|
30
|
+
*
|
|
31
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
32
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
33
|
+
*
|
|
34
|
+
* API:
|
|
35
|
+
*
|
|
36
|
+
* - [PieChart API](https://mui.com/x/api/charts/pie-chart/)
|
|
37
|
+
*/
|
|
27
38
|
function PieChart(props) {
|
|
28
39
|
const {
|
|
29
40
|
xAxis,
|
|
@@ -113,11 +124,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
113
124
|
fill: _propTypes.default.string,
|
|
114
125
|
label: _propTypes.default.string,
|
|
115
126
|
labelFontSize: _propTypes.default.number,
|
|
127
|
+
labelStyle: _propTypes.default.object,
|
|
116
128
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
117
129
|
slotProps: _propTypes.default.object,
|
|
118
130
|
slots: _propTypes.default.object,
|
|
119
131
|
stroke: _propTypes.default.string,
|
|
120
132
|
tickFontSize: _propTypes.default.number,
|
|
133
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
134
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
135
|
+
tickLabelStyle: _propTypes.default.object,
|
|
121
136
|
tickMaxStep: _propTypes.default.number,
|
|
122
137
|
tickMinStep: _propTypes.default.number,
|
|
123
138
|
tickNumber: _propTypes.default.number,
|
|
@@ -146,11 +161,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
146
161
|
fill: _propTypes.default.string,
|
|
147
162
|
label: _propTypes.default.string,
|
|
148
163
|
labelFontSize: _propTypes.default.number,
|
|
164
|
+
labelStyle: _propTypes.default.object,
|
|
149
165
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
150
166
|
slotProps: _propTypes.default.object,
|
|
151
167
|
slots: _propTypes.default.object,
|
|
152
168
|
stroke: _propTypes.default.string,
|
|
153
169
|
tickFontSize: _propTypes.default.number,
|
|
170
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
171
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
172
|
+
tickLabelStyle: _propTypes.default.object,
|
|
154
173
|
tickMaxStep: _propTypes.default.number,
|
|
155
174
|
tickMinStep: _propTypes.default.number,
|
|
156
175
|
tickNumber: _propTypes.default.number,
|
|
@@ -190,11 +209,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
190
209
|
fill: _propTypes.default.string,
|
|
191
210
|
label: _propTypes.default.string,
|
|
192
211
|
labelFontSize: _propTypes.default.number,
|
|
212
|
+
labelStyle: _propTypes.default.object,
|
|
193
213
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
194
214
|
slotProps: _propTypes.default.object,
|
|
195
215
|
slots: _propTypes.default.object,
|
|
196
216
|
stroke: _propTypes.default.string,
|
|
197
217
|
tickFontSize: _propTypes.default.number,
|
|
218
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
219
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
220
|
+
tickLabelStyle: _propTypes.default.object,
|
|
198
221
|
tickMaxStep: _propTypes.default.number,
|
|
199
222
|
tickMinStep: _propTypes.default.number,
|
|
200
223
|
tickNumber: _propTypes.default.number,
|
|
@@ -268,11 +291,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
268
291
|
fill: _propTypes.default.string,
|
|
269
292
|
label: _propTypes.default.string,
|
|
270
293
|
labelFontSize: _propTypes.default.number,
|
|
294
|
+
labelStyle: _propTypes.default.object,
|
|
271
295
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
272
296
|
slotProps: _propTypes.default.object,
|
|
273
297
|
slots: _propTypes.default.object,
|
|
274
298
|
stroke: _propTypes.default.string,
|
|
275
299
|
tickFontSize: _propTypes.default.number,
|
|
300
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
301
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
302
|
+
tickLabelStyle: _propTypes.default.object,
|
|
276
303
|
tickMaxStep: _propTypes.default.number,
|
|
277
304
|
tickMinStep: _propTypes.default.number,
|
|
278
305
|
tickNumber: _propTypes.default.number,
|
|
@@ -297,6 +324,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
297
324
|
id: _propTypes.default.string,
|
|
298
325
|
label: _propTypes.default.string,
|
|
299
326
|
labelFontSize: _propTypes.default.number,
|
|
327
|
+
labelStyle: _propTypes.default.object,
|
|
300
328
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
301
329
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
302
330
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -305,6 +333,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
305
333
|
slots: _propTypes.default.object,
|
|
306
334
|
stroke: _propTypes.default.string,
|
|
307
335
|
tickFontSize: _propTypes.default.number,
|
|
336
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
337
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
338
|
+
tickLabelStyle: _propTypes.default.object,
|
|
308
339
|
tickMaxStep: _propTypes.default.number,
|
|
309
340
|
tickMinStep: _propTypes.default.number,
|
|
310
341
|
tickNumber: _propTypes.default.number,
|
|
@@ -323,6 +354,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
323
354
|
id: _propTypes.default.string,
|
|
324
355
|
label: _propTypes.default.string,
|
|
325
356
|
labelFontSize: _propTypes.default.number,
|
|
357
|
+
labelStyle: _propTypes.default.object,
|
|
326
358
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
327
359
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
328
360
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -331,6 +363,9 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
331
363
|
slots: _propTypes.default.object,
|
|
332
364
|
stroke: _propTypes.default.string,
|
|
333
365
|
tickFontSize: _propTypes.default.number,
|
|
366
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
367
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
368
|
+
tickLabelStyle: _propTypes.default.object,
|
|
334
369
|
tickMaxStep: _propTypes.default.number,
|
|
335
370
|
tickMinStep: _propTypes.default.number,
|
|
336
371
|
tickNumber: _propTypes.default.number,
|
package/PieChart/PiePlot.d.ts
CHANGED
|
@@ -29,6 +29,16 @@ export interface PiePlotProps {
|
|
|
29
29
|
*/
|
|
30
30
|
onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>, pieItemIdentifier: PieItemIdentifier, item: DefaultizedPieValueType) => void;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Demos:
|
|
34
|
+
*
|
|
35
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
36
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
37
|
+
*
|
|
38
|
+
* API:
|
|
39
|
+
*
|
|
40
|
+
* - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
|
|
41
|
+
*/
|
|
32
42
|
declare function PiePlot(props: PiePlotProps): React.JSX.Element | null;
|
|
33
43
|
declare namespace PiePlot {
|
|
34
44
|
var propTypes: any;
|
package/PieChart/PiePlot.js
CHANGED
|
@@ -14,8 +14,8 @@ var _PieArc = _interopRequireDefault(require("./PieArc"));
|
|
|
14
14
|
var _PieArcLabel = _interopRequireDefault(require("./PieArcLabel"));
|
|
15
15
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
const RATIO = 180 / Math.PI;
|
|
20
20
|
function getItemLabel(arcLabel, arcLabelMinAngle, item) {
|
|
21
21
|
if (!arcLabel) {
|
|
@@ -30,6 +30,16 @@ function getItemLabel(arcLabel, arcLabelMinAngle, item) {
|
|
|
30
30
|
}
|
|
31
31
|
return arcLabel(item);
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Demos:
|
|
35
|
+
*
|
|
36
|
+
* - [Pie](https://mui.com/x/react-charts/pie/)
|
|
37
|
+
* - [Pie demonstration](https://mui.com/x/react-charts/pie-demo/)
|
|
38
|
+
*
|
|
39
|
+
* API:
|
|
40
|
+
*
|
|
41
|
+
* - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
|
|
42
|
+
*/
|
|
33
43
|
function PiePlot(props) {
|
|
34
44
|
const {
|
|
35
45
|
slots,
|
|
@@ -14,8 +14,8 @@ var _styles = require("@mui/material/styles");
|
|
|
14
14
|
var _ChartContainer = require("../ChartContainer");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["width", "height"];
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
const useChartDimensions = (inWidth, inHeight) => {
|
|
20
20
|
const rootRef = React.useRef(null);
|
|
21
21
|
const displayError = React.useRef(false);
|
|
@@ -112,10 +112,10 @@ const ResponsiveChartContainer = exports.ResponsiveChartContainer = /*#__PURE__*
|
|
|
112
112
|
width: inWidth,
|
|
113
113
|
height: inHeight
|
|
114
114
|
},
|
|
115
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartContainer.ChartContainer, (0, _extends2.default)({}, other, {
|
|
115
|
+
children: width && height ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartContainer.ChartContainer, (0, _extends2.default)({}, other, {
|
|
116
116
|
width: width,
|
|
117
117
|
height: height,
|
|
118
118
|
ref: ref
|
|
119
|
-
}))
|
|
119
|
+
})) : null
|
|
120
120
|
});
|
|
121
121
|
});
|
|
@@ -8,6 +8,16 @@ export interface ScatterProps {
|
|
|
8
8
|
markerSize: number;
|
|
9
9
|
color: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Demos:
|
|
13
|
+
*
|
|
14
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
15
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
16
|
+
*
|
|
17
|
+
* API:
|
|
18
|
+
*
|
|
19
|
+
* - [Scatter API](https://mui.com/x/api/charts/scatter/)
|
|
20
|
+
*/
|
|
11
21
|
declare function Scatter(props: ScatterProps): React.JSX.Element;
|
|
12
22
|
declare namespace Scatter {
|
|
13
23
|
var propTypes: any;
|
package/ScatterChart/Scatter.js
CHANGED
|
@@ -12,8 +12,18 @@ var _useScale = require("../hooks/useScale");
|
|
|
12
12
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
/**
|
|
18
|
+
* Demos:
|
|
19
|
+
*
|
|
20
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
21
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
22
|
+
*
|
|
23
|
+
* API:
|
|
24
|
+
*
|
|
25
|
+
* - [Scatter API](https://mui.com/x/api/charts/scatter/)
|
|
26
|
+
*/
|
|
17
27
|
function Scatter(props) {
|
|
18
28
|
const {
|
|
19
29
|
series,
|
|
@@ -31,5 +31,15 @@ export interface ScatterChartProps extends Omit<ResponsiveChartContainerProps, '
|
|
|
31
31
|
*/
|
|
32
32
|
slotProps?: ScatterChartSlotComponentProps;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Demos:
|
|
36
|
+
*
|
|
37
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
38
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
39
|
+
*
|
|
40
|
+
* API:
|
|
41
|
+
*
|
|
42
|
+
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
43
|
+
*/
|
|
34
44
|
declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<unknown>>;
|
|
35
45
|
export { ScatterChart };
|
|
@@ -15,8 +15,18 @@ var _ChartsTooltip = require("../ChartsTooltip");
|
|
|
15
15
|
var _ChartsLegend = require("../ChartsLegend");
|
|
16
16
|
var _ChartsAxisHighlight = require("../ChartsAxisHighlight");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
/**
|
|
21
|
+
* Demos:
|
|
22
|
+
*
|
|
23
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
24
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
25
|
+
*
|
|
26
|
+
* API:
|
|
27
|
+
*
|
|
28
|
+
* - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
|
|
29
|
+
*/
|
|
20
30
|
const ScatterChart = exports.ScatterChart = /*#__PURE__*/React.forwardRef(function ScatterChart(props, ref) {
|
|
21
31
|
const {
|
|
22
32
|
xAxis,
|
|
@@ -93,11 +103,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
93
103
|
fill: _propTypes.default.string,
|
|
94
104
|
label: _propTypes.default.string,
|
|
95
105
|
labelFontSize: _propTypes.default.number,
|
|
106
|
+
labelStyle: _propTypes.default.object,
|
|
96
107
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
97
108
|
slotProps: _propTypes.default.object,
|
|
98
109
|
slots: _propTypes.default.object,
|
|
99
110
|
stroke: _propTypes.default.string,
|
|
100
111
|
tickFontSize: _propTypes.default.number,
|
|
112
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
113
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
114
|
+
tickLabelStyle: _propTypes.default.object,
|
|
101
115
|
tickMaxStep: _propTypes.default.number,
|
|
102
116
|
tickMinStep: _propTypes.default.number,
|
|
103
117
|
tickNumber: _propTypes.default.number,
|
|
@@ -126,11 +140,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
126
140
|
fill: _propTypes.default.string,
|
|
127
141
|
label: _propTypes.default.string,
|
|
128
142
|
labelFontSize: _propTypes.default.number,
|
|
143
|
+
labelStyle: _propTypes.default.object,
|
|
129
144
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
130
145
|
slotProps: _propTypes.default.object,
|
|
131
146
|
slots: _propTypes.default.object,
|
|
132
147
|
stroke: _propTypes.default.string,
|
|
133
148
|
tickFontSize: _propTypes.default.number,
|
|
149
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
150
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
151
|
+
tickLabelStyle: _propTypes.default.object,
|
|
134
152
|
tickMaxStep: _propTypes.default.number,
|
|
135
153
|
tickMinStep: _propTypes.default.number,
|
|
136
154
|
tickNumber: _propTypes.default.number,
|
|
@@ -169,11 +187,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
169
187
|
fill: _propTypes.default.string,
|
|
170
188
|
label: _propTypes.default.string,
|
|
171
189
|
labelFontSize: _propTypes.default.number,
|
|
190
|
+
labelStyle: _propTypes.default.object,
|
|
172
191
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
173
192
|
slotProps: _propTypes.default.object,
|
|
174
193
|
slots: _propTypes.default.object,
|
|
175
194
|
stroke: _propTypes.default.string,
|
|
176
195
|
tickFontSize: _propTypes.default.number,
|
|
196
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
197
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
198
|
+
tickLabelStyle: _propTypes.default.object,
|
|
177
199
|
tickMaxStep: _propTypes.default.number,
|
|
178
200
|
tickMinStep: _propTypes.default.number,
|
|
179
201
|
tickNumber: _propTypes.default.number,
|
|
@@ -231,11 +253,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
231
253
|
fill: _propTypes.default.string,
|
|
232
254
|
label: _propTypes.default.string,
|
|
233
255
|
labelFontSize: _propTypes.default.number,
|
|
256
|
+
labelStyle: _propTypes.default.object,
|
|
234
257
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
235
258
|
slotProps: _propTypes.default.object,
|
|
236
259
|
slots: _propTypes.default.object,
|
|
237
260
|
stroke: _propTypes.default.string,
|
|
238
261
|
tickFontSize: _propTypes.default.number,
|
|
262
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
263
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
264
|
+
tickLabelStyle: _propTypes.default.object,
|
|
239
265
|
tickMaxStep: _propTypes.default.number,
|
|
240
266
|
tickMinStep: _propTypes.default.number,
|
|
241
267
|
tickNumber: _propTypes.default.number,
|
|
@@ -260,6 +286,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
260
286
|
id: _propTypes.default.string,
|
|
261
287
|
label: _propTypes.default.string,
|
|
262
288
|
labelFontSize: _propTypes.default.number,
|
|
289
|
+
labelStyle: _propTypes.default.object,
|
|
263
290
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
264
291
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
265
292
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -268,6 +295,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
268
295
|
slots: _propTypes.default.object,
|
|
269
296
|
stroke: _propTypes.default.string,
|
|
270
297
|
tickFontSize: _propTypes.default.number,
|
|
298
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
299
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
300
|
+
tickLabelStyle: _propTypes.default.object,
|
|
271
301
|
tickMaxStep: _propTypes.default.number,
|
|
272
302
|
tickMinStep: _propTypes.default.number,
|
|
273
303
|
tickNumber: _propTypes.default.number,
|
|
@@ -286,6 +316,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
286
316
|
id: _propTypes.default.string,
|
|
287
317
|
label: _propTypes.default.string,
|
|
288
318
|
labelFontSize: _propTypes.default.number,
|
|
319
|
+
labelStyle: _propTypes.default.object,
|
|
289
320
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
290
321
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
291
322
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
@@ -294,6 +325,9 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
294
325
|
slots: _propTypes.default.object,
|
|
295
326
|
stroke: _propTypes.default.string,
|
|
296
327
|
tickFontSize: _propTypes.default.number,
|
|
328
|
+
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
329
|
+
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
330
|
+
tickLabelStyle: _propTypes.default.object,
|
|
297
331
|
tickMaxStep: _propTypes.default.number,
|
|
298
332
|
tickMinStep: _propTypes.default.number,
|
|
299
333
|
tickNumber: _propTypes.default.number,
|
|
@@ -18,6 +18,16 @@ export interface ScatterPlotProps {
|
|
|
18
18
|
*/
|
|
19
19
|
slotProps?: ScatterPlotSlotComponentProps;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Demos:
|
|
23
|
+
*
|
|
24
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
25
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
30
|
+
*/
|
|
21
31
|
declare function ScatterPlot(props: ScatterPlotProps): React.JSX.Element | null;
|
|
22
32
|
declare namespace ScatterPlot {
|
|
23
33
|
var propTypes: any;
|
|
@@ -12,8 +12,18 @@ var _Scatter = require("./Scatter");
|
|
|
12
12
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
13
13
|
var _CartesianContextProvider = require("../context/CartesianContextProvider");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
/**
|
|
18
|
+
* Demos:
|
|
19
|
+
*
|
|
20
|
+
* - [Scatter](https://mui.com/x/react-charts/scatter/)
|
|
21
|
+
* - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/)
|
|
22
|
+
*
|
|
23
|
+
* API:
|
|
24
|
+
*
|
|
25
|
+
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
26
|
+
*/
|
|
17
27
|
function ScatterPlot(props) {
|
|
18
28
|
const {
|
|
19
29
|
slots,
|