@mui/x-charts 6.19.3 → 6.19.5
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 +117 -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.d.ts +7 -1
- package/SparkLineChart/SparkLineChart.js +14 -5
- 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 +14 -5
- 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 +16 -6
- 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 +14 -5
- package/modern/context/CartesianContextProvider.js +8 -6
- package/modern/index.js +1 -1
- package/package.json +1 -1
|
@@ -136,7 +136,7 @@ process.env.NODE_ENV !== "production" ? BarChart.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,
|
|
@@ -187,7 +187,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
187
187
|
* @default yAxisIds[0] The id of the first provided axis
|
|
188
188
|
*/
|
|
189
189
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
190
|
-
axisId: PropTypes.string,
|
|
190
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
191
191
|
classes: PropTypes.object,
|
|
192
192
|
disableLine: PropTypes.bool,
|
|
193
193
|
disableTicks: PropTypes.bool,
|
|
@@ -240,7 +240,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
240
240
|
* @default null
|
|
241
241
|
*/
|
|
242
242
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
243
|
-
axisId: PropTypes.string,
|
|
243
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
244
244
|
classes: PropTypes.object,
|
|
245
245
|
disableLine: PropTypes.bool,
|
|
246
246
|
disableTicks: PropTypes.bool,
|
|
@@ -269,7 +269,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
269
269
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
270
270
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
271
271
|
}),
|
|
272
|
-
id: PropTypes.string,
|
|
272
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
273
273
|
label: PropTypes.string,
|
|
274
274
|
layout: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
275
275
|
stack: PropTypes.string,
|
|
@@ -311,7 +311,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
311
311
|
* @default null
|
|
312
312
|
*/
|
|
313
313
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
314
|
-
axisId: PropTypes.string,
|
|
314
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
315
315
|
classes: PropTypes.object,
|
|
316
316
|
disableLine: PropTypes.bool,
|
|
317
317
|
disableTicks: PropTypes.bool,
|
|
@@ -348,7 +348,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
348
348
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
349
349
|
*/
|
|
350
350
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
351
|
-
axisId: PropTypes.string,
|
|
351
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
352
352
|
classes: PropTypes.object,
|
|
353
353
|
data: PropTypes.array,
|
|
354
354
|
dataKey: PropTypes.string,
|
|
@@ -356,13 +356,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
356
356
|
disableTicks: PropTypes.bool,
|
|
357
357
|
fill: PropTypes.string,
|
|
358
358
|
hideTooltip: PropTypes.bool,
|
|
359
|
-
id: PropTypes.string,
|
|
359
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
360
360
|
label: PropTypes.string,
|
|
361
361
|
labelFontSize: PropTypes.number,
|
|
362
362
|
labelStyle: PropTypes.object,
|
|
363
363
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
364
364
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
365
365
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
366
|
+
reverse: PropTypes.bool,
|
|
366
367
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
367
368
|
slotProps: PropTypes.object,
|
|
368
369
|
slots: PropTypes.object,
|
|
@@ -382,7 +383,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
382
383
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
383
384
|
*/
|
|
384
385
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
385
|
-
axisId: PropTypes.string,
|
|
386
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
386
387
|
classes: PropTypes.object,
|
|
387
388
|
data: PropTypes.array,
|
|
388
389
|
dataKey: PropTypes.string,
|
|
@@ -390,13 +391,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
390
391
|
disableTicks: PropTypes.bool,
|
|
391
392
|
fill: PropTypes.string,
|
|
392
393
|
hideTooltip: PropTypes.bool,
|
|
393
|
-
id: PropTypes.string,
|
|
394
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
394
395
|
label: PropTypes.string,
|
|
395
396
|
labelFontSize: PropTypes.number,
|
|
396
397
|
labelStyle: PropTypes.object,
|
|
397
398
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
398
399
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
399
400
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
401
|
+
reverse: PropTypes.bool,
|
|
400
402
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
401
403
|
slotProps: PropTypes.object,
|
|
402
404
|
slots: PropTypes.object,
|
|
@@ -101,6 +101,7 @@ process.env.NODE_ENV !== "production" ? BarElement.propTypes = {
|
|
|
101
101
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
102
102
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
103
103
|
}),
|
|
104
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
104
105
|
/**
|
|
105
106
|
* The props used for each component slot.
|
|
106
107
|
* @default {}
|
|
@@ -10,7 +10,7 @@ import { CartesianContext } from '../context/CartesianContextProvider';
|
|
|
10
10
|
import { BarElement } from './BarElement';
|
|
11
11
|
import { isBandScaleConfig } from '../models/axis';
|
|
12
12
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
|
|
13
|
-
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
/**
|
|
15
15
|
* Solution of the equations
|
|
16
16
|
* W = barWidth * N + offset * (N-1)
|
|
@@ -20,7 +20,6 @@ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
|
|
|
20
20
|
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
21
21
|
* @returns The bar width and the offset between bars.
|
|
22
22
|
*/
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
23
|
function getBandSize(_ref) {
|
|
25
24
|
var W = _ref.bandWidth,
|
|
26
25
|
N = _ref.numberOfGroups,
|
|
@@ -97,20 +96,21 @@ var useCompletedData = function useCompletedData() {
|
|
|
97
96
|
color = _series$seriesId.color;
|
|
98
97
|
return stackedData.map(function (values, dataIndex) {
|
|
99
98
|
var _xAxis$xAxisKey$data, _yAxis$yAxisKey$data;
|
|
100
|
-
var
|
|
101
|
-
|
|
99
|
+
var valueCoordinates = values.map(function (v) {
|
|
100
|
+
return verticalLayout ? yScale(v) : xScale(v);
|
|
101
|
+
});
|
|
102
|
+
var minValueCoord = Math.min.apply(Math, _toConsumableArray(valueCoordinates));
|
|
103
|
+
var maxValueCoord = Math.max.apply(Math, _toConsumableArray(valueCoordinates));
|
|
102
104
|
return {
|
|
103
|
-
bottom: bottom,
|
|
104
|
-
top: top,
|
|
105
105
|
seriesId: seriesId,
|
|
106
106
|
dataIndex: dataIndex,
|
|
107
107
|
layout: series[seriesId].layout,
|
|
108
|
-
x: verticalLayout ? xScale((_xAxis$xAxisKey$data = xAxis[xAxisKey].data) == null ? void 0 : _xAxis$xAxisKey$data[dataIndex]) + barOffset :
|
|
109
|
-
y: verticalLayout ?
|
|
108
|
+
x: verticalLayout ? xScale((_xAxis$xAxisKey$data = xAxis[xAxisKey].data) == null ? void 0 : _xAxis$xAxisKey$data[dataIndex]) + barOffset : minValueCoord,
|
|
109
|
+
y: verticalLayout ? minValueCoord : yScale((_yAxis$yAxisKey$data = yAxis[yAxisKey].data) == null ? void 0 : _yAxis$yAxisKey$data[dataIndex]) + barOffset,
|
|
110
110
|
xOrigin: xScale(0),
|
|
111
111
|
yOrigin: yScale(0),
|
|
112
|
-
height: verticalLayout ?
|
|
113
|
-
width: verticalLayout ? barWidth :
|
|
112
|
+
height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
|
|
113
|
+
width: verticalLayout ? barWidth : maxValueCoord - minValueCoord,
|
|
114
114
|
color: color,
|
|
115
115
|
highlightScope: series[seriesId].highlightScope
|
|
116
116
|
};
|
|
@@ -99,7 +99,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
99
99
|
* @default xAxisIds[0] The id of the first provided axis
|
|
100
100
|
*/
|
|
101
101
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
102
|
-
axisId: PropTypes.string,
|
|
102
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
103
103
|
classes: PropTypes.object,
|
|
104
104
|
disableLine: PropTypes.bool,
|
|
105
105
|
disableTicks: PropTypes.bool,
|
|
@@ -126,7 +126,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
126
126
|
* @default yAxisIds[0] The id of the first provided axis
|
|
127
127
|
*/
|
|
128
128
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
129
|
-
axisId: PropTypes.string,
|
|
129
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
130
130
|
classes: PropTypes.object,
|
|
131
131
|
disableLine: PropTypes.bool,
|
|
132
132
|
disableTicks: PropTypes.bool,
|
|
@@ -153,7 +153,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
153
153
|
* @default null
|
|
154
154
|
*/
|
|
155
155
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
156
|
-
axisId: PropTypes.string,
|
|
156
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
157
157
|
classes: PropTypes.object,
|
|
158
158
|
disableLine: PropTypes.bool,
|
|
159
159
|
disableTicks: PropTypes.bool,
|
|
@@ -190,7 +190,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
190
190
|
* @default null
|
|
191
191
|
*/
|
|
192
192
|
topAxis: 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,
|
|
@@ -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
|