@mui/x-charts 6.0.0-alpha.6 → 6.0.0-alpha.7
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 +18 -2
- package/BarChart/BarChart.js +60 -11
- package/BarChart/BarElement.d.ts +22 -0
- package/BarChart/BarElement.js +21 -10
- package/BarChart/BarPlot.d.ts +14 -1
- package/BarChart/BarPlot.js +23 -4
- package/CHANGELOG.md +62 -0
- package/ChartsAxis/ChartsAxis.d.ts +11 -1
- package/ChartsAxis/ChartsAxis.js +51 -6
- package/ChartsLegend/ChartsLegend.d.ts +25 -2
- package/ChartsLegend/ChartsLegend.js +49 -17
- package/ChartsTooltip/ChartsTooltipTable.d.ts +2 -9
- package/ChartsXAxis/ChartsXAxis.js +44 -9
- package/ChartsYAxis/ChartsYAxis.js +44 -9
- package/LineChart/AreaElement.d.ts +22 -0
- package/LineChart/AreaElement.js +31 -11
- package/LineChart/AreaPlot.d.ts +14 -1
- package/LineChart/AreaPlot.js +29 -3
- package/LineChart/LineChart.d.ts +20 -2
- package/LineChart/LineChart.js +62 -10
- package/LineChart/LineElement.d.ts +22 -0
- package/LineChart/LineElement.js +31 -10
- package/LineChart/LinePlot.d.ts +14 -1
- package/LineChart/LinePlot.js +35 -4
- package/LineChart/MarkPlot.d.ts +24 -1
- package/LineChart/MarkPlot.js +25 -3
- package/PieChart/PieArcLabel.js +0 -1
- package/PieChart/PieChart.d.ts +14 -2
- package/PieChart/PieChart.js +51 -9
- package/PieChart/PiePlot.d.ts +27 -1
- package/PieChart/PiePlot.js +29 -6
- package/ScatterChart/ScatterChart.d.ts +18 -2
- package/ScatterChart/ScatterChart.js +55 -9
- package/ScatterChart/ScatterPlot.d.ts +24 -1
- package/ScatterChart/ScatterPlot.js +28 -4
- package/SparkLineChart/SparkLineChart.d.ts +18 -0
- package/SparkLineChart/SparkLineChart.js +28 -5
- package/colorPalettes/colorPalettes.js +2 -2
- package/context/CartesianContextProvider.js +14 -8
- package/esm/BarChart/BarChart.js +60 -11
- package/esm/BarChart/BarElement.js +21 -11
- package/esm/BarChart/BarPlot.js +23 -4
- package/esm/ChartsAxis/ChartsAxis.js +51 -6
- package/esm/ChartsLegend/ChartsLegend.js +47 -14
- package/esm/ChartsXAxis/ChartsXAxis.js +45 -9
- package/esm/ChartsYAxis/ChartsYAxis.js +45 -9
- package/esm/LineChart/AreaElement.js +31 -11
- package/esm/LineChart/AreaPlot.js +31 -4
- package/esm/LineChart/LineChart.js +62 -10
- package/esm/LineChart/LineElement.js +31 -11
- package/esm/LineChart/LinePlot.js +43 -8
- package/esm/LineChart/MarkPlot.js +28 -4
- package/esm/PieChart/PieArcLabel.js +0 -1
- package/esm/PieChart/PieChart.js +51 -9
- package/esm/PieChart/PiePlot.js +31 -6
- package/esm/ScatterChart/ScatterChart.js +55 -9
- package/esm/ScatterChart/ScatterPlot.js +29 -4
- package/esm/SparkLineChart/SparkLineChart.js +28 -5
- package/esm/colorPalettes/colorPalettes.js +2 -2
- package/esm/context/CartesianContextProvider.js +14 -8
- package/esm/hooks/useTicks.js +9 -6
- package/esm/internals/components/AxisSharedComponents.js +10 -10
- package/hooks/useTicks.d.ts +20 -5
- package/hooks/useTicks.js +9 -6
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +4 -4
- package/internals/components/AxisSharedComponents.js +15 -15
- package/legacy/BarChart/BarChart.js +60 -11
- package/legacy/BarChart/BarElement.js +20 -10
- package/legacy/BarChart/BarPlot.js +23 -4
- package/legacy/ChartsAxis/ChartsAxis.js +51 -6
- package/legacy/ChartsLegend/ChartsLegend.js +46 -15
- package/legacy/ChartsXAxis/ChartsXAxis.js +45 -9
- package/legacy/ChartsYAxis/ChartsYAxis.js +45 -9
- package/legacy/LineChart/AreaElement.js +30 -10
- package/legacy/LineChart/AreaPlot.js +29 -4
- package/legacy/LineChart/LineChart.js +62 -10
- package/legacy/LineChart/LineElement.js +30 -10
- package/legacy/LineChart/LinePlot.js +36 -5
- package/legacy/LineChart/MarkPlot.js +26 -4
- package/legacy/PieChart/PieArcLabel.js +0 -1
- package/legacy/PieChart/PieChart.js +51 -9
- package/legacy/PieChart/PiePlot.js +29 -6
- package/legacy/ScatterChart/ScatterChart.js +55 -9
- package/legacy/ScatterChart/ScatterPlot.js +27 -4
- package/legacy/SparkLineChart/SparkLineChart.js +28 -5
- package/legacy/colorPalettes/colorPalettes.js +2 -2
- package/legacy/context/CartesianContextProvider.js +14 -8
- package/legacy/hooks/useTicks.js +9 -9
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +10 -10
- package/models/axis.d.ts +24 -1
- package/modern/BarChart/BarChart.js +60 -11
- package/modern/BarChart/BarElement.js +20 -11
- package/modern/BarChart/BarPlot.js +23 -4
- package/modern/ChartsAxis/ChartsAxis.js +51 -6
- package/modern/ChartsLegend/ChartsLegend.js +46 -14
- package/modern/ChartsXAxis/ChartsXAxis.js +44 -9
- package/modern/ChartsYAxis/ChartsYAxis.js +44 -9
- package/modern/LineChart/AreaElement.js +30 -11
- package/modern/LineChart/AreaPlot.js +31 -4
- package/modern/LineChart/LineChart.js +62 -10
- package/modern/LineChart/LineElement.js +30 -11
- package/modern/LineChart/LinePlot.js +37 -5
- package/modern/LineChart/MarkPlot.js +27 -4
- package/modern/PieChart/PieArcLabel.js +0 -1
- package/modern/PieChart/PieChart.js +51 -9
- package/modern/PieChart/PiePlot.js +30 -6
- package/modern/ScatterChart/ScatterChart.js +55 -9
- package/modern/ScatterChart/ScatterPlot.js +28 -4
- package/modern/SparkLineChart/SparkLineChart.js +28 -5
- package/modern/colorPalettes/colorPalettes.js +2 -2
- package/modern/context/CartesianContextProvider.js +14 -8
- package/modern/hooks/useTicks.js +9 -6
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +10 -10
- package/package.json +2 -2
- package/themeAugmentation/components.d.ts +0 -10
- package/themeAugmentation/overrides.d.ts +0 -2
package/LineChart/LineChart.js
CHANGED
|
@@ -42,7 +42,9 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(props, ref) {
|
|
|
42
42
|
leftAxis,
|
|
43
43
|
rightAxis,
|
|
44
44
|
bottomAxis,
|
|
45
|
-
children
|
|
45
|
+
children,
|
|
46
|
+
slots,
|
|
47
|
+
slotProps
|
|
46
48
|
} = props;
|
|
47
49
|
const id = (0, _useId.default)();
|
|
48
50
|
const clipPathId = `${id}-clip-path`;
|
|
@@ -68,13 +70,27 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(props, ref) {
|
|
|
68
70
|
disableAxisListener: tooltip?.trigger !== 'axis' && axisHighlight?.x === 'none' && axisHighlight?.y === 'none',
|
|
69
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
70
72
|
clipPath: `url(#${clipPathId})`,
|
|
71
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPlot.AreaPlot, {
|
|
73
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AreaPlot.AreaPlot, {
|
|
74
|
+
slots: slots,
|
|
75
|
+
slotProps: slotProps
|
|
76
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinePlot.LinePlot, {
|
|
77
|
+
slots: slots,
|
|
78
|
+
slotProps: slotProps
|
|
79
|
+
})]
|
|
72
80
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxis.ChartsAxis, {
|
|
73
81
|
topAxis: topAxis,
|
|
74
82
|
leftAxis: leftAxis,
|
|
75
83
|
rightAxis: rightAxis,
|
|
76
|
-
bottomAxis: bottomAxis
|
|
77
|
-
|
|
84
|
+
bottomAxis: bottomAxis,
|
|
85
|
+
slots: slots,
|
|
86
|
+
slotProps: slotProps
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MarkPlot.MarkPlot, {
|
|
88
|
+
slots: slots,
|
|
89
|
+
slotProps: slotProps
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legend, {
|
|
91
|
+
slots: slots,
|
|
92
|
+
slotProps: slotProps
|
|
93
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlight)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsClipPath.ChartsClipPath, {
|
|
78
94
|
id: clipPathId
|
|
79
95
|
}), children]
|
|
80
96
|
});
|
|
@@ -103,8 +119,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
103
119
|
label: _propTypes.default.string,
|
|
104
120
|
labelFontSize: _propTypes.default.number,
|
|
105
121
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
122
|
+
slotProps: _propTypes.default.object,
|
|
123
|
+
slots: _propTypes.default.object,
|
|
106
124
|
stroke: _propTypes.default.string,
|
|
107
125
|
tickFontSize: _propTypes.default.number,
|
|
126
|
+
tickMaxStep: _propTypes.default.number,
|
|
127
|
+
tickMinStep: _propTypes.default.number,
|
|
128
|
+
tickNumber: _propTypes.default.number,
|
|
108
129
|
tickSize: _propTypes.default.number
|
|
109
130
|
}), _propTypes.default.string]),
|
|
110
131
|
children: _propTypes.default.node,
|
|
@@ -131,8 +152,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
131
152
|
label: _propTypes.default.string,
|
|
132
153
|
labelFontSize: _propTypes.default.number,
|
|
133
154
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
155
|
+
slotProps: _propTypes.default.object,
|
|
156
|
+
slots: _propTypes.default.object,
|
|
134
157
|
stroke: _propTypes.default.string,
|
|
135
158
|
tickFontSize: _propTypes.default.number,
|
|
159
|
+
tickMaxStep: _propTypes.default.number,
|
|
160
|
+
tickMinStep: _propTypes.default.number,
|
|
161
|
+
tickNumber: _propTypes.default.number,
|
|
136
162
|
tickSize: _propTypes.default.number
|
|
137
163
|
}), _propTypes.default.string]),
|
|
138
164
|
legend: _propTypes.default.shape({
|
|
@@ -149,6 +175,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
149
175
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
150
176
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
151
177
|
}),
|
|
178
|
+
slotProps: _propTypes.default.object,
|
|
179
|
+
slots: _propTypes.default.object,
|
|
152
180
|
spacing: _propTypes.default.number
|
|
153
181
|
}),
|
|
154
182
|
margin: _propTypes.default.shape({
|
|
@@ -171,8 +199,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
171
199
|
label: _propTypes.default.string,
|
|
172
200
|
labelFontSize: _propTypes.default.number,
|
|
173
201
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
202
|
+
slotProps: _propTypes.default.object,
|
|
203
|
+
slots: _propTypes.default.object,
|
|
174
204
|
stroke: _propTypes.default.string,
|
|
175
205
|
tickFontSize: _propTypes.default.number,
|
|
206
|
+
tickMaxStep: _propTypes.default.number,
|
|
207
|
+
tickMinStep: _propTypes.default.number,
|
|
208
|
+
tickNumber: _propTypes.default.number,
|
|
176
209
|
tickSize: _propTypes.default.number
|
|
177
210
|
}), _propTypes.default.string]),
|
|
178
211
|
series: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -195,6 +228,16 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
195
228
|
xAxisKey: _propTypes.default.string,
|
|
196
229
|
yAxisKey: _propTypes.default.string
|
|
197
230
|
})).isRequired,
|
|
231
|
+
/**
|
|
232
|
+
* The props used for each component slot.
|
|
233
|
+
* @default {}
|
|
234
|
+
*/
|
|
235
|
+
slotProps: _propTypes.default.object,
|
|
236
|
+
/**
|
|
237
|
+
* Overridable component slots.
|
|
238
|
+
* @default {}
|
|
239
|
+
*/
|
|
240
|
+
slots: _propTypes.default.object,
|
|
198
241
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
199
242
|
title: _propTypes.default.string,
|
|
200
243
|
tooltip: _propTypes.default.shape({
|
|
@@ -217,8 +260,13 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
217
260
|
label: _propTypes.default.string,
|
|
218
261
|
labelFontSize: _propTypes.default.number,
|
|
219
262
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
263
|
+
slotProps: _propTypes.default.object,
|
|
264
|
+
slots: _propTypes.default.object,
|
|
220
265
|
stroke: _propTypes.default.string,
|
|
221
266
|
tickFontSize: _propTypes.default.number,
|
|
267
|
+
tickMaxStep: _propTypes.default.number,
|
|
268
|
+
tickMinStep: _propTypes.default.number,
|
|
269
|
+
tickNumber: _propTypes.default.number,
|
|
222
270
|
tickSize: _propTypes.default.number
|
|
223
271
|
}), _propTypes.default.string]),
|
|
224
272
|
viewBox: _propTypes.default.shape({
|
|
@@ -241,15 +289,17 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
241
289
|
label: _propTypes.default.string,
|
|
242
290
|
labelFontSize: _propTypes.default.number,
|
|
243
291
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
244
|
-
maxTicks: _propTypes.default.number,
|
|
245
292
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
246
|
-
minTicks: _propTypes.default.number,
|
|
247
293
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
248
294
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
295
|
+
slotProps: _propTypes.default.object,
|
|
296
|
+
slots: _propTypes.default.object,
|
|
249
297
|
stroke: _propTypes.default.string,
|
|
250
298
|
tickFontSize: _propTypes.default.number,
|
|
299
|
+
tickMaxStep: _propTypes.default.number,
|
|
300
|
+
tickMinStep: _propTypes.default.number,
|
|
301
|
+
tickNumber: _propTypes.default.number,
|
|
251
302
|
tickSize: _propTypes.default.number,
|
|
252
|
-
tickSpacing: _propTypes.default.number,
|
|
253
303
|
valueFormatter: _propTypes.default.func
|
|
254
304
|
})),
|
|
255
305
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -265,15 +315,17 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
265
315
|
label: _propTypes.default.string,
|
|
266
316
|
labelFontSize: _propTypes.default.number,
|
|
267
317
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
268
|
-
maxTicks: _propTypes.default.number,
|
|
269
318
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
270
|
-
minTicks: _propTypes.default.number,
|
|
271
319
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
272
320
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
321
|
+
slotProps: _propTypes.default.object,
|
|
322
|
+
slots: _propTypes.default.object,
|
|
273
323
|
stroke: _propTypes.default.string,
|
|
274
324
|
tickFontSize: _propTypes.default.number,
|
|
325
|
+
tickMaxStep: _propTypes.default.number,
|
|
326
|
+
tickMinStep: _propTypes.default.number,
|
|
327
|
+
tickNumber: _propTypes.default.number,
|
|
275
328
|
tickSize: _propTypes.default.number,
|
|
276
|
-
tickSpacing: _propTypes.default.number,
|
|
277
329
|
valueFormatter: _propTypes.default.func
|
|
278
330
|
}))
|
|
279
331
|
} : void 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { SlotComponentProps } from '@mui/base';
|
|
2
3
|
import { HighlightScope } from '../context/HighlightProvider';
|
|
3
4
|
export interface LineElementClasses {
|
|
4
5
|
/** Styles applied to the root element. */
|
|
@@ -18,8 +19,29 @@ export interface LineElementOwnerState {
|
|
|
18
19
|
}
|
|
19
20
|
export declare function getLineElementUtilityClass(slot: string): string;
|
|
20
21
|
export declare const lineElementClasses: LineElementClasses;
|
|
22
|
+
export declare const LineElementPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
23
|
+
ownerState: LineElementOwnerState;
|
|
24
|
+
}, Pick<React.SVGProps<SVGPathElement>, keyof React.SVGProps<SVGPathElement>>, {}>;
|
|
21
25
|
export type LineElementProps = Omit<LineElementOwnerState, 'isFaded' | 'isHighlighted'> & React.ComponentPropsWithoutRef<'path'> & {
|
|
22
26
|
highlightScope?: Partial<HighlightScope>;
|
|
27
|
+
/**
|
|
28
|
+
* The props used for each component slot.
|
|
29
|
+
* @default {}
|
|
30
|
+
*/
|
|
31
|
+
slotProps?: {
|
|
32
|
+
line?: SlotComponentProps<'path', {}, LineElementOwnerState>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Overridable component slots.
|
|
36
|
+
* @default {}
|
|
37
|
+
*/
|
|
38
|
+
slots?: {
|
|
39
|
+
/**
|
|
40
|
+
* The component that renders the root.
|
|
41
|
+
* @default LineElementPath
|
|
42
|
+
*/
|
|
43
|
+
line?: React.ElementType;
|
|
44
|
+
};
|
|
23
45
|
};
|
|
24
46
|
declare function LineElement(props: LineElementProps): React.JSX.Element;
|
|
25
47
|
declare namespace LineElement {
|
package/LineChart/LineElement.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.LineElement = LineElement;
|
|
8
|
+
exports.LineElementPath = void 0;
|
|
8
9
|
exports.getLineElementUtilityClass = getLineElementUtilityClass;
|
|
9
10
|
exports.lineElementClasses = void 0;
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
@@ -13,13 +14,14 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
15
|
var _d3Color = require("d3-color");
|
|
15
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
17
|
+
var _utils = require("@mui/base/utils");
|
|
16
18
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
17
19
|
var _styles = require("@mui/material/styles");
|
|
18
20
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
19
21
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
20
22
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["id", "classes", "color", "highlightScope"];
|
|
24
|
+
const _excluded = ["id", "classes", "color", "highlightScope", "slots", "slotProps"];
|
|
23
25
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
27
|
function getLineElementUtilityClass(slot) {
|
|
@@ -53,6 +55,7 @@ const LineElementPath = (0, _styles.styled)('path', {
|
|
|
53
55
|
transition: 'opacity 0.2s ease-in, stroke 0.2s ease-in',
|
|
54
56
|
opacity: ownerState.isFaded ? 0.3 : 1
|
|
55
57
|
}));
|
|
58
|
+
exports.LineElementPath = LineElementPath;
|
|
56
59
|
LineElementPath.propTypes = {
|
|
57
60
|
// ----------------------------- Warning --------------------------------
|
|
58
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -73,7 +76,9 @@ function LineElement(props) {
|
|
|
73
76
|
id,
|
|
74
77
|
classes: innerClasses,
|
|
75
78
|
color,
|
|
76
|
-
highlightScope
|
|
79
|
+
highlightScope,
|
|
80
|
+
slots,
|
|
81
|
+
slotProps
|
|
77
82
|
} = props,
|
|
78
83
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
79
84
|
const getInteractionItemProps = (0, _useInteractionItemProps.useInteractionItemProps)(highlightScope);
|
|
@@ -96,13 +101,19 @@ function LineElement(props) {
|
|
|
96
101
|
isHighlighted
|
|
97
102
|
};
|
|
98
103
|
const classes = useUtilityClasses(ownerState);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
const Line = slots?.line ?? LineElementPath;
|
|
105
|
+
const lineProps = (0, _utils.useSlotProps)({
|
|
106
|
+
elementType: Line,
|
|
107
|
+
externalSlotProps: slotProps?.line,
|
|
108
|
+
additionalProps: (0, _extends2.default)({}, other, getInteractionItemProps({
|
|
109
|
+
type: 'line',
|
|
110
|
+
seriesId: id
|
|
111
|
+
}), {
|
|
112
|
+
className: classes.root
|
|
113
|
+
}),
|
|
114
|
+
ownerState
|
|
115
|
+
});
|
|
116
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({}, lineProps));
|
|
106
117
|
}
|
|
107
118
|
process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
|
|
108
119
|
// ----------------------------- Warning --------------------------------
|
|
@@ -113,5 +124,15 @@ process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
|
|
|
113
124
|
highlightScope: _propTypes.default.shape({
|
|
114
125
|
faded: _propTypes.default.oneOf(['global', 'none', 'series']),
|
|
115
126
|
highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
|
|
116
|
-
})
|
|
127
|
+
}),
|
|
128
|
+
/**
|
|
129
|
+
* The props used for each component slot.
|
|
130
|
+
* @default {}
|
|
131
|
+
*/
|
|
132
|
+
slotProps: _propTypes.default.object,
|
|
133
|
+
/**
|
|
134
|
+
* Overridable component slots.
|
|
135
|
+
* @default {}
|
|
136
|
+
*/
|
|
137
|
+
slots: _propTypes.default.object
|
|
117
138
|
} : void 0;
|
package/LineChart/LinePlot.d.ts
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { LineElementProps } from './LineElement';
|
|
3
|
+
export interface LinePlotSlotsComponent {
|
|
4
|
+
line?: React.JSXElementConstructor<LineElementProps>;
|
|
5
|
+
}
|
|
6
|
+
export interface LinePlotSlotComponentProps {
|
|
7
|
+
line?: Partial<LineElementProps>;
|
|
8
|
+
}
|
|
9
|
+
export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<LineElementProps, 'slots' | 'slotProps'> {
|
|
10
|
+
}
|
|
11
|
+
declare function LinePlot(props: LinePlotProps): React.JSX.Element | null;
|
|
12
|
+
declare namespace LinePlot {
|
|
13
|
+
var propTypes: any;
|
|
14
|
+
}
|
|
15
|
+
export { LinePlot };
|
package/LineChart/LinePlot.js
CHANGED
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.LinePlot = LinePlot;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
12
|
var _d3Shape = require("d3-shape");
|
|
11
13
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
12
14
|
var _CartesianContextProvider = require("../context/CartesianContextProvider");
|
|
@@ -14,9 +16,15 @@ var _LineElement = require("./LineElement");
|
|
|
14
16
|
var _useScale = require("../hooks/useScale");
|
|
15
17
|
var _getCurve = _interopRequireDefault(require("../internals/getCurve"));
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
const _excluded = ["slots", "slotProps"];
|
|
17
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
22
|
function LinePlot(props) {
|
|
23
|
+
const {
|
|
24
|
+
slots,
|
|
25
|
+
slotProps
|
|
26
|
+
} = props,
|
|
27
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
20
28
|
const seriesData = React.useContext(_SeriesContextProvider.SeriesContext).line;
|
|
21
29
|
const axisData = React.useContext(_CartesianContextProvider.CartesianContext);
|
|
22
30
|
if (seriesData === undefined) {
|
|
@@ -34,7 +42,7 @@ function LinePlot(props) {
|
|
|
34
42
|
} = axisData;
|
|
35
43
|
const defaultXAxisId = xAxisIds[0];
|
|
36
44
|
const defaultYAxisId = yAxisIds[0];
|
|
37
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({},
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({}, other, {
|
|
38
46
|
children: stackingGroups.flatMap(({
|
|
39
47
|
ids: groupIds
|
|
40
48
|
}) => {
|
|
@@ -51,18 +59,41 @@ function LinePlot(props) {
|
|
|
51
59
|
throw new Error(`Axis of id "${xAxisKey}" should have data property to be able to display a line plot`);
|
|
52
60
|
}
|
|
53
61
|
const linePath = (0, _d3Shape.line)().x(d => xScale(d.x)).y(d => yScale(d.y[1]));
|
|
62
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
63
|
+
if (xData.length !== stackedData.length) {
|
|
64
|
+
throw new Error(`MUI: data length of the x axis (${xData.length} items) does not match length of series (${stackedData.length} items)`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
54
67
|
const curve = (0, _getCurve.default)(series[seriesId].curve);
|
|
55
68
|
const d3Data = xData?.map((x, index) => ({
|
|
56
69
|
x,
|
|
57
|
-
y: stackedData[index]
|
|
70
|
+
y: stackedData[index] ?? [0, 0]
|
|
58
71
|
}));
|
|
59
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LineElement.LineElement, {
|
|
60
73
|
id: seriesId,
|
|
61
74
|
d: linePath.curve(curve)(d3Data) || undefined,
|
|
62
75
|
color: series[seriesId].color,
|
|
63
|
-
highlightScope: series[seriesId].highlightScope
|
|
76
|
+
highlightScope: series[seriesId].highlightScope,
|
|
77
|
+
slots: slots,
|
|
78
|
+
slotProps: slotProps
|
|
64
79
|
}, seriesId);
|
|
65
80
|
});
|
|
66
81
|
})
|
|
67
82
|
}));
|
|
68
|
-
}
|
|
83
|
+
}
|
|
84
|
+
process.env.NODE_ENV !== "production" ? LinePlot.propTypes = {
|
|
85
|
+
// ----------------------------- Warning --------------------------------
|
|
86
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
87
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
88
|
+
// ----------------------------------------------------------------------
|
|
89
|
+
/**
|
|
90
|
+
* The props used for each component slot.
|
|
91
|
+
* @default {}
|
|
92
|
+
*/
|
|
93
|
+
slotProps: _propTypes.default.object,
|
|
94
|
+
/**
|
|
95
|
+
* Overridable component slots.
|
|
96
|
+
* @default {}
|
|
97
|
+
*/
|
|
98
|
+
slots: _propTypes.default.object
|
|
99
|
+
} : void 0;
|
package/LineChart/MarkPlot.d.ts
CHANGED
|
@@ -1,2 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { MarkElementProps } from './MarkElement';
|
|
3
|
+
export interface MarkPlotSlotsComponent {
|
|
4
|
+
mark?: React.JSXElementConstructor<MarkElementProps>;
|
|
5
|
+
}
|
|
6
|
+
export interface MarkPlotSlotComponentProps {
|
|
7
|
+
mark?: Partial<MarkElementProps>;
|
|
8
|
+
}
|
|
9
|
+
export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Overridable component slots.
|
|
12
|
+
* @default {}
|
|
13
|
+
*/
|
|
14
|
+
slots?: MarkPlotSlotsComponent;
|
|
15
|
+
/**
|
|
16
|
+
* The props used for each component slot.
|
|
17
|
+
* @default {}
|
|
18
|
+
*/
|
|
19
|
+
slotProps?: MarkPlotSlotComponentProps;
|
|
20
|
+
}
|
|
21
|
+
declare function MarkPlot(props: MarkPlotProps): React.JSX.Element | null;
|
|
22
|
+
declare namespace MarkPlot {
|
|
23
|
+
var propTypes: any;
|
|
24
|
+
}
|
|
25
|
+
export { MarkPlot };
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MarkPlot = MarkPlot;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
var _SeriesContextProvider = require("../context/SeriesContextProvider");
|
|
11
12
|
var _CartesianContextProvider = require("../context/CartesianContextProvider");
|
|
12
13
|
var _MarkElement = require("./MarkElement");
|
|
@@ -15,8 +16,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
18
|
function MarkPlot(props) {
|
|
19
|
+
const {
|
|
20
|
+
slots,
|
|
21
|
+
slotProps
|
|
22
|
+
} = props;
|
|
18
23
|
const seriesData = React.useContext(_SeriesContextProvider.SeriesContext).line;
|
|
19
24
|
const axisData = React.useContext(_CartesianContextProvider.CartesianContext);
|
|
25
|
+
const Mark = slots?.mark ?? _MarkElement.MarkElement;
|
|
20
26
|
if (seriesData === undefined) {
|
|
21
27
|
return null;
|
|
22
28
|
}
|
|
@@ -73,7 +79,7 @@ function MarkPlot(props) {
|
|
|
73
79
|
x,
|
|
74
80
|
y,
|
|
75
81
|
index
|
|
76
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
82
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Mark, (0, _extends2.default)({
|
|
77
83
|
id: seriesId,
|
|
78
84
|
dataIndex: index,
|
|
79
85
|
shape: "circle",
|
|
@@ -81,8 +87,24 @@ function MarkPlot(props) {
|
|
|
81
87
|
x: x,
|
|
82
88
|
y: y,
|
|
83
89
|
highlightScope: series[seriesId].highlightScope
|
|
84
|
-
}, `${seriesId}-${index}`));
|
|
90
|
+
}, slotProps?.mark), `${seriesId}-${index}`));
|
|
85
91
|
});
|
|
86
92
|
})
|
|
87
93
|
}));
|
|
88
|
-
}
|
|
94
|
+
}
|
|
95
|
+
process.env.NODE_ENV !== "production" ? MarkPlot.propTypes = {
|
|
96
|
+
// ----------------------------- Warning --------------------------------
|
|
97
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
98
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
99
|
+
// ----------------------------------------------------------------------
|
|
100
|
+
/**
|
|
101
|
+
* The props used for each component slot.
|
|
102
|
+
* @default {}
|
|
103
|
+
*/
|
|
104
|
+
slotProps: _propTypes.default.object,
|
|
105
|
+
/**
|
|
106
|
+
* Overridable component slots.
|
|
107
|
+
* @default {}
|
|
108
|
+
*/
|
|
109
|
+
slots: _propTypes.default.object
|
|
110
|
+
} : void 0;
|
package/PieChart/PieArcLabel.js
CHANGED
package/PieChart/PieChart.d.ts
CHANGED
|
@@ -4,14 +4,26 @@ import { ChartsAxisProps } from '../ChartsAxis/ChartsAxis';
|
|
|
4
4
|
import { PieSeriesType } from '../models/seriesType';
|
|
5
5
|
import { MakeOptional } from '../models/helpers';
|
|
6
6
|
import { ChartsTooltipProps } from '../ChartsTooltip';
|
|
7
|
-
import { ChartsLegendProps } from '../ChartsLegend';
|
|
7
|
+
import { ChartsLegendProps, ChartsLegendSlotComponentProps, ChartsLegendSlotsComponent } from '../ChartsLegend';
|
|
8
8
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
9
|
+
import { PiePlotSlotComponentProps, PiePlotSlotsComponent } from './PiePlot';
|
|
9
10
|
import { PieValueType } from '../models/seriesType/pie';
|
|
10
|
-
|
|
11
|
+
import { ChartsAxisSlotsComponent, ChartsAxisSlotComponentProps } from '../models/axis';
|
|
12
|
+
export interface PieChartSlotsComponent extends ChartsAxisSlotsComponent, PiePlotSlotsComponent, ChartsLegendSlotsComponent {
|
|
13
|
+
}
|
|
14
|
+
export interface PieChartSlotComponentProps extends ChartsAxisSlotComponentProps, PiePlotSlotComponentProps, ChartsLegendSlotComponentProps {
|
|
15
|
+
}
|
|
16
|
+
export interface PieChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'> {
|
|
11
17
|
series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[];
|
|
12
18
|
tooltip?: ChartsTooltipProps;
|
|
13
19
|
axisHighlight?: ChartsAxisHighlightProps;
|
|
14
20
|
legend?: ChartsLegendProps;
|
|
21
|
+
slots?: PieChartSlotsComponent;
|
|
22
|
+
/**
|
|
23
|
+
* The props used for each component slot.
|
|
24
|
+
* @default {}
|
|
25
|
+
*/
|
|
26
|
+
slotProps?: PieChartSlotComponentProps;
|
|
15
27
|
}
|
|
16
28
|
declare function PieChart(props: PieChartProps): React.JSX.Element;
|
|
17
29
|
declare namespace PieChart {
|
package/PieChart/PieChart.js
CHANGED
|
@@ -52,7 +52,9 @@ function PieChart(props) {
|
|
|
52
52
|
leftAxis = null,
|
|
53
53
|
rightAxis = null,
|
|
54
54
|
bottomAxis = null,
|
|
55
|
-
children
|
|
55
|
+
children,
|
|
56
|
+
slots,
|
|
57
|
+
slotProps
|
|
56
58
|
} = props;
|
|
57
59
|
const margin = (0, _extends2.default)({}, defaultMargin, marginProps);
|
|
58
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ResponsiveChartContainer.ResponsiveChartContainer, {
|
|
@@ -75,8 +77,16 @@ function PieChart(props) {
|
|
|
75
77
|
topAxis: topAxis,
|
|
76
78
|
leftAxis: leftAxis,
|
|
77
79
|
rightAxis: rightAxis,
|
|
78
|
-
bottomAxis: bottomAxis
|
|
79
|
-
|
|
80
|
+
bottomAxis: bottomAxis,
|
|
81
|
+
slots: slots,
|
|
82
|
+
slotProps: slotProps
|
|
83
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PiePlot.PiePlot, {
|
|
84
|
+
slots: slots,
|
|
85
|
+
slotProps: slotProps
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legend, {
|
|
87
|
+
slots: slots,
|
|
88
|
+
slotProps: slotProps
|
|
89
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlight)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltip.ChartsTooltip, (0, _extends2.default)({}, tooltip)), children]
|
|
80
90
|
});
|
|
81
91
|
}
|
|
82
92
|
process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
@@ -102,8 +112,13 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
102
112
|
label: _propTypes.default.string,
|
|
103
113
|
labelFontSize: _propTypes.default.number,
|
|
104
114
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
115
|
+
slotProps: _propTypes.default.object,
|
|
116
|
+
slots: _propTypes.default.object,
|
|
105
117
|
stroke: _propTypes.default.string,
|
|
106
118
|
tickFontSize: _propTypes.default.number,
|
|
119
|
+
tickMaxStep: _propTypes.default.number,
|
|
120
|
+
tickMinStep: _propTypes.default.number,
|
|
121
|
+
tickNumber: _propTypes.default.number,
|
|
107
122
|
tickSize: _propTypes.default.number
|
|
108
123
|
}), _propTypes.default.string]),
|
|
109
124
|
children: _propTypes.default.node,
|
|
@@ -130,8 +145,13 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
130
145
|
label: _propTypes.default.string,
|
|
131
146
|
labelFontSize: _propTypes.default.number,
|
|
132
147
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
148
|
+
slotProps: _propTypes.default.object,
|
|
149
|
+
slots: _propTypes.default.object,
|
|
133
150
|
stroke: _propTypes.default.string,
|
|
134
151
|
tickFontSize: _propTypes.default.number,
|
|
152
|
+
tickMaxStep: _propTypes.default.number,
|
|
153
|
+
tickMinStep: _propTypes.default.number,
|
|
154
|
+
tickNumber: _propTypes.default.number,
|
|
135
155
|
tickSize: _propTypes.default.number
|
|
136
156
|
}), _propTypes.default.string]),
|
|
137
157
|
legend: _propTypes.default.shape({
|
|
@@ -148,6 +168,8 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
148
168
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
149
169
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
150
170
|
}),
|
|
171
|
+
slotProps: _propTypes.default.object,
|
|
172
|
+
slots: _propTypes.default.object,
|
|
151
173
|
spacing: _propTypes.default.number
|
|
152
174
|
}),
|
|
153
175
|
margin: _propTypes.default.shape({
|
|
@@ -170,8 +192,13 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
170
192
|
label: _propTypes.default.string,
|
|
171
193
|
labelFontSize: _propTypes.default.number,
|
|
172
194
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
195
|
+
slotProps: _propTypes.default.object,
|
|
196
|
+
slots: _propTypes.default.object,
|
|
173
197
|
stroke: _propTypes.default.string,
|
|
174
198
|
tickFontSize: _propTypes.default.number,
|
|
199
|
+
tickMaxStep: _propTypes.default.number,
|
|
200
|
+
tickMinStep: _propTypes.default.number,
|
|
201
|
+
tickNumber: _propTypes.default.number,
|
|
175
202
|
tickSize: _propTypes.default.number
|
|
176
203
|
}), _propTypes.default.string]),
|
|
177
204
|
series: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -213,6 +240,12 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
213
240
|
type: _propTypes.default.oneOf(['pie']),
|
|
214
241
|
valueFormatter: _propTypes.default.func
|
|
215
242
|
})).isRequired,
|
|
243
|
+
/**
|
|
244
|
+
* The props used for each component slot.
|
|
245
|
+
* @default {}
|
|
246
|
+
*/
|
|
247
|
+
slotProps: _propTypes.default.object,
|
|
248
|
+
slots: _propTypes.default.object,
|
|
216
249
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
217
250
|
title: _propTypes.default.string,
|
|
218
251
|
tooltip: _propTypes.default.shape({
|
|
@@ -235,8 +268,13 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
235
268
|
label: _propTypes.default.string,
|
|
236
269
|
labelFontSize: _propTypes.default.number,
|
|
237
270
|
position: _propTypes.default.oneOf(['bottom', 'top']),
|
|
271
|
+
slotProps: _propTypes.default.object,
|
|
272
|
+
slots: _propTypes.default.object,
|
|
238
273
|
stroke: _propTypes.default.string,
|
|
239
274
|
tickFontSize: _propTypes.default.number,
|
|
275
|
+
tickMaxStep: _propTypes.default.number,
|
|
276
|
+
tickMinStep: _propTypes.default.number,
|
|
277
|
+
tickNumber: _propTypes.default.number,
|
|
240
278
|
tickSize: _propTypes.default.number
|
|
241
279
|
}), _propTypes.default.string]),
|
|
242
280
|
viewBox: _propTypes.default.shape({
|
|
@@ -259,15 +297,17 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
259
297
|
label: _propTypes.default.string,
|
|
260
298
|
labelFontSize: _propTypes.default.number,
|
|
261
299
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
262
|
-
maxTicks: _propTypes.default.number,
|
|
263
300
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
264
|
-
minTicks: _propTypes.default.number,
|
|
265
301
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
266
302
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
303
|
+
slotProps: _propTypes.default.object,
|
|
304
|
+
slots: _propTypes.default.object,
|
|
267
305
|
stroke: _propTypes.default.string,
|
|
268
306
|
tickFontSize: _propTypes.default.number,
|
|
307
|
+
tickMaxStep: _propTypes.default.number,
|
|
308
|
+
tickMinStep: _propTypes.default.number,
|
|
309
|
+
tickNumber: _propTypes.default.number,
|
|
269
310
|
tickSize: _propTypes.default.number,
|
|
270
|
-
tickSpacing: _propTypes.default.number,
|
|
271
311
|
valueFormatter: _propTypes.default.func
|
|
272
312
|
})),
|
|
273
313
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -283,15 +323,17 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
283
323
|
label: _propTypes.default.string,
|
|
284
324
|
labelFontSize: _propTypes.default.number,
|
|
285
325
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
286
|
-
maxTicks: _propTypes.default.number,
|
|
287
326
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
288
|
-
minTicks: _propTypes.default.number,
|
|
289
327
|
position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
|
|
290
328
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
329
|
+
slotProps: _propTypes.default.object,
|
|
330
|
+
slots: _propTypes.default.object,
|
|
291
331
|
stroke: _propTypes.default.string,
|
|
292
332
|
tickFontSize: _propTypes.default.number,
|
|
333
|
+
tickMaxStep: _propTypes.default.number,
|
|
334
|
+
tickMinStep: _propTypes.default.number,
|
|
335
|
+
tickNumber: _propTypes.default.number,
|
|
293
336
|
tickSize: _propTypes.default.number,
|
|
294
|
-
tickSpacing: _propTypes.default.number,
|
|
295
337
|
valueFormatter: _propTypes.default.func
|
|
296
338
|
}))
|
|
297
339
|
} : void 0;
|