@mui/x-charts 6.19.3 → 6.19.4
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.js +11 -9
- package/BarChart/BarElement.d.ts +6 -3
- package/BarChart/BarElement.js +1 -0
- package/BarChart/BarPlot.js +9 -10
- package/CHANGELOG.md +56 -0
- package/ChartsAxis/ChartsAxis.js +4 -4
- package/ChartsLegend/ChartsLegend.js +0 -101
- package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/ChartsReferenceLine/common.d.ts +2 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +4 -4
- package/ChartsTooltip/ChartsItemTooltipContent.js +3 -3
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -2
- package/ChartsXAxis/ChartsXAxis.js +13 -9
- package/ChartsYAxis/ChartsYAxis.js +1 -1
- package/LineChart/AreaElement.d.ts +7 -4
- package/LineChart/AreaElement.js +1 -0
- package/LineChart/LineChart.js +11 -9
- package/LineChart/LineElement.d.ts +7 -4
- package/LineChart/LineElement.js +1 -0
- 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 +3 -2
- package/PieChart/PieArc.js +1 -0
- package/PieChart/PieArcLabel.d.ts +3 -2
- package/PieChart/PieArcLabel.js +1 -0
- package/PieChart/PieArcLabelPlot.js +1 -1
- package/PieChart/PieArcPlot.js +1 -1
- package/PieChart/PieChart.js +11 -9
- package/ScatterChart/Scatter.js +1 -1
- package/ScatterChart/ScatterChart.js +11 -9
- package/SparkLineChart/SparkLineChart.js +3 -2
- package/context/CartesianContextProvider.js +8 -6
- package/context/InteractionProvider.d.ts +2 -2
- package/esm/BarChart/BarChart.js +11 -9
- package/esm/BarChart/BarElement.js +1 -0
- package/esm/BarChart/BarPlot.js +8 -10
- package/esm/ChartsAxis/ChartsAxis.js +4 -4
- package/esm/ChartsLegend/ChartsLegend.js +0 -101
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +4 -4
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +3 -3
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -2
- package/esm/ChartsXAxis/ChartsXAxis.js +13 -9
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -1
- package/esm/LineChart/AreaElement.js +1 -0
- package/esm/LineChart/LineChart.js +11 -9
- package/esm/LineChart/LineElement.js +1 -0
- package/esm/LineChart/LineHighlightElement.js +2 -1
- package/esm/LineChart/MarkElement.js +1 -0
- package/esm/PieChart/PieArc.js +1 -0
- package/esm/PieChart/PieArcLabel.js +1 -0
- package/esm/PieChart/PieArcLabelPlot.js +1 -1
- package/esm/PieChart/PieArcPlot.js +1 -1
- package/esm/PieChart/PieChart.js +11 -9
- package/esm/ScatterChart/Scatter.js +1 -1
- package/esm/ScatterChart/ScatterChart.js +11 -9
- package/esm/SparkLineChart/SparkLineChart.js +3 -2
- package/esm/context/CartesianContextProvider.js +8 -6
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +15 -15
- package/internals/defaultizeValueFormatter.d.ts +4 -7
- package/internals/stackSeries.d.ts +4 -7
- package/legacy/BarChart/BarChart.js +11 -9
- package/legacy/BarChart/BarElement.js +1 -0
- package/legacy/BarChart/BarPlot.js +10 -10
- package/legacy/ChartsAxis/ChartsAxis.js +4 -4
- package/legacy/ChartsLegend/ChartsLegend.js +0 -101
- package/legacy/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +4 -4
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +3 -3
- package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -2
- package/legacy/ChartsXAxis/ChartsXAxis.js +12 -8
- package/legacy/ChartsYAxis/ChartsYAxis.js +1 -1
- package/legacy/LineChart/AreaElement.js +1 -0
- package/legacy/LineChart/LineChart.js +11 -9
- package/legacy/LineChart/LineElement.js +1 -0
- package/legacy/LineChart/LineHighlightElement.js +2 -1
- package/legacy/LineChart/MarkElement.js +1 -0
- package/legacy/PieChart/PieArc.js +1 -0
- package/legacy/PieChart/PieArcLabel.js +1 -0
- package/legacy/PieChart/PieArcLabelPlot.js +1 -1
- package/legacy/PieChart/PieArcPlot.js +1 -1
- package/legacy/PieChart/PieChart.js +11 -9
- package/legacy/ScatterChart/Scatter.js +1 -1
- package/legacy/ScatterChart/ScatterChart.js +11 -9
- package/legacy/SparkLineChart/SparkLineChart.js +3 -2
- package/legacy/context/CartesianContextProvider.js +8 -6
- package/legacy/index.js +1 -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 +11 -9
- package/modern/BarChart/BarElement.js +1 -0
- package/modern/BarChart/BarPlot.js +8 -10
- package/modern/ChartsAxis/ChartsAxis.js +4 -4
- package/modern/ChartsLegend/ChartsLegend.js +0 -101
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +4 -4
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +3 -3
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -2
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -2
- package/modern/ChartsXAxis/ChartsXAxis.js +13 -9
- package/modern/ChartsYAxis/ChartsYAxis.js +1 -1
- package/modern/LineChart/AreaElement.js +1 -0
- package/modern/LineChart/LineChart.js +11 -9
- package/modern/LineChart/LineElement.js +1 -0
- package/modern/LineChart/LineHighlightElement.js +2 -1
- package/modern/LineChart/MarkElement.js +1 -0
- package/modern/PieChart/PieArc.js +1 -0
- package/modern/PieChart/PieArcLabel.js +1 -0
- package/modern/PieChart/PieArcLabelPlot.js +1 -1
- package/modern/PieChart/PieArcPlot.js +1 -1
- package/modern/PieChart/PieChart.js +11 -9
- package/modern/ScatterChart/Scatter.js +1 -1
- package/modern/ScatterChart/ScatterChart.js +11 -9
- package/modern/SparkLineChart/SparkLineChart.js +3 -2
- package/modern/context/CartesianContextProvider.js +8 -6
- package/modern/index.js +1 -1
- package/package.json +1 -1
|
@@ -249,107 +249,6 @@ function DefaultChartsLegend(props) {
|
|
|
249
249
|
})
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
253
|
-
// ----------------------------- Warning --------------------------------
|
|
254
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
255
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
256
|
-
// ----------------------------------------------------------------------
|
|
257
|
-
/**
|
|
258
|
-
* Override or extend the styles applied to the component.
|
|
259
|
-
*/
|
|
260
|
-
classes: PropTypes.object.isRequired,
|
|
261
|
-
/**
|
|
262
|
-
* The direction of the legend layout.
|
|
263
|
-
* The default depends on the chart.
|
|
264
|
-
*/
|
|
265
|
-
direction: PropTypes.oneOf(['column', 'row']).isRequired,
|
|
266
|
-
drawingArea: PropTypes.shape({
|
|
267
|
-
bottom: PropTypes.number.isRequired,
|
|
268
|
-
height: PropTypes.number.isRequired,
|
|
269
|
-
left: PropTypes.number.isRequired,
|
|
270
|
-
right: PropTypes.number.isRequired,
|
|
271
|
-
top: PropTypes.number.isRequired,
|
|
272
|
-
width: PropTypes.number.isRequired
|
|
273
|
-
}).isRequired,
|
|
274
|
-
/**
|
|
275
|
-
* Set to true to hide the legend.
|
|
276
|
-
* @default false
|
|
277
|
-
*/
|
|
278
|
-
hidden: PropTypes.bool,
|
|
279
|
-
/**
|
|
280
|
-
* Space between two legend items (in px).
|
|
281
|
-
* @default 10
|
|
282
|
-
*/
|
|
283
|
-
itemGap: PropTypes.number,
|
|
284
|
-
/**
|
|
285
|
-
* Height of the item mark (in px).
|
|
286
|
-
* @default 20
|
|
287
|
-
*/
|
|
288
|
-
itemMarkHeight: PropTypes.number,
|
|
289
|
-
/**
|
|
290
|
-
* Width of the item mark (in px).
|
|
291
|
-
* @default 20
|
|
292
|
-
*/
|
|
293
|
-
itemMarkWidth: PropTypes.number,
|
|
294
|
-
/**
|
|
295
|
-
* Style applied to legend labels.
|
|
296
|
-
* @default theme.typography.subtitle1
|
|
297
|
-
*/
|
|
298
|
-
labelStyle: PropTypes.object,
|
|
299
|
-
/**
|
|
300
|
-
* Space between the mark and the label (in px).
|
|
301
|
-
* @default 5
|
|
302
|
-
*/
|
|
303
|
-
markGap: PropTypes.number,
|
|
304
|
-
/**
|
|
305
|
-
* Legend padding (in px).
|
|
306
|
-
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
307
|
-
* @default 0
|
|
308
|
-
*/
|
|
309
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
310
|
-
bottom: PropTypes.number,
|
|
311
|
-
left: PropTypes.number,
|
|
312
|
-
right: PropTypes.number,
|
|
313
|
-
top: PropTypes.number
|
|
314
|
-
})]),
|
|
315
|
-
position: PropTypes.shape({
|
|
316
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
317
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
318
|
-
}).isRequired,
|
|
319
|
-
series: PropTypes.shape({
|
|
320
|
-
bar: PropTypes.shape({
|
|
321
|
-
series: PropTypes.object.isRequired,
|
|
322
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
323
|
-
stackingGroups: PropTypes.arrayOf(PropTypes.shape({
|
|
324
|
-
ids: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
325
|
-
stackingOffset: PropTypes.func.isRequired,
|
|
326
|
-
stackingOrder: PropTypes.func.isRequired
|
|
327
|
-
})).isRequired
|
|
328
|
-
}),
|
|
329
|
-
line: PropTypes.shape({
|
|
330
|
-
series: PropTypes.object.isRequired,
|
|
331
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
332
|
-
stackingGroups: PropTypes.arrayOf(PropTypes.shape({
|
|
333
|
-
ids: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
334
|
-
stackingOffset: PropTypes.func.isRequired,
|
|
335
|
-
stackingOrder: PropTypes.func.isRequired
|
|
336
|
-
})).isRequired
|
|
337
|
-
}),
|
|
338
|
-
pie: PropTypes.shape({
|
|
339
|
-
series: PropTypes.object.isRequired,
|
|
340
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
341
|
-
}),
|
|
342
|
-
scatter: PropTypes.shape({
|
|
343
|
-
series: PropTypes.object.isRequired,
|
|
344
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
345
|
-
})
|
|
346
|
-
}).isRequired,
|
|
347
|
-
seriesToDisplay: PropTypes.arrayOf(PropTypes.shape({
|
|
348
|
-
color: PropTypes.string.isRequired,
|
|
349
|
-
id: PropTypes.string.isRequired,
|
|
350
|
-
label: PropTypes.string.isRequired
|
|
351
|
-
})).isRequired
|
|
352
|
-
} : void 0;
|
|
353
252
|
function ChartsLegend(inProps) {
|
|
354
253
|
var _slots$legend;
|
|
355
254
|
var props = useThemeProps({
|
|
@@ -27,7 +27,7 @@ process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
|
27
27
|
* The id of the axis used for the reference value.
|
|
28
28
|
* @default The `id` of the first defined axis.
|
|
29
29
|
*/
|
|
30
|
-
axisId: PropTypes.string,
|
|
30
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
31
31
|
/**
|
|
32
32
|
* Override or extend the styles applied to the component.
|
|
33
33
|
*/
|
|
@@ -65,11 +65,11 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
|
|
|
65
65
|
axisData: PropTypes.shape({
|
|
66
66
|
x: PropTypes.shape({
|
|
67
67
|
index: PropTypes.number,
|
|
68
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
68
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
69
69
|
}),
|
|
70
70
|
y: PropTypes.shape({
|
|
71
71
|
index: PropTypes.number,
|
|
72
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
72
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
73
73
|
})
|
|
74
74
|
}).isRequired,
|
|
75
75
|
classes: PropTypes.object.isRequired,
|
|
@@ -79,11 +79,11 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
|
|
|
79
79
|
axisData: PropTypes.shape({
|
|
80
80
|
x: PropTypes.shape({
|
|
81
81
|
index: PropTypes.number,
|
|
82
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
82
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
83
83
|
}),
|
|
84
84
|
y: PropTypes.shape({
|
|
85
85
|
index: PropTypes.number,
|
|
86
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
86
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
87
87
|
})
|
|
88
88
|
}),
|
|
89
89
|
axisValue: PropTypes.any,
|
|
@@ -37,7 +37,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
37
37
|
classes: PropTypes.object,
|
|
38
38
|
itemData: PropTypes.shape({
|
|
39
39
|
dataIndex: PropTypes.number,
|
|
40
|
-
seriesId: PropTypes.string.isRequired,
|
|
40
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
41
41
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
42
42
|
}),
|
|
43
43
|
series: PropTypes.shape({
|
|
@@ -61,7 +61,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
61
61
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
62
62
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
63
63
|
}),
|
|
64
|
-
id: PropTypes.string.isRequired,
|
|
64
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
65
65
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired,
|
|
66
66
|
valueFormatter: PropTypes.func.isRequired
|
|
67
67
|
}),
|
|
@@ -69,7 +69,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
69
69
|
}),
|
|
70
70
|
itemData: PropTypes.shape({
|
|
71
71
|
dataIndex: PropTypes.number,
|
|
72
|
-
seriesId: PropTypes.string.isRequired,
|
|
72
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
73
73
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
74
74
|
}).isRequired,
|
|
75
75
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
@@ -87,11 +87,11 @@ process.env.NODE_ENV !== "production" ? DefaultChartsAxisTooltipContent.propType
|
|
|
87
87
|
axisData: PropTypes.shape({
|
|
88
88
|
x: PropTypes.shape({
|
|
89
89
|
index: PropTypes.number,
|
|
90
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
90
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
91
91
|
}),
|
|
92
92
|
y: PropTypes.shape({
|
|
93
93
|
index: PropTypes.number,
|
|
94
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
94
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
95
95
|
})
|
|
96
96
|
}).isRequired,
|
|
97
97
|
/**
|
|
@@ -67,7 +67,7 @@ process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propType
|
|
|
67
67
|
*/
|
|
68
68
|
itemData: PropTypes.shape({
|
|
69
69
|
dataIndex: PropTypes.number,
|
|
70
|
-
seriesId: PropTypes.string.isRequired,
|
|
70
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
71
71
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
72
72
|
}).isRequired,
|
|
73
73
|
/**
|
|
@@ -94,7 +94,7 @@ process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propType
|
|
|
94
94
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
95
95
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
96
96
|
}),
|
|
97
|
-
id: PropTypes.string.isRequired,
|
|
97
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
98
98
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired,
|
|
99
99
|
valueFormatter: PropTypes.func.isRequired
|
|
100
100
|
}).isRequired,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
var _excluded = ["scale", "tickNumber"];
|
|
4
|
+
var _excluded = ["scale", "tickNumber", "reverse"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useSlotProps } from '@mui/base/utils';
|
|
@@ -34,6 +34,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
34
34
|
function addLabelDimension(xTicks, _ref) {
|
|
35
35
|
var style = _ref.tickLabelStyle,
|
|
36
36
|
tickLabelInterval = _ref.tickLabelInterval,
|
|
37
|
+
reverse = _ref.reverse,
|
|
37
38
|
isMounted = _ref.isMounted;
|
|
38
39
|
var withDimension = xTicks.map(function (tick) {
|
|
39
40
|
if (!isMounted || tick.formattedValue === undefined) {
|
|
@@ -63,8 +64,9 @@ function addLabelDimension(xTicks, _ref) {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
// Filter label to avoid overlap
|
|
66
|
-
var
|
|
67
|
-
var
|
|
67
|
+
var currentTextLimit = 0;
|
|
68
|
+
var previouseTextLimit = 0;
|
|
69
|
+
var direction = reverse ? -1 : 1;
|
|
68
70
|
return withDimension.map(function (item, labelIndex) {
|
|
69
71
|
var width = item.width,
|
|
70
72
|
offset = item.offset,
|
|
@@ -74,15 +76,15 @@ function addLabelDimension(xTicks, _ref) {
|
|
|
74
76
|
var textPosition = offset + labelOffset;
|
|
75
77
|
var gapRatio = 1.2; // Ratio applied to the minimal distance to add some margin.
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
if (labelIndex > 0 &&
|
|
79
|
+
currentTextLimit = textPosition - direction * (gapRatio * distance) / 2;
|
|
80
|
+
if (labelIndex > 0 && direction * currentTextLimit < direction * previouseTextLimit) {
|
|
79
81
|
// Except for the first label, we skip all label that overlap with the last accepted.
|
|
80
|
-
// Notice that the early return prevents `
|
|
82
|
+
// Notice that the early return prevents `previouseTextLimit` from being updated.
|
|
81
83
|
return _extends({}, item, {
|
|
82
84
|
skipLabel: true
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
|
-
|
|
87
|
+
previouseTextLimit = textPosition + direction * (gapRatio * distance) / 2;
|
|
86
88
|
return item;
|
|
87
89
|
});
|
|
88
90
|
}
|
|
@@ -114,6 +116,7 @@ function ChartsXAxis(inProps) {
|
|
|
114
116
|
_React$useContext2$xA = _React$useContext2.xAxis[(_props$axisId = props.axisId) != null ? _props$axisId : xAxisIds[0]],
|
|
115
117
|
xScale = _React$useContext2$xA.scale,
|
|
116
118
|
tickNumber = _React$useContext2$xA.tickNumber,
|
|
119
|
+
reverse = _React$useContext2$xA.reverse,
|
|
117
120
|
settings = _objectWithoutProperties(_React$useContext2$xA, _excluded);
|
|
118
121
|
var isMounted = useMounted();
|
|
119
122
|
var defaultizedProps = _extends({}, defaultProps, settings, props);
|
|
@@ -169,6 +172,7 @@ function ChartsXAxis(inProps) {
|
|
|
169
172
|
var xTicksWithDimension = addLabelDimension(xTicks, {
|
|
170
173
|
tickLabelStyle: axisTickLabelProps.style,
|
|
171
174
|
tickLabelInterval: tickLabelInterval,
|
|
175
|
+
reverse: reverse,
|
|
172
176
|
isMounted: isMounted
|
|
173
177
|
});
|
|
174
178
|
var labelRefPoint = {
|
|
@@ -231,7 +235,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
231
235
|
* The id of the axis to render.
|
|
232
236
|
* If undefined, it will be the first defined axis.
|
|
233
237
|
*/
|
|
234
|
-
axisId: PropTypes.string,
|
|
238
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
235
239
|
/**
|
|
236
240
|
* Override or extend the styles applied to the component.
|
|
237
241
|
*/
|
|
@@ -163,7 +163,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
163
163
|
* The id of the axis to render.
|
|
164
164
|
* If undefined, it will be the first defined axis.
|
|
165
165
|
*/
|
|
166
|
-
axisId: PropTypes.string,
|
|
166
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
167
167
|
/**
|
|
168
168
|
* Override or extend the styles applied to the component.
|
|
169
169
|
*/
|
|
@@ -118,6 +118,7 @@ process.env.NODE_ENV !== "production" ? AreaElement.propTypes = {
|
|
|
118
118
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
119
119
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
120
120
|
}),
|
|
121
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
121
122
|
/**
|
|
122
123
|
* The props used for each component slot.
|
|
123
124
|
* @default {}
|
|
@@ -136,7 +136,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
136
136
|
* @default xAxisIds[0] The id of the first provided axis
|
|
137
137
|
*/
|
|
138
138
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
139
|
-
axisId: PropTypes.string,
|
|
139
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
140
140
|
classes: PropTypes.object,
|
|
141
141
|
disableLine: PropTypes.bool,
|
|
142
142
|
disableTicks: PropTypes.bool,
|
|
@@ -190,7 +190,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
190
190
|
* @default yAxisIds[0] The id of the first provided axis
|
|
191
191
|
*/
|
|
192
192
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
193
|
-
axisId: PropTypes.string,
|
|
193
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
194
194
|
classes: PropTypes.object,
|
|
195
195
|
disableLine: PropTypes.bool,
|
|
196
196
|
disableTicks: PropTypes.bool,
|
|
@@ -243,7 +243,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
243
243
|
* @default null
|
|
244
244
|
*/
|
|
245
245
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
246
|
-
axisId: PropTypes.string,
|
|
246
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
247
247
|
classes: PropTypes.object,
|
|
248
248
|
disableLine: PropTypes.bool,
|
|
249
249
|
disableTicks: PropTypes.bool,
|
|
@@ -276,7 +276,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
276
276
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
277
277
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
278
278
|
}),
|
|
279
|
-
id: PropTypes.string,
|
|
279
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
280
280
|
label: PropTypes.string,
|
|
281
281
|
showMark: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
282
282
|
stack: PropTypes.string,
|
|
@@ -313,7 +313,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
313
313
|
* @default null
|
|
314
314
|
*/
|
|
315
315
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
316
|
-
axisId: PropTypes.string,
|
|
316
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
317
317
|
classes: PropTypes.object,
|
|
318
318
|
disableLine: PropTypes.bool,
|
|
319
319
|
disableTicks: PropTypes.bool,
|
|
@@ -350,7 +350,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
350
350
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
351
351
|
*/
|
|
352
352
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
353
|
-
axisId: PropTypes.string,
|
|
353
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
354
354
|
classes: PropTypes.object,
|
|
355
355
|
data: PropTypes.array,
|
|
356
356
|
dataKey: PropTypes.string,
|
|
@@ -358,13 +358,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
358
358
|
disableTicks: PropTypes.bool,
|
|
359
359
|
fill: PropTypes.string,
|
|
360
360
|
hideTooltip: PropTypes.bool,
|
|
361
|
-
id: PropTypes.string,
|
|
361
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
362
362
|
label: PropTypes.string,
|
|
363
363
|
labelFontSize: PropTypes.number,
|
|
364
364
|
labelStyle: PropTypes.object,
|
|
365
365
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
366
366
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
367
367
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
368
|
+
reverse: PropTypes.bool,
|
|
368
369
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
369
370
|
slotProps: PropTypes.object,
|
|
370
371
|
slots: PropTypes.object,
|
|
@@ -384,7 +385,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
384
385
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
385
386
|
*/
|
|
386
387
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
387
|
-
axisId: PropTypes.string,
|
|
388
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
388
389
|
classes: PropTypes.object,
|
|
389
390
|
data: PropTypes.array,
|
|
390
391
|
dataKey: PropTypes.string,
|
|
@@ -392,13 +393,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
392
393
|
disableTicks: PropTypes.bool,
|
|
393
394
|
fill: PropTypes.string,
|
|
394
395
|
hideTooltip: PropTypes.bool,
|
|
395
|
-
id: PropTypes.string,
|
|
396
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
396
397
|
label: PropTypes.string,
|
|
397
398
|
labelFontSize: PropTypes.number,
|
|
398
399
|
labelStyle: PropTypes.object,
|
|
399
400
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
400
401
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
401
402
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
403
|
+
reverse: PropTypes.bool,
|
|
402
404
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
403
405
|
slotProps: PropTypes.object,
|
|
404
406
|
slots: PropTypes.object,
|
|
@@ -120,6 +120,7 @@ process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
|
|
|
120
120
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
121
121
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
122
122
|
}),
|
|
123
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
123
124
|
/**
|
|
124
125
|
* The props used for each component slot.
|
|
125
126
|
* @default {}
|
|
@@ -72,6 +72,7 @@ process.env.NODE_ENV !== "production" ? LineHighlightElement.propTypes = {
|
|
|
72
72
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
73
73
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
74
74
|
// ----------------------------------------------------------------------
|
|
75
|
-
classes: PropTypes.object
|
|
75
|
+
classes: PropTypes.object,
|
|
76
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
76
77
|
} : void 0;
|
|
77
78
|
export { LineHighlightElement };
|
|
@@ -127,6 +127,7 @@ process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
|
|
|
127
127
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
128
128
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
129
129
|
}),
|
|
130
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
130
131
|
/**
|
|
131
132
|
* The shape of the marker.
|
|
132
133
|
*/
|
|
@@ -96,6 +96,7 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
|
|
|
96
96
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
97
97
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
98
98
|
}),
|
|
99
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
99
100
|
isFaded: PropTypes.bool.isRequired,
|
|
100
101
|
isHighlighted: PropTypes.bool.isRequired
|
|
101
102
|
} : void 0;
|
|
@@ -105,6 +105,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
|
|
|
105
105
|
// ----------------------------------------------------------------------
|
|
106
106
|
classes: PropTypes.object,
|
|
107
107
|
formattedArcLabel: PropTypes.string,
|
|
108
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
108
109
|
isFaded: PropTypes.bool.isRequired,
|
|
109
110
|
isHighlighted: PropTypes.bool.isRequired
|
|
110
111
|
} : void 0;
|
|
@@ -159,7 +159,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
|
|
|
159
159
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
160
160
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
161
161
|
}),
|
|
162
|
-
id: PropTypes.string.isRequired,
|
|
162
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
163
163
|
/**
|
|
164
164
|
* The radius between circle center and the begining of the arc.
|
|
165
165
|
* @default 0
|
|
@@ -139,7 +139,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
139
139
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
140
140
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
141
141
|
}),
|
|
142
|
-
id: PropTypes.string.isRequired,
|
|
142
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
143
143
|
/**
|
|
144
144
|
* The radius between circle center and the begining of the arc.
|
|
145
145
|
* @default 0
|
|
@@ -123,7 +123,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
123
123
|
* @default null
|
|
124
124
|
*/
|
|
125
125
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
126
|
-
axisId: PropTypes.string,
|
|
126
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
127
127
|
classes: PropTypes.object,
|
|
128
128
|
disableLine: PropTypes.bool,
|
|
129
129
|
disableTicks: PropTypes.bool,
|
|
@@ -173,7 +173,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
173
173
|
* @default null
|
|
174
174
|
*/
|
|
175
175
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
176
|
-
axisId: PropTypes.string,
|
|
176
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
177
177
|
classes: PropTypes.object,
|
|
178
178
|
disableLine: PropTypes.bool,
|
|
179
179
|
disableTicks: PropTypes.bool,
|
|
@@ -227,7 +227,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
227
227
|
* @default null
|
|
228
228
|
*/
|
|
229
229
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
230
|
-
axisId: PropTypes.string,
|
|
230
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
231
231
|
classes: PropTypes.object,
|
|
232
232
|
disableLine: PropTypes.bool,
|
|
233
233
|
disableTicks: PropTypes.bool,
|
|
@@ -285,7 +285,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
285
285
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
286
286
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
287
287
|
}),
|
|
288
|
-
id: PropTypes.string,
|
|
288
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
289
289
|
innerRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
290
290
|
outerRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
291
291
|
paddingAngle: PropTypes.number,
|
|
@@ -321,7 +321,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
321
321
|
* @default null
|
|
322
322
|
*/
|
|
323
323
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
324
|
-
axisId: PropTypes.string,
|
|
324
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
325
325
|
classes: PropTypes.object,
|
|
326
326
|
disableLine: PropTypes.bool,
|
|
327
327
|
disableTicks: PropTypes.bool,
|
|
@@ -358,7 +358,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
358
358
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
359
359
|
*/
|
|
360
360
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
361
|
-
axisId: PropTypes.string,
|
|
361
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
362
362
|
classes: PropTypes.object,
|
|
363
363
|
data: PropTypes.array,
|
|
364
364
|
dataKey: PropTypes.string,
|
|
@@ -366,13 +366,14 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
366
366
|
disableTicks: PropTypes.bool,
|
|
367
367
|
fill: PropTypes.string,
|
|
368
368
|
hideTooltip: PropTypes.bool,
|
|
369
|
-
id: PropTypes.string,
|
|
369
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
370
370
|
label: PropTypes.string,
|
|
371
371
|
labelFontSize: PropTypes.number,
|
|
372
372
|
labelStyle: PropTypes.object,
|
|
373
373
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
374
374
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
375
375
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
376
|
+
reverse: PropTypes.bool,
|
|
376
377
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
377
378
|
slotProps: PropTypes.object,
|
|
378
379
|
slots: PropTypes.object,
|
|
@@ -392,7 +393,7 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
392
393
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
393
394
|
*/
|
|
394
395
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
395
|
-
axisId: PropTypes.string,
|
|
396
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
396
397
|
classes: PropTypes.object,
|
|
397
398
|
data: PropTypes.array,
|
|
398
399
|
dataKey: PropTypes.string,
|
|
@@ -400,13 +401,14 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
400
401
|
disableTicks: PropTypes.bool,
|
|
401
402
|
fill: PropTypes.string,
|
|
402
403
|
hideTooltip: PropTypes.bool,
|
|
403
|
-
id: PropTypes.string,
|
|
404
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
404
405
|
label: PropTypes.string,
|
|
405
406
|
labelFontSize: PropTypes.number,
|
|
406
407
|
labelStyle: PropTypes.object,
|
|
407
408
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
408
409
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
409
410
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
411
|
+
reverse: PropTypes.bool,
|
|
410
412
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
411
413
|
slotProps: PropTypes.object,
|
|
412
414
|
slots: PropTypes.object,
|
|
@@ -88,7 +88,7 @@ process.env.NODE_ENV !== "production" ? Scatter.propTypes = {
|
|
|
88
88
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
89
89
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
90
90
|
}),
|
|
91
|
-
id: PropTypes.string.isRequired,
|
|
91
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
92
92
|
label: PropTypes.string,
|
|
93
93
|
markerSize: PropTypes.number,
|
|
94
94
|
type: PropTypes.oneOf(['scatter']).isRequired,
|
|
@@ -88,7 +88,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
88
88
|
* @default xAxisIds[0] The id of the first provided axis
|
|
89
89
|
*/
|
|
90
90
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
91
|
-
axisId: PropTypes.string,
|
|
91
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
92
92
|
classes: PropTypes.object,
|
|
93
93
|
disableLine: PropTypes.bool,
|
|
94
94
|
disableTicks: PropTypes.bool,
|
|
@@ -138,7 +138,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
138
138
|
* @default yAxisIds[0] The id of the first provided axis
|
|
139
139
|
*/
|
|
140
140
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
141
|
-
axisId: PropTypes.string,
|
|
141
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
142
142
|
classes: PropTypes.object,
|
|
143
143
|
disableLine: PropTypes.bool,
|
|
144
144
|
disableTicks: PropTypes.bool,
|
|
@@ -191,7 +191,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
191
191
|
* @default null
|
|
192
192
|
*/
|
|
193
193
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
194
|
-
axisId: PropTypes.string,
|
|
194
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
195
195
|
classes: PropTypes.object,
|
|
196
196
|
disableLine: PropTypes.bool,
|
|
197
197
|
disableTicks: PropTypes.bool,
|
|
@@ -223,7 +223,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
223
223
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
224
224
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
225
225
|
}),
|
|
226
|
-
id: PropTypes.string,
|
|
226
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
227
227
|
label: PropTypes.string,
|
|
228
228
|
markerSize: PropTypes.number,
|
|
229
229
|
type: PropTypes.oneOf(['scatter']),
|
|
@@ -257,7 +257,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
257
257
|
* @default null
|
|
258
258
|
*/
|
|
259
259
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
260
|
-
axisId: PropTypes.string,
|
|
260
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
261
261
|
classes: PropTypes.object,
|
|
262
262
|
disableLine: PropTypes.bool,
|
|
263
263
|
disableTicks: PropTypes.bool,
|
|
@@ -294,7 +294,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
294
294
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
295
295
|
*/
|
|
296
296
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
297
|
-
axisId: PropTypes.string,
|
|
297
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
298
298
|
classes: PropTypes.object,
|
|
299
299
|
data: PropTypes.array,
|
|
300
300
|
dataKey: PropTypes.string,
|
|
@@ -302,13 +302,14 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
302
302
|
disableTicks: PropTypes.bool,
|
|
303
303
|
fill: PropTypes.string,
|
|
304
304
|
hideTooltip: PropTypes.bool,
|
|
305
|
-
id: PropTypes.string,
|
|
305
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
306
306
|
label: PropTypes.string,
|
|
307
307
|
labelFontSize: PropTypes.number,
|
|
308
308
|
labelStyle: PropTypes.object,
|
|
309
309
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
310
310
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
311
311
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
312
|
+
reverse: PropTypes.bool,
|
|
312
313
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
313
314
|
slotProps: PropTypes.object,
|
|
314
315
|
slots: PropTypes.object,
|
|
@@ -328,7 +329,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
328
329
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
329
330
|
*/
|
|
330
331
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
331
|
-
axisId: PropTypes.string,
|
|
332
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
332
333
|
classes: PropTypes.object,
|
|
333
334
|
data: PropTypes.array,
|
|
334
335
|
dataKey: PropTypes.string,
|
|
@@ -336,13 +337,14 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
336
337
|
disableTicks: PropTypes.bool,
|
|
337
338
|
fill: PropTypes.string,
|
|
338
339
|
hideTooltip: PropTypes.bool,
|
|
339
|
-
id: PropTypes.string,
|
|
340
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
340
341
|
label: PropTypes.string,
|
|
341
342
|
labelFontSize: PropTypes.number,
|
|
342
343
|
labelStyle: PropTypes.object,
|
|
343
344
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
344
345
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
345
346
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
347
|
+
reverse: PropTypes.bool,
|
|
346
348
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
347
349
|
slotProps: PropTypes.object,
|
|
348
350
|
slots: PropTypes.object,
|