@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
|
@@ -6,11 +6,11 @@ export interface InteractionProviderProps {
|
|
|
6
6
|
export type ItemInteractionData<T extends ChartSeriesType> = ChartItemIdentifier<T>;
|
|
7
7
|
export type AxisInteractionData = {
|
|
8
8
|
x: null | {
|
|
9
|
-
value: number | Date;
|
|
9
|
+
value: number | string | Date;
|
|
10
10
|
index?: number;
|
|
11
11
|
};
|
|
12
12
|
y: null | {
|
|
13
|
-
value: number | Date;
|
|
13
|
+
value: number | string | Date;
|
|
14
14
|
index?: number;
|
|
15
15
|
};
|
|
16
16
|
};
|
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -131,7 +131,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
131
131
|
* @default xAxisIds[0] The id of the first provided axis
|
|
132
132
|
*/
|
|
133
133
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
134
|
-
axisId: PropTypes.string,
|
|
134
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
135
135
|
classes: PropTypes.object,
|
|
136
136
|
disableLine: PropTypes.bool,
|
|
137
137
|
disableTicks: PropTypes.bool,
|
|
@@ -182,7 +182,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
182
182
|
* @default yAxisIds[0] The id of the first provided axis
|
|
183
183
|
*/
|
|
184
184
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
185
|
-
axisId: PropTypes.string,
|
|
185
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
186
186
|
classes: PropTypes.object,
|
|
187
187
|
disableLine: PropTypes.bool,
|
|
188
188
|
disableTicks: PropTypes.bool,
|
|
@@ -235,7 +235,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
235
235
|
* @default null
|
|
236
236
|
*/
|
|
237
237
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
238
|
-
axisId: PropTypes.string,
|
|
238
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
239
239
|
classes: PropTypes.object,
|
|
240
240
|
disableLine: PropTypes.bool,
|
|
241
241
|
disableTicks: PropTypes.bool,
|
|
@@ -264,7 +264,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
264
264
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
265
265
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
266
266
|
}),
|
|
267
|
-
id: PropTypes.string,
|
|
267
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
268
268
|
label: PropTypes.string,
|
|
269
269
|
layout: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
270
270
|
stack: PropTypes.string,
|
|
@@ -306,7 +306,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
306
306
|
* @default null
|
|
307
307
|
*/
|
|
308
308
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
309
|
-
axisId: PropTypes.string,
|
|
309
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
310
310
|
classes: PropTypes.object,
|
|
311
311
|
disableLine: PropTypes.bool,
|
|
312
312
|
disableTicks: PropTypes.bool,
|
|
@@ -343,7 +343,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
343
343
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
344
344
|
*/
|
|
345
345
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
346
|
-
axisId: PropTypes.string,
|
|
346
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
347
347
|
classes: PropTypes.object,
|
|
348
348
|
data: PropTypes.array,
|
|
349
349
|
dataKey: PropTypes.string,
|
|
@@ -351,13 +351,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
351
351
|
disableTicks: PropTypes.bool,
|
|
352
352
|
fill: PropTypes.string,
|
|
353
353
|
hideTooltip: PropTypes.bool,
|
|
354
|
-
id: PropTypes.string,
|
|
354
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
355
355
|
label: PropTypes.string,
|
|
356
356
|
labelFontSize: PropTypes.number,
|
|
357
357
|
labelStyle: PropTypes.object,
|
|
358
358
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
359
359
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
360
360
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
361
|
+
reverse: PropTypes.bool,
|
|
361
362
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
362
363
|
slotProps: PropTypes.object,
|
|
363
364
|
slots: PropTypes.object,
|
|
@@ -377,7 +378,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
377
378
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
378
379
|
*/
|
|
379
380
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
380
|
-
axisId: PropTypes.string,
|
|
381
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
381
382
|
classes: PropTypes.object,
|
|
382
383
|
data: PropTypes.array,
|
|
383
384
|
dataKey: PropTypes.string,
|
|
@@ -385,13 +386,14 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
385
386
|
disableTicks: PropTypes.bool,
|
|
386
387
|
fill: PropTypes.string,
|
|
387
388
|
hideTooltip: PropTypes.bool,
|
|
388
|
-
id: PropTypes.string,
|
|
389
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
389
390
|
label: PropTypes.string,
|
|
390
391
|
labelFontSize: PropTypes.number,
|
|
391
392
|
labelStyle: PropTypes.object,
|
|
392
393
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
393
394
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
394
395
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
396
|
+
reverse: PropTypes.bool,
|
|
395
397
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
396
398
|
slotProps: PropTypes.object,
|
|
397
399
|
slots: PropTypes.object,
|
|
@@ -103,6 +103,7 @@ process.env.NODE_ENV !== "production" ? BarElement.propTypes = {
|
|
|
103
103
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
104
104
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
105
105
|
}),
|
|
106
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
106
107
|
/**
|
|
107
108
|
* The props used for each component slot.
|
|
108
109
|
* @default {}
|
package/esm/BarChart/BarPlot.js
CHANGED
|
@@ -9,7 +9,7 @@ import { CartesianContext } from '../context/CartesianContextProvider';
|
|
|
9
9
|
import { BarElement } from './BarElement';
|
|
10
10
|
import { isBandScaleConfig } from '../models/axis';
|
|
11
11
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
|
|
12
|
-
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
/**
|
|
14
14
|
* Solution of the equations
|
|
15
15
|
* W = barWidth * N + offset * (N-1)
|
|
@@ -19,7 +19,6 @@ import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from '../constants';
|
|
|
19
19
|
* @param gapRatio The ratio of the gap between bars over the bar width.
|
|
20
20
|
* @returns The bar width and the offset between bars.
|
|
21
21
|
*/
|
|
22
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
22
|
function getBandSize({
|
|
24
23
|
bandWidth: W,
|
|
25
24
|
numberOfGroups: N,
|
|
@@ -104,20 +103,19 @@ const useCompletedData = () => {
|
|
|
104
103
|
} = series[seriesId];
|
|
105
104
|
return stackedData.map((values, dataIndex) => {
|
|
106
105
|
var _xAxis$xAxisKey$data, _yAxis$yAxisKey$data;
|
|
107
|
-
const
|
|
108
|
-
const
|
|
106
|
+
const valueCoordinates = values.map(v => verticalLayout ? yScale(v) : xScale(v));
|
|
107
|
+
const minValueCoord = Math.min(...valueCoordinates);
|
|
108
|
+
const maxValueCoord = Math.max(...valueCoordinates);
|
|
109
109
|
return {
|
|
110
|
-
bottom,
|
|
111
|
-
top,
|
|
112
110
|
seriesId,
|
|
113
111
|
dataIndex,
|
|
114
112
|
layout: series[seriesId].layout,
|
|
115
|
-
x: verticalLayout ? xScale((_xAxis$xAxisKey$data = xAxis[xAxisKey].data) == null ? void 0 : _xAxis$xAxisKey$data[dataIndex]) + barOffset :
|
|
116
|
-
y: verticalLayout ?
|
|
113
|
+
x: verticalLayout ? xScale((_xAxis$xAxisKey$data = xAxis[xAxisKey].data) == null ? void 0 : _xAxis$xAxisKey$data[dataIndex]) + barOffset : minValueCoord,
|
|
114
|
+
y: verticalLayout ? minValueCoord : yScale((_yAxis$yAxisKey$data = yAxis[yAxisKey].data) == null ? void 0 : _yAxis$yAxisKey$data[dataIndex]) + barOffset,
|
|
117
115
|
xOrigin: xScale(0),
|
|
118
116
|
yOrigin: yScale(0),
|
|
119
|
-
height: verticalLayout ?
|
|
120
|
-
width: verticalLayout ? barWidth :
|
|
117
|
+
height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
|
|
118
|
+
width: verticalLayout ? barWidth : maxValueCoord - minValueCoord,
|
|
121
119
|
color,
|
|
122
120
|
highlightScope: series[seriesId].highlightScope
|
|
123
121
|
};
|
|
@@ -101,7 +101,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
101
101
|
* @default xAxisIds[0] The id of the first provided axis
|
|
102
102
|
*/
|
|
103
103
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
104
|
-
axisId: PropTypes.string,
|
|
104
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
105
105
|
classes: PropTypes.object,
|
|
106
106
|
disableLine: PropTypes.bool,
|
|
107
107
|
disableTicks: PropTypes.bool,
|
|
@@ -128,7 +128,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
128
128
|
* @default yAxisIds[0] The id of the first provided axis
|
|
129
129
|
*/
|
|
130
130
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
131
|
-
axisId: PropTypes.string,
|
|
131
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
132
132
|
classes: PropTypes.object,
|
|
133
133
|
disableLine: PropTypes.bool,
|
|
134
134
|
disableTicks: PropTypes.bool,
|
|
@@ -155,7 +155,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
155
155
|
* @default null
|
|
156
156
|
*/
|
|
157
157
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
158
|
-
axisId: PropTypes.string,
|
|
158
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
159
159
|
classes: PropTypes.object,
|
|
160
160
|
disableLine: PropTypes.bool,
|
|
161
161
|
disableTicks: PropTypes.bool,
|
|
@@ -192,7 +192,7 @@ process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
|
192
192
|
* @default null
|
|
193
193
|
*/
|
|
194
194
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
195
|
-
axisId: PropTypes.string,
|
|
195
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
196
196
|
classes: PropTypes.object,
|
|
197
197
|
disableLine: PropTypes.bool,
|
|
198
198
|
disableTicks: PropTypes.bool,
|
|
@@ -235,107 +235,6 @@ function DefaultChartsLegend(props) {
|
|
|
235
235
|
})
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
239
|
-
// ----------------------------- Warning --------------------------------
|
|
240
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
241
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
242
|
-
// ----------------------------------------------------------------------
|
|
243
|
-
/**
|
|
244
|
-
* Override or extend the styles applied to the component.
|
|
245
|
-
*/
|
|
246
|
-
classes: PropTypes.object.isRequired,
|
|
247
|
-
/**
|
|
248
|
-
* The direction of the legend layout.
|
|
249
|
-
* The default depends on the chart.
|
|
250
|
-
*/
|
|
251
|
-
direction: PropTypes.oneOf(['column', 'row']).isRequired,
|
|
252
|
-
drawingArea: PropTypes.shape({
|
|
253
|
-
bottom: PropTypes.number.isRequired,
|
|
254
|
-
height: PropTypes.number.isRequired,
|
|
255
|
-
left: PropTypes.number.isRequired,
|
|
256
|
-
right: PropTypes.number.isRequired,
|
|
257
|
-
top: PropTypes.number.isRequired,
|
|
258
|
-
width: PropTypes.number.isRequired
|
|
259
|
-
}).isRequired,
|
|
260
|
-
/**
|
|
261
|
-
* Set to true to hide the legend.
|
|
262
|
-
* @default false
|
|
263
|
-
*/
|
|
264
|
-
hidden: PropTypes.bool,
|
|
265
|
-
/**
|
|
266
|
-
* Space between two legend items (in px).
|
|
267
|
-
* @default 10
|
|
268
|
-
*/
|
|
269
|
-
itemGap: PropTypes.number,
|
|
270
|
-
/**
|
|
271
|
-
* Height of the item mark (in px).
|
|
272
|
-
* @default 20
|
|
273
|
-
*/
|
|
274
|
-
itemMarkHeight: PropTypes.number,
|
|
275
|
-
/**
|
|
276
|
-
* Width of the item mark (in px).
|
|
277
|
-
* @default 20
|
|
278
|
-
*/
|
|
279
|
-
itemMarkWidth: PropTypes.number,
|
|
280
|
-
/**
|
|
281
|
-
* Style applied to legend labels.
|
|
282
|
-
* @default theme.typography.subtitle1
|
|
283
|
-
*/
|
|
284
|
-
labelStyle: PropTypes.object,
|
|
285
|
-
/**
|
|
286
|
-
* Space between the mark and the label (in px).
|
|
287
|
-
* @default 5
|
|
288
|
-
*/
|
|
289
|
-
markGap: PropTypes.number,
|
|
290
|
-
/**
|
|
291
|
-
* Legend padding (in px).
|
|
292
|
-
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
293
|
-
* @default 0
|
|
294
|
-
*/
|
|
295
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
296
|
-
bottom: PropTypes.number,
|
|
297
|
-
left: PropTypes.number,
|
|
298
|
-
right: PropTypes.number,
|
|
299
|
-
top: PropTypes.number
|
|
300
|
-
})]),
|
|
301
|
-
position: PropTypes.shape({
|
|
302
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
303
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
304
|
-
}).isRequired,
|
|
305
|
-
series: PropTypes.shape({
|
|
306
|
-
bar: PropTypes.shape({
|
|
307
|
-
series: PropTypes.object.isRequired,
|
|
308
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
309
|
-
stackingGroups: PropTypes.arrayOf(PropTypes.shape({
|
|
310
|
-
ids: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
311
|
-
stackingOffset: PropTypes.func.isRequired,
|
|
312
|
-
stackingOrder: PropTypes.func.isRequired
|
|
313
|
-
})).isRequired
|
|
314
|
-
}),
|
|
315
|
-
line: PropTypes.shape({
|
|
316
|
-
series: PropTypes.object.isRequired,
|
|
317
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
318
|
-
stackingGroups: PropTypes.arrayOf(PropTypes.shape({
|
|
319
|
-
ids: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
320
|
-
stackingOffset: PropTypes.func.isRequired,
|
|
321
|
-
stackingOrder: PropTypes.func.isRequired
|
|
322
|
-
})).isRequired
|
|
323
|
-
}),
|
|
324
|
-
pie: PropTypes.shape({
|
|
325
|
-
series: PropTypes.object.isRequired,
|
|
326
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
327
|
-
}),
|
|
328
|
-
scatter: PropTypes.shape({
|
|
329
|
-
series: PropTypes.object.isRequired,
|
|
330
|
-
seriesOrder: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
331
|
-
})
|
|
332
|
-
}).isRequired,
|
|
333
|
-
seriesToDisplay: PropTypes.arrayOf(PropTypes.shape({
|
|
334
|
-
color: PropTypes.string.isRequired,
|
|
335
|
-
id: PropTypes.string.isRequired,
|
|
336
|
-
label: PropTypes.string.isRequired
|
|
337
|
-
})).isRequired
|
|
338
|
-
} : void 0;
|
|
339
238
|
function ChartsLegend(inProps) {
|
|
340
239
|
var _slots$legend;
|
|
341
240
|
const props = useThemeProps({
|
|
@@ -29,7 +29,7 @@ process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
|
29
29
|
* The id of the axis used for the reference value.
|
|
30
30
|
* @default The `id` of the first defined axis.
|
|
31
31
|
*/
|
|
32
|
-
axisId: PropTypes.string,
|
|
32
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
33
33
|
/**
|
|
34
34
|
* Override or extend the styles applied to the component.
|
|
35
35
|
*/
|
|
@@ -66,11 +66,11 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
|
|
|
66
66
|
axisData: PropTypes.shape({
|
|
67
67
|
x: PropTypes.shape({
|
|
68
68
|
index: PropTypes.number,
|
|
69
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
69
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
70
70
|
}),
|
|
71
71
|
y: PropTypes.shape({
|
|
72
72
|
index: PropTypes.number,
|
|
73
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
73
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
74
74
|
})
|
|
75
75
|
}).isRequired,
|
|
76
76
|
classes: PropTypes.object.isRequired,
|
|
@@ -80,11 +80,11 @@ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
|
|
|
80
80
|
axisData: PropTypes.shape({
|
|
81
81
|
x: PropTypes.shape({
|
|
82
82
|
index: PropTypes.number,
|
|
83
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
83
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
84
84
|
}),
|
|
85
85
|
y: PropTypes.shape({
|
|
86
86
|
index: PropTypes.number,
|
|
87
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
87
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
88
88
|
})
|
|
89
89
|
}),
|
|
90
90
|
axisValue: PropTypes.any,
|
|
@@ -39,7 +39,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
39
39
|
classes: PropTypes.object,
|
|
40
40
|
itemData: PropTypes.shape({
|
|
41
41
|
dataIndex: PropTypes.number,
|
|
42
|
-
seriesId: PropTypes.string.isRequired,
|
|
42
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
43
43
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
44
44
|
}),
|
|
45
45
|
series: PropTypes.shape({
|
|
@@ -63,7 +63,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
63
63
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
64
64
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
65
65
|
}),
|
|
66
|
-
id: PropTypes.string.isRequired,
|
|
66
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
67
67
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired,
|
|
68
68
|
valueFormatter: PropTypes.func.isRequired
|
|
69
69
|
}),
|
|
@@ -71,7 +71,7 @@ process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
|
71
71
|
}),
|
|
72
72
|
itemData: PropTypes.shape({
|
|
73
73
|
dataIndex: PropTypes.number,
|
|
74
|
-
seriesId: PropTypes.string.isRequired,
|
|
74
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
75
75
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
76
76
|
}).isRequired,
|
|
77
77
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
@@ -88,11 +88,11 @@ process.env.NODE_ENV !== "production" ? DefaultChartsAxisTooltipContent.propType
|
|
|
88
88
|
axisData: PropTypes.shape({
|
|
89
89
|
x: PropTypes.shape({
|
|
90
90
|
index: PropTypes.number,
|
|
91
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
91
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
92
92
|
}),
|
|
93
93
|
y: PropTypes.shape({
|
|
94
94
|
index: PropTypes.number,
|
|
95
|
-
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired
|
|
95
|
+
value: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired
|
|
96
96
|
})
|
|
97
97
|
}).isRequired,
|
|
98
98
|
/**
|
|
@@ -70,7 +70,7 @@ process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propType
|
|
|
70
70
|
*/
|
|
71
71
|
itemData: PropTypes.shape({
|
|
72
72
|
dataIndex: PropTypes.number,
|
|
73
|
-
seriesId: PropTypes.string.isRequired,
|
|
73
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
74
74
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired
|
|
75
75
|
}).isRequired,
|
|
76
76
|
/**
|
|
@@ -97,7 +97,7 @@ process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propType
|
|
|
97
97
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
98
98
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
99
99
|
}),
|
|
100
|
-
id: PropTypes.string.isRequired,
|
|
100
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
101
101
|
type: PropTypes.oneOf(['bar', 'line', 'pie', 'scatter']).isRequired,
|
|
102
102
|
valueFormatter: PropTypes.func.isRequired
|
|
103
103
|
}).isRequired,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["scale", "tickNumber"];
|
|
3
|
+
const _excluded = ["scale", "tickNumber", "reverse"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useSlotProps } from '@mui/base/utils';
|
|
@@ -35,6 +35,7 @@ const useUtilityClasses = ownerState => {
|
|
|
35
35
|
function addLabelDimension(xTicks, {
|
|
36
36
|
tickLabelStyle: style,
|
|
37
37
|
tickLabelInterval,
|
|
38
|
+
reverse,
|
|
38
39
|
isMounted
|
|
39
40
|
}) {
|
|
40
41
|
const withDimension = xTicks.map(tick => {
|
|
@@ -61,8 +62,9 @@ function addLabelDimension(xTicks, {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
// Filter label to avoid overlap
|
|
64
|
-
let
|
|
65
|
-
let
|
|
65
|
+
let currentTextLimit = 0;
|
|
66
|
+
let previouseTextLimit = 0;
|
|
67
|
+
const direction = reverse ? -1 : 1;
|
|
66
68
|
return withDimension.map((item, labelIndex) => {
|
|
67
69
|
const {
|
|
68
70
|
width,
|
|
@@ -74,15 +76,15 @@ function addLabelDimension(xTicks, {
|
|
|
74
76
|
const textPosition = offset + labelOffset;
|
|
75
77
|
const 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
|
}
|
|
@@ -117,7 +119,8 @@ function ChartsXAxis(inProps) {
|
|
|
117
119
|
xAxis: {
|
|
118
120
|
[_ref]: {
|
|
119
121
|
scale: xScale,
|
|
120
|
-
tickNumber
|
|
122
|
+
tickNumber,
|
|
123
|
+
reverse
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
} = _React$useContext,
|
|
@@ -179,6 +182,7 @@ function ChartsXAxis(inProps) {
|
|
|
179
182
|
const xTicksWithDimension = addLabelDimension(xTicks, {
|
|
180
183
|
tickLabelStyle: axisTickLabelProps.style,
|
|
181
184
|
tickLabelInterval,
|
|
185
|
+
reverse,
|
|
182
186
|
isMounted
|
|
183
187
|
});
|
|
184
188
|
const labelRefPoint = {
|
|
@@ -242,7 +246,7 @@ process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
|
242
246
|
* The id of the axis to render.
|
|
243
247
|
* If undefined, it will be the first defined axis.
|
|
244
248
|
*/
|
|
245
|
-
axisId: PropTypes.string,
|
|
249
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
246
250
|
/**
|
|
247
251
|
* Override or extend the styles applied to the component.
|
|
248
252
|
*/
|
|
@@ -176,7 +176,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
176
176
|
* The id of the axis to render.
|
|
177
177
|
* If undefined, it will be the first defined axis.
|
|
178
178
|
*/
|
|
179
|
-
axisId: PropTypes.string,
|
|
179
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
180
180
|
/**
|
|
181
181
|
* Override or extend the styles applied to the component.
|
|
182
182
|
*/
|
|
@@ -120,6 +120,7 @@ process.env.NODE_ENV !== "production" ? AreaElement.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 {}
|
|
@@ -132,7 +132,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
132
132
|
* @default xAxisIds[0] The id of the first provided axis
|
|
133
133
|
*/
|
|
134
134
|
bottomAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
135
|
-
axisId: PropTypes.string,
|
|
135
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
136
136
|
classes: PropTypes.object,
|
|
137
137
|
disableLine: PropTypes.bool,
|
|
138
138
|
disableTicks: PropTypes.bool,
|
|
@@ -186,7 +186,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
186
186
|
* @default yAxisIds[0] The id of the first provided axis
|
|
187
187
|
*/
|
|
188
188
|
leftAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
189
|
-
axisId: PropTypes.string,
|
|
189
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
190
190
|
classes: PropTypes.object,
|
|
191
191
|
disableLine: PropTypes.bool,
|
|
192
192
|
disableTicks: PropTypes.bool,
|
|
@@ -239,7 +239,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
239
239
|
* @default null
|
|
240
240
|
*/
|
|
241
241
|
rightAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
242
|
-
axisId: PropTypes.string,
|
|
242
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
243
243
|
classes: PropTypes.object,
|
|
244
244
|
disableLine: PropTypes.bool,
|
|
245
245
|
disableTicks: PropTypes.bool,
|
|
@@ -272,7 +272,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
272
272
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
273
273
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
274
274
|
}),
|
|
275
|
-
id: PropTypes.string,
|
|
275
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
276
276
|
label: PropTypes.string,
|
|
277
277
|
showMark: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
278
278
|
stack: PropTypes.string,
|
|
@@ -309,7 +309,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
309
309
|
* @default null
|
|
310
310
|
*/
|
|
311
311
|
topAxis: PropTypes.oneOfType([PropTypes.shape({
|
|
312
|
-
axisId: PropTypes.string,
|
|
312
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
313
313
|
classes: PropTypes.object,
|
|
314
314
|
disableLine: PropTypes.bool,
|
|
315
315
|
disableTicks: PropTypes.bool,
|
|
@@ -346,7 +346,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
346
346
|
* If not provided, a default axis config is used with id set to `DEFAULT_X_AXIS_KEY`.
|
|
347
347
|
*/
|
|
348
348
|
xAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
349
|
-
axisId: PropTypes.string,
|
|
349
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
350
350
|
classes: PropTypes.object,
|
|
351
351
|
data: PropTypes.array,
|
|
352
352
|
dataKey: PropTypes.string,
|
|
@@ -354,13 +354,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
354
354
|
disableTicks: PropTypes.bool,
|
|
355
355
|
fill: PropTypes.string,
|
|
356
356
|
hideTooltip: PropTypes.bool,
|
|
357
|
-
id: PropTypes.string,
|
|
357
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
358
358
|
label: PropTypes.string,
|
|
359
359
|
labelFontSize: PropTypes.number,
|
|
360
360
|
labelStyle: PropTypes.object,
|
|
361
361
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
362
362
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
363
363
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
364
|
+
reverse: PropTypes.bool,
|
|
364
365
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
365
366
|
slotProps: PropTypes.object,
|
|
366
367
|
slots: PropTypes.object,
|
|
@@ -380,7 +381,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
380
381
|
* If not provided, a default axis config is used with id set to `DEFAULT_Y_AXIS_KEY`.
|
|
381
382
|
*/
|
|
382
383
|
yAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
383
|
-
axisId: PropTypes.string,
|
|
384
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
384
385
|
classes: PropTypes.object,
|
|
385
386
|
data: PropTypes.array,
|
|
386
387
|
dataKey: PropTypes.string,
|
|
@@ -388,13 +389,14 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
388
389
|
disableTicks: PropTypes.bool,
|
|
389
390
|
fill: PropTypes.string,
|
|
390
391
|
hideTooltip: PropTypes.bool,
|
|
391
|
-
id: PropTypes.string,
|
|
392
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
392
393
|
label: PropTypes.string,
|
|
393
394
|
labelFontSize: PropTypes.number,
|
|
394
395
|
labelStyle: PropTypes.object,
|
|
395
396
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
396
397
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
397
398
|
position: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),
|
|
399
|
+
reverse: PropTypes.bool,
|
|
398
400
|
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
399
401
|
slotProps: PropTypes.object,
|
|
400
402
|
slots: PropTypes.object,
|
|
@@ -122,6 +122,7 @@ process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
|
|
|
122
122
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
123
123
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
124
124
|
}),
|
|
125
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
125
126
|
/**
|
|
126
127
|
* The props used for each component slot.
|
|
127
128
|
* @default {}
|
|
@@ -73,6 +73,7 @@ process.env.NODE_ENV !== "production" ? LineHighlightElement.propTypes = {
|
|
|
73
73
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
74
74
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
75
75
|
// ----------------------------------------------------------------------
|
|
76
|
-
classes: PropTypes.object
|
|
76
|
+
classes: PropTypes.object,
|
|
77
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired
|
|
77
78
|
} : void 0;
|
|
78
79
|
export { LineHighlightElement };
|
|
@@ -129,6 +129,7 @@ process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
|
|
|
129
129
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
130
130
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
131
131
|
}),
|
|
132
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
132
133
|
/**
|
|
133
134
|
* The shape of the marker.
|
|
134
135
|
*/
|
package/esm/PieChart/PieArc.js
CHANGED
|
@@ -95,6 +95,7 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
|
|
|
95
95
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
96
96
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
97
97
|
}),
|
|
98
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
98
99
|
isFaded: PropTypes.bool.isRequired,
|
|
99
100
|
isHighlighted: PropTypes.bool.isRequired
|
|
100
101
|
} : void 0;
|
|
@@ -98,6 +98,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
|
|
|
98
98
|
// ----------------------------------------------------------------------
|
|
99
99
|
classes: PropTypes.object,
|
|
100
100
|
formattedArcLabel: PropTypes.string,
|
|
101
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
101
102
|
isFaded: PropTypes.bool.isRequired,
|
|
102
103
|
isHighlighted: PropTypes.bool.isRequired
|
|
103
104
|
} : 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
|
|
@@ -138,7 +138,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
138
138
|
faded: PropTypes.oneOf(['global', 'none', 'series']),
|
|
139
139
|
highlighted: PropTypes.oneOf(['item', 'none', 'series'])
|
|
140
140
|
}),
|
|
141
|
-
id: PropTypes.string.isRequired,
|
|
141
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
142
142
|
/**
|
|
143
143
|
* The radius between circle center and the begining of the arc.
|
|
144
144
|
* @default 0
|