@mui/x-charts 7.4.0 → 7.5.1
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 +24 -13
- package/BarChart/BarElement.d.ts +10 -5
- package/BarChart/BarElement.js +4 -3
- package/BarChart/BarLabel/BarLabel.d.ts +1342 -0
- package/BarChart/BarLabel/BarLabel.js +60 -0
- package/BarChart/BarLabel/BarLabel.types.d.ts +39 -0
- package/BarChart/BarLabel/BarLabel.types.js +5 -0
- package/BarChart/BarLabel/BarLabelItem.d.ts +53 -0
- package/BarChart/BarLabel/BarLabelItem.js +138 -0
- package/BarChart/BarLabel/BarLabelPlot.d.ts +16 -0
- package/BarChart/BarLabel/BarLabelPlot.js +110 -0
- package/BarChart/BarLabel/barLabelClasses.d.ts +13 -0
- package/BarChart/BarLabel/barLabelClasses.js +29 -0
- package/BarChart/BarLabel/getBarLabel.d.ts +10 -0
- package/BarChart/BarLabel/getBarLabel.js +31 -0
- package/BarChart/BarLabel/index.d.ts +6 -0
- package/BarChart/BarLabel/index.js +25 -0
- package/BarChart/BarPlot.d.ts +15 -4
- package/BarChart/BarPlot.js +18 -4
- package/BarChart/index.d.ts +1 -0
- package/BarChart/index.js +11 -0
- package/BarChart/legend.js +13 -6
- package/CHANGELOG.md +132 -5395
- package/ChartContainer/ChartContainer.js +11 -11
- package/ChartsAxis/ChartsAxis.js +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/ChartsClipPath/ChartsClipPath.js +1 -1
- package/ChartsGrid/ChartsGrid.js +1 -1
- package/ChartsLegend/ChartsLegend.js +1 -1
- package/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/ChartsOverlay/ChartsOverlay.d.ts +9 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/ChartsSurface.js +1 -1
- package/ChartsText/ChartsText.js +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/ChartsTooltip/ChartsTooltip.js +1 -1
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/ChartsTooltip/utils.js +13 -8
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/ChartsXAxis/ChartsXAxis.js +2 -3
- package/ChartsYAxis/ChartsYAxis.js +3 -3
- package/Gauge/Gauge.js +1 -1
- package/Gauge/GaugeContainer.js +1 -1
- package/Gauge/GaugeValueText.js +1 -1
- package/LineChart/AnimatedArea.js +1 -1
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaElement.js +4 -4
- package/LineChart/AreaPlot.js +4 -3
- package/LineChart/LineChart.js +12 -11
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineElement.js +4 -4
- package/LineChart/LineHighlightElement.d.ts +1 -1
- package/LineChart/LineHighlightElement.js +1 -1
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +1 -16
- package/LineChart/MarkPlot.js +1 -1
- package/LineChart/legend.js +13 -6
- package/PieChart/PieArc.d.ts +1 -1
- package/PieChart/PieArc.js +1 -1
- package/PieChart/PieArcLabel.d.ts +1 -1
- package/PieChart/PieArcLabel.js +4 -2
- package/PieChart/PieArcLabelPlot.js +15 -6
- package/PieChart/PieArcPlot.js +2 -2
- package/PieChart/PieChart.js +12 -11
- package/PieChart/PiePlot.js +1 -1
- package/PieChart/formatter.js +4 -1
- package/PieChart/legend.js +15 -5
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/ScatterChart/Scatter.js +1 -1
- package/ScatterChart/ScatterChart.js +17 -16
- package/ScatterChart/ScatterPlot.js +1 -1
- package/ScatterChart/legend.js +13 -6
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +6 -6
- package/context/ZAxisContextProvider.js +6 -6
- package/esm/BarChart/BarChart.js +24 -13
- package/esm/BarChart/BarElement.js +4 -3
- package/esm/BarChart/BarLabel/BarLabel.js +51 -0
- package/esm/BarChart/BarLabel/BarLabel.types.js +1 -0
- package/esm/BarChart/BarLabel/BarLabelItem.js +130 -0
- package/esm/BarChart/BarLabel/BarLabelPlot.js +102 -0
- package/esm/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/esm/BarChart/BarLabel/getBarLabel.js +24 -0
- package/esm/BarChart/BarLabel/index.js +2 -0
- package/esm/BarChart/BarPlot.js +18 -4
- package/esm/BarChart/index.js +2 -1
- package/esm/BarChart/legend.js +13 -6
- package/esm/ChartContainer/ChartContainer.js +11 -11
- package/esm/ChartsAxis/ChartsAxis.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/esm/ChartsClipPath/ChartsClipPath.js +1 -1
- package/esm/ChartsGrid/ChartsGrid.js +1 -1
- package/esm/ChartsLegend/ChartsLegend.js +1 -1
- package/esm/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/esm/ChartsSurface.js +1 -1
- package/esm/ChartsText/ChartsText.js +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/esm/ChartsTooltip/ChartsTooltip.js +1 -1
- package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/esm/ChartsTooltip/utils.js +13 -8
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +2 -3
- package/esm/ChartsYAxis/ChartsYAxis.js +3 -3
- package/esm/Gauge/Gauge.js +1 -1
- package/esm/Gauge/GaugeContainer.js +1 -1
- package/esm/Gauge/GaugeValueText.js +1 -1
- package/esm/LineChart/AnimatedArea.js +1 -1
- package/esm/LineChart/AnimatedLine.js +1 -1
- package/esm/LineChart/AreaElement.js +4 -4
- package/esm/LineChart/AreaPlot.js +4 -3
- package/esm/LineChart/LineChart.js +12 -11
- package/esm/LineChart/LineElement.js +4 -4
- package/esm/LineChart/LineHighlightElement.js +1 -1
- package/esm/LineChart/LineHighlightPlot.js +1 -1
- package/esm/LineChart/LinePlot.js +1 -1
- package/esm/LineChart/MarkElement.js +1 -16
- package/esm/LineChart/MarkPlot.js +1 -1
- package/esm/LineChart/legend.js +13 -6
- package/esm/PieChart/PieArc.js +1 -1
- package/esm/PieChart/PieArcLabel.js +4 -2
- package/esm/PieChart/PieArcLabelPlot.js +15 -6
- package/esm/PieChart/PieArcPlot.js +2 -2
- package/esm/PieChart/PieChart.js +12 -11
- package/esm/PieChart/PiePlot.js +1 -1
- package/esm/PieChart/formatter.js +4 -1
- package/esm/PieChart/legend.js +15 -5
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/esm/ScatterChart/Scatter.js +1 -1
- package/esm/ScatterChart/ScatterChart.js +17 -16
- package/esm/ScatterChart/ScatterPlot.js +1 -1
- package/esm/ScatterChart/legend.js +13 -6
- package/esm/SparkLineChart/SparkLineChart.js +6 -6
- package/esm/context/ZAxisContextProvider.js +6 -6
- package/esm/hooks/useAxisEvents.js +12 -7
- package/esm/internals/getLabel.js +3 -0
- package/hooks/useAxisEvents.js +12 -7
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +7 -5
- package/internals/getLabel.d.ts +1 -0
- package/internals/getLabel.js +9 -0
- package/internals/utils.d.ts +1 -1
- package/models/seriesType/bar.d.ts +4 -1
- package/models/seriesType/line.d.ts +4 -1
- package/models/seriesType/pie.d.ts +9 -4
- package/models/seriesType/scatter.d.ts +4 -1
- package/modern/BarChart/BarChart.js +24 -13
- package/modern/BarChart/BarElement.js +4 -3
- package/modern/BarChart/BarLabel/BarLabel.js +51 -0
- package/modern/BarChart/BarLabel/BarLabel.types.js +1 -0
- package/modern/BarChart/BarLabel/BarLabelItem.js +130 -0
- package/modern/BarChart/BarLabel/BarLabelPlot.js +102 -0
- package/modern/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/modern/BarChart/BarLabel/getBarLabel.js +24 -0
- package/modern/BarChart/BarLabel/index.js +2 -0
- package/modern/BarChart/BarPlot.js +18 -4
- package/modern/BarChart/index.js +2 -1
- package/modern/BarChart/legend.js +13 -6
- package/modern/ChartContainer/ChartContainer.js +11 -11
- package/modern/ChartsAxis/ChartsAxis.js +1 -1
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/modern/ChartsClipPath/ChartsClipPath.js +1 -1
- package/modern/ChartsGrid/ChartsGrid.js +1 -1
- package/modern/ChartsLegend/ChartsLegend.js +1 -1
- package/modern/ChartsLegend/DefaultChartsLegend.js +1 -1
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +1 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +3 -3
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +2 -2
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/modern/ChartsSurface.js +1 -1
- package/modern/ChartsText/ChartsText.js +1 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +1 -1
- package/modern/ChartsTooltip/ChartsTooltip.js +1 -1
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +5 -3
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +8 -4
- package/modern/ChartsTooltip/utils.js +13 -8
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +2 -3
- package/modern/ChartsYAxis/ChartsYAxis.js +3 -3
- package/modern/Gauge/Gauge.js +1 -1
- package/modern/Gauge/GaugeContainer.js +1 -1
- package/modern/Gauge/GaugeValueText.js +1 -1
- package/modern/LineChart/AnimatedArea.js +1 -1
- package/modern/LineChart/AnimatedLine.js +1 -1
- package/modern/LineChart/AreaElement.js +4 -4
- package/modern/LineChart/AreaPlot.js +4 -3
- package/modern/LineChart/LineChart.js +12 -11
- package/modern/LineChart/LineElement.js +4 -4
- package/modern/LineChart/LineHighlightElement.js +1 -1
- package/modern/LineChart/LineHighlightPlot.js +1 -1
- package/modern/LineChart/LinePlot.js +1 -1
- package/modern/LineChart/MarkElement.js +1 -16
- package/modern/LineChart/MarkPlot.js +1 -1
- package/modern/LineChart/legend.js +13 -6
- package/modern/PieChart/PieArc.js +1 -1
- package/modern/PieChart/PieArcLabel.js +4 -2
- package/modern/PieChart/PieArcLabelPlot.js +15 -6
- package/modern/PieChart/PieArcPlot.js +2 -2
- package/modern/PieChart/PieChart.js +12 -11
- package/modern/PieChart/PiePlot.js +1 -1
- package/modern/PieChart/formatter.js +4 -1
- package/modern/PieChart/legend.js +15 -5
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +11 -11
- package/modern/ScatterChart/Scatter.js +1 -1
- package/modern/ScatterChart/ScatterChart.js +17 -16
- package/modern/ScatterChart/ScatterPlot.js +1 -1
- package/modern/ScatterChart/legend.js +13 -6
- package/modern/SparkLineChart/SparkLineChart.js +6 -6
- package/modern/context/ZAxisContextProvider.js +6 -6
- package/modern/hooks/useAxisEvents.js +12 -7
- package/modern/index.js +1 -1
- package/modern/internals/getLabel.js +3 -0
- package/package.json +2 -2
- package/themeAugmentation/components.d.ts +4 -0
- package/themeAugmentation/overrides.d.ts +3 -0
- package/themeAugmentation/props.d.ts +2 -0
package/modern/BarChart/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
import { getLabel } from '../internals/getLabel';
|
|
1
2
|
const legendGetter = params => {
|
|
2
3
|
const {
|
|
3
4
|
seriesOrder,
|
|
4
5
|
series
|
|
5
6
|
} = params;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
return seriesOrder.reduce((acc, seriesId) => {
|
|
8
|
+
const formattedLabel = getLabel(series[seriesId].label, 'legend');
|
|
9
|
+
if (formattedLabel === undefined) {
|
|
10
|
+
return acc;
|
|
11
|
+
}
|
|
12
|
+
acc.push({
|
|
13
|
+
color: series[seriesId].color,
|
|
14
|
+
label: formattedLabel,
|
|
15
|
+
id: seriesId
|
|
16
|
+
});
|
|
17
|
+
return acc;
|
|
18
|
+
}, []);
|
|
12
19
|
};
|
|
13
20
|
export default legendGetter;
|
|
@@ -64,7 +64,7 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
64
64
|
process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
65
65
|
// ----------------------------- Warning --------------------------------
|
|
66
66
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
67
|
-
// | To update them edit the TypeScript types and run "
|
|
67
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
68
68
|
// ----------------------------------------------------------------------
|
|
69
69
|
children: PropTypes.node,
|
|
70
70
|
className: PropTypes.string,
|
|
@@ -127,6 +127,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
127
127
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
128
128
|
classes: PropTypes.object,
|
|
129
129
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
130
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
131
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
132
|
+
unknownColor: PropTypes.string,
|
|
133
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
134
|
+
}), PropTypes.shape({
|
|
130
135
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
131
136
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
132
137
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -135,11 +140,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
135
140
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
136
141
|
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
137
142
|
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
138
|
-
}), PropTypes.shape({
|
|
139
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
140
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
141
|
-
unknownColor: PropTypes.string,
|
|
142
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
143
143
|
})]),
|
|
144
144
|
data: PropTypes.array,
|
|
145
145
|
dataKey: PropTypes.string,
|
|
@@ -180,6 +180,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
180
180
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
181
181
|
classes: PropTypes.object,
|
|
182
182
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
183
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
184
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
185
|
+
unknownColor: PropTypes.string,
|
|
186
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
187
|
+
}), PropTypes.shape({
|
|
183
188
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
184
189
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
185
190
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -188,11 +193,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
188
193
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
189
194
|
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
190
195
|
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
191
|
-
}), PropTypes.shape({
|
|
192
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
193
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
194
|
-
unknownColor: PropTypes.string,
|
|
195
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
196
196
|
})]),
|
|
197
197
|
data: PropTypes.array,
|
|
198
198
|
dataKey: PropTypes.string,
|
|
@@ -91,7 +91,7 @@ function ChartsAxis(props) {
|
|
|
91
91
|
process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
92
92
|
// ----------------------------- Warning --------------------------------
|
|
93
93
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
94
|
-
// | To update them edit the TypeScript types and run "
|
|
94
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
95
95
|
// ----------------------------------------------------------------------
|
|
96
96
|
/**
|
|
97
97
|
* Indicate which axis to display the bottom of the charts.
|
|
@@ -97,7 +97,7 @@ function ChartsAxisHighlight(props) {
|
|
|
97
97
|
process.env.NODE_ENV !== "production" ? ChartsAxisHighlight.propTypes = {
|
|
98
98
|
// ----------------------------- Warning --------------------------------
|
|
99
99
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
100
|
-
// | To update them edit the TypeScript types and run "
|
|
100
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
101
101
|
// ----------------------------------------------------------------------
|
|
102
102
|
x: PropTypes.oneOf(['band', 'line', 'none']),
|
|
103
103
|
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
@@ -38,7 +38,7 @@ function ChartsClipPath(props) {
|
|
|
38
38
|
process.env.NODE_ENV !== "production" ? ChartsClipPath.propTypes = {
|
|
39
39
|
// ----------------------------- Warning --------------------------------
|
|
40
40
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
41
|
-
// | To update them edit the TypeScript types and run "
|
|
41
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
42
42
|
// ----------------------------------------------------------------------
|
|
43
43
|
id: PropTypes.string.isRequired,
|
|
44
44
|
offset: PropTypes.shape({
|
|
@@ -113,7 +113,7 @@ function ChartsGrid(props) {
|
|
|
113
113
|
process.env.NODE_ENV !== "production" ? ChartsGrid.propTypes = {
|
|
114
114
|
// ----------------------------- Warning --------------------------------
|
|
115
115
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
116
|
-
// | To update them edit the TypeScript types and run "
|
|
116
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
117
117
|
// ----------------------------------------------------------------------
|
|
118
118
|
/**
|
|
119
119
|
* Override or extend the styles applied to the component.
|
|
@@ -69,7 +69,7 @@ function ChartsLegend(inProps) {
|
|
|
69
69
|
process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
70
70
|
// ----------------------------- Warning --------------------------------
|
|
71
71
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
72
|
-
// | To update them edit the TypeScript types and run "
|
|
72
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
73
73
|
// ----------------------------------------------------------------------
|
|
74
74
|
/**
|
|
75
75
|
* Override or extend the styles applied to the component.
|
|
@@ -204,7 +204,7 @@ function DefaultChartsLegend(props) {
|
|
|
204
204
|
process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
205
205
|
// ----------------------------- Warning --------------------------------
|
|
206
206
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
207
|
-
// | To update them edit the TypeScript types and run "
|
|
207
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
208
208
|
// ----------------------------------------------------------------------
|
|
209
209
|
/**
|
|
210
210
|
* Override or extend the styles applied to the component.
|
|
@@ -62,7 +62,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
62
62
|
process.env.NODE_ENV !== "production" ? ChartsOnAxisClickHandler.propTypes = {
|
|
63
63
|
// ----------------------------- Warning --------------------------------
|
|
64
64
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
65
|
-
// | To update them edit the TypeScript types and run "
|
|
65
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
66
66
|
// ----------------------------------------------------------------------
|
|
67
67
|
/**
|
|
68
68
|
* The function called for onClick events.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["message"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
@@ -7,7 +7,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea';
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const StyledText = styled('text')(({
|
|
9
9
|
theme
|
|
10
|
-
}) => ({
|
|
10
|
+
}) => _extends({}, theme.typography.body2, {
|
|
11
11
|
stroke: 'none',
|
|
12
12
|
fill: theme.palette.text.primary,
|
|
13
13
|
shapeRendering: 'crispEdges',
|
|
@@ -29,6 +29,6 @@ export function ChartsLoadingOverlay(props) {
|
|
|
29
29
|
x: left + width / 2,
|
|
30
30
|
y: top + height / 2
|
|
31
31
|
}, other, {
|
|
32
|
-
children: message ?? 'Loading data
|
|
32
|
+
children: message ?? 'Loading data…'
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["message"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
@@ -7,7 +7,7 @@ import { useDrawingArea } from '../hooks/useDrawingArea';
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const StyledText = styled('text')(({
|
|
9
9
|
theme
|
|
10
|
-
}) => ({
|
|
10
|
+
}) => _extends({}, theme.typography.body2, {
|
|
11
11
|
stroke: 'none',
|
|
12
12
|
fill: theme.palette.text.primary,
|
|
13
13
|
shapeRendering: 'crispEdges',
|
|
@@ -23,7 +23,7 @@ function ChartsReferenceLine(props) {
|
|
|
23
23
|
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
24
24
|
// ----------------------------- Warning --------------------------------
|
|
25
25
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
26
|
-
// | To update them edit the TypeScript types and run "
|
|
26
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
27
27
|
// ----------------------------------------------------------------------
|
|
28
28
|
/**
|
|
29
29
|
* The id of the axis used for the reference value.
|
package/modern/ChartsSurface.js
CHANGED
|
@@ -44,7 +44,7 @@ const ChartsSurface = /*#__PURE__*/React.forwardRef(function ChartsSurface(props
|
|
|
44
44
|
process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
|
|
45
45
|
// ----------------------------- Warning --------------------------------
|
|
46
46
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
47
|
-
// | To update them edit the TypeScript types and run "
|
|
47
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
48
48
|
// ----------------------------------------------------------------------
|
|
49
49
|
children: PropTypes.node,
|
|
50
50
|
className: PropTypes.string,
|
|
@@ -70,7 +70,7 @@ function ChartsText(props) {
|
|
|
70
70
|
process.env.NODE_ENV !== "production" ? ChartsText.propTypes = {
|
|
71
71
|
// ----------------------------- Warning --------------------------------
|
|
72
72
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
73
|
-
// | To update them edit the TypeScript types and run "
|
|
73
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
74
74
|
// ----------------------------------------------------------------------
|
|
75
75
|
/**
|
|
76
76
|
* Height of a text line (in `em`).
|
|
@@ -80,7 +80,7 @@ function ChartsAxisTooltipContent(props) {
|
|
|
80
80
|
process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
|
|
81
81
|
// ----------------------------- Warning --------------------------------
|
|
82
82
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
83
|
-
// | To update them edit the TypeScript types and run "
|
|
83
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
84
84
|
// ----------------------------------------------------------------------
|
|
85
85
|
axisData: PropTypes.shape({
|
|
86
86
|
x: PropTypes.shape({
|
|
@@ -60,7 +60,7 @@ function ChartsItemTooltipContent(props) {
|
|
|
60
60
|
process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.propTypes = {
|
|
61
61
|
// ----------------------------- Warning --------------------------------
|
|
62
62
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
63
|
-
// | To update them edit the TypeScript types and run "
|
|
63
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
64
64
|
// ----------------------------------------------------------------------
|
|
65
65
|
classes: PropTypes.object.isRequired,
|
|
66
66
|
content: PropTypes.elementType,
|
|
@@ -110,7 +110,7 @@ function ChartsTooltip(props) {
|
|
|
110
110
|
process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
|
|
111
111
|
// ----------------------------- Warning --------------------------------
|
|
112
112
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
113
|
-
// | To update them edit the TypeScript types and run "
|
|
113
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
114
114
|
// ----------------------------------------------------------------------
|
|
115
115
|
/**
|
|
116
116
|
* Component to override the tooltip content when trigger is set to 'axis'.
|
|
@@ -4,6 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import Typography from '@mui/material/Typography';
|
|
5
5
|
import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipTable, ChartsTooltipMark, ChartsTooltipRow } from './ChartsTooltipTable';
|
|
6
6
|
import { isCartesianSeries, utcFormatter } from './utils';
|
|
7
|
+
import { getLabel } from '../internals/getLabel';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
function DefaultChartsAxisTooltipContent(props) {
|
|
9
10
|
const {
|
|
@@ -50,6 +51,7 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
50
51
|
if (formattedValue == null) {
|
|
51
52
|
return null;
|
|
52
53
|
}
|
|
54
|
+
const formattedLabel = getLabel(label, 'tooltip');
|
|
53
55
|
return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
|
|
54
56
|
className: classes.row,
|
|
55
57
|
children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
@@ -60,8 +62,8 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
60
62
|
})
|
|
61
63
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
62
64
|
className: clsx(classes.labelCell, classes.cell),
|
|
63
|
-
children:
|
|
64
|
-
children:
|
|
65
|
+
children: formattedLabel ? /*#__PURE__*/_jsx(Typography, {
|
|
66
|
+
children: formattedLabel
|
|
65
67
|
}) : null
|
|
66
68
|
}), /*#__PURE__*/_jsx(ChartsTooltipCell, {
|
|
67
69
|
className: clsx(classes.valueCell, classes.cell),
|
|
@@ -78,7 +80,7 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
78
80
|
process.env.NODE_ENV !== "production" ? DefaultChartsAxisTooltipContent.propTypes = {
|
|
79
81
|
// ----------------------------- Warning --------------------------------
|
|
80
82
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
81
|
-
// | To update them edit the TypeScript types and run "
|
|
83
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
82
84
|
// ----------------------------------------------------------------------
|
|
83
85
|
/**
|
|
84
86
|
* The properties of the triggered axis.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
import { ChartsTooltipTable, ChartsTooltipCell, ChartsTooltipMark, ChartsTooltipPaper, ChartsTooltipRow } from './ChartsTooltipTable';
|
|
6
|
+
import { getLabel } from '../internals/getLabel';
|
|
5
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
8
|
function DefaultChartsItemTooltipContent(props) {
|
|
7
9
|
const {
|
|
@@ -19,12 +21,14 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
19
21
|
color
|
|
20
22
|
} = series.type === 'pie' ? {
|
|
21
23
|
color: getColor(itemData.dataIndex),
|
|
22
|
-
displayedLabel: series.data[itemData.dataIndex].label
|
|
24
|
+
displayedLabel: getLabel(series.data[itemData.dataIndex].label, 'tooltip')
|
|
23
25
|
} : {
|
|
24
26
|
color: getColor(itemData.dataIndex) ?? series.color,
|
|
25
|
-
displayedLabel: series.label
|
|
27
|
+
displayedLabel: getLabel(series.label, 'tooltip')
|
|
26
28
|
};
|
|
27
|
-
const value = series.data[itemData.dataIndex]
|
|
29
|
+
const value = series.type === 'pie' ? _extends({}, series.data[itemData.dataIndex], {
|
|
30
|
+
label: getLabel(series.data[itemData.dataIndex].label, 'tooltip')
|
|
31
|
+
}) : series.data[itemData.dataIndex];
|
|
28
32
|
const formattedValue = series.valueFormatter?.(value, {
|
|
29
33
|
dataIndex: itemData.dataIndex
|
|
30
34
|
});
|
|
@@ -57,7 +61,7 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
57
61
|
process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propTypes = {
|
|
58
62
|
// ----------------------------- Warning --------------------------------
|
|
59
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
65
|
// ----------------------------------------------------------------------
|
|
62
66
|
/**
|
|
63
67
|
* Override or extend the styles applied to the component.
|
|
@@ -53,20 +53,25 @@ export function useMouseTracker() {
|
|
|
53
53
|
if (element === null) {
|
|
54
54
|
return () => {};
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const handleOut = () => {
|
|
57
57
|
setMousePosition(null);
|
|
58
58
|
};
|
|
59
|
-
const
|
|
59
|
+
const handleMove = event => {
|
|
60
|
+
const target = 'targetTouches' in event ? event.targetTouches[0] : event;
|
|
60
61
|
setMousePosition({
|
|
61
|
-
x:
|
|
62
|
-
y:
|
|
62
|
+
x: target.clientX,
|
|
63
|
+
y: target.clientY
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
|
-
element.addEventListener('mouseout',
|
|
66
|
-
element.addEventListener('mousemove',
|
|
66
|
+
element.addEventListener('mouseout', handleOut);
|
|
67
|
+
element.addEventListener('mousemove', handleMove);
|
|
68
|
+
element.addEventListener('touchend', handleOut);
|
|
69
|
+
element.addEventListener('touchmove', handleMove);
|
|
67
70
|
return () => {
|
|
68
|
-
element.removeEventListener('mouseout',
|
|
69
|
-
element.removeEventListener('mousemove',
|
|
71
|
+
element.removeEventListener('mouseout', handleOut);
|
|
72
|
+
element.removeEventListener('mousemove', handleMove);
|
|
73
|
+
element.addEventListener('touchend', handleOut);
|
|
74
|
+
element.addEventListener('touchmove', handleMove);
|
|
70
75
|
};
|
|
71
76
|
}, [svgRef]);
|
|
72
77
|
return mousePosition;
|
|
@@ -195,7 +195,7 @@ function ChartsVoronoiHandler(props) {
|
|
|
195
195
|
process.env.NODE_ENV !== "production" ? ChartsVoronoiHandler.propTypes = {
|
|
196
196
|
// ----------------------------- Warning --------------------------------
|
|
197
197
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
198
|
-
// | To update them edit the TypeScript types and run "
|
|
198
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
199
199
|
// ----------------------------------------------------------------------
|
|
200
200
|
/**
|
|
201
201
|
* Callback fired when clicking on a scatter item.
|
|
@@ -167,8 +167,7 @@ function ChartsXAxis(inProps) {
|
|
|
167
167
|
textAnchor: 'middle',
|
|
168
168
|
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto',
|
|
169
169
|
fontSize: tickFontSize ?? 12
|
|
170
|
-
}, tickLabelStyle)
|
|
171
|
-
className: classes.tickLabel
|
|
170
|
+
}, tickLabelStyle)
|
|
172
171
|
},
|
|
173
172
|
className: classes.tickLabel,
|
|
174
173
|
ownerState: {}
|
|
@@ -249,7 +248,7 @@ function ChartsXAxis(inProps) {
|
|
|
249
248
|
process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
250
249
|
// ----------------------------- Warning --------------------------------
|
|
251
250
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
252
|
-
// | To update them edit the TypeScript types and run "
|
|
251
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
253
252
|
// ----------------------------------------------------------------------
|
|
254
253
|
/**
|
|
255
254
|
* The id of the axis to render.
|
|
@@ -120,9 +120,9 @@ function ChartsYAxis(inProps) {
|
|
|
120
120
|
fontSize: tickFontSize,
|
|
121
121
|
textAnchor: position === 'right' ? 'start' : 'end',
|
|
122
122
|
dominantBaseline: 'central'
|
|
123
|
-
}, tickLabelStyle)
|
|
124
|
-
className: classes.tickLabel
|
|
123
|
+
}, tickLabelStyle)
|
|
125
124
|
},
|
|
125
|
+
className: classes.tickLabel,
|
|
126
126
|
ownerState: {}
|
|
127
127
|
});
|
|
128
128
|
const axisLabelProps = useSlotProps({
|
|
@@ -184,7 +184,7 @@ function ChartsYAxis(inProps) {
|
|
|
184
184
|
process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
185
185
|
// ----------------------------- Warning --------------------------------
|
|
186
186
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
187
|
-
// | To update them edit the TypeScript types and run "
|
|
187
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
188
188
|
// ----------------------------------------------------------------------
|
|
189
189
|
/**
|
|
190
190
|
* The id of the axis to render.
|
package/modern/Gauge/Gauge.js
CHANGED
|
@@ -44,7 +44,7 @@ function Gauge(props) {
|
|
|
44
44
|
process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
45
45
|
// ----------------------------- Warning --------------------------------
|
|
46
46
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
47
|
-
// | To update them edit the TypeScript types and run "
|
|
47
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
48
48
|
// ----------------------------------------------------------------------
|
|
49
49
|
children: PropTypes.node,
|
|
50
50
|
classes: PropTypes.object,
|
|
@@ -106,7 +106,7 @@ const GaugeContainer = /*#__PURE__*/React.forwardRef(function GaugeContainer(pro
|
|
|
106
106
|
process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
107
107
|
// ----------------------------- Warning --------------------------------
|
|
108
108
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
109
|
-
// | To update them edit the TypeScript types and run "
|
|
109
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
110
110
|
// ----------------------------------------------------------------------
|
|
111
111
|
children: PropTypes.node,
|
|
112
112
|
className: PropTypes.string,
|
|
@@ -48,7 +48,7 @@ function GaugeValueText(props) {
|
|
|
48
48
|
process.env.NODE_ENV !== "production" ? GaugeValueText.propTypes = {
|
|
49
49
|
// ----------------------------- Warning --------------------------------
|
|
50
50
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
51
|
-
// | To update them edit the TypeScript types and run "
|
|
51
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
52
52
|
// ----------------------------------------------------------------------
|
|
53
53
|
/**
|
|
54
54
|
* Height of a text line (in `em`).
|
|
@@ -83,7 +83,7 @@ function AnimatedArea(props) {
|
|
|
83
83
|
process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
|
|
84
84
|
// ----------------------------- Warning --------------------------------
|
|
85
85
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
86
|
-
// | To update them edit the TypeScript types and run "
|
|
86
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
87
87
|
// ----------------------------------------------------------------------
|
|
88
88
|
d: PropTypes.string.isRequired,
|
|
89
89
|
ownerState: PropTypes.shape({
|
|
@@ -86,7 +86,7 @@ function AnimatedLine(props) {
|
|
|
86
86
|
process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
|
|
87
87
|
// ----------------------------- Warning --------------------------------
|
|
88
88
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
89
|
-
// | To update them edit the TypeScript types and run "
|
|
89
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
90
90
|
// ----------------------------------------------------------------------
|
|
91
91
|
d: PropTypes.string.isRequired,
|
|
92
92
|
ownerState: PropTypes.shape({
|
|
@@ -74,22 +74,22 @@ function AreaElement(props) {
|
|
|
74
74
|
const areaProps = useSlotProps({
|
|
75
75
|
elementType: Area,
|
|
76
76
|
externalSlotProps: slotProps?.area,
|
|
77
|
-
additionalProps: _extends({},
|
|
77
|
+
additionalProps: _extends({}, getInteractionItemProps({
|
|
78
78
|
type: 'line',
|
|
79
79
|
seriesId: id
|
|
80
80
|
}), {
|
|
81
|
-
className: classes.root,
|
|
82
81
|
onClick,
|
|
83
82
|
cursor: onClick ? 'pointer' : 'unset'
|
|
84
83
|
}),
|
|
84
|
+
className: classes.root,
|
|
85
85
|
ownerState
|
|
86
86
|
});
|
|
87
|
-
return /*#__PURE__*/_jsx(Area, _extends({}, areaProps));
|
|
87
|
+
return /*#__PURE__*/_jsx(Area, _extends({}, other, areaProps));
|
|
88
88
|
}
|
|
89
89
|
process.env.NODE_ENV !== "production" ? AreaElement.propTypes = {
|
|
90
90
|
// ----------------------------- Warning --------------------------------
|
|
91
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
92
|
-
// | To update them edit the TypeScript types and run "
|
|
92
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
93
93
|
// ----------------------------------------------------------------------
|
|
94
94
|
classes: PropTypes.object,
|
|
95
95
|
color: PropTypes.string.isRequired,
|
|
@@ -33,7 +33,8 @@ const useAggregatedData = () => {
|
|
|
33
33
|
return stackingGroups.flatMap(({
|
|
34
34
|
ids: groupIds
|
|
35
35
|
}) => {
|
|
36
|
-
return groupIds.
|
|
36
|
+
return [...groupIds].reverse() // Revert stacked area for a more pleasant animation
|
|
37
|
+
.map(seriesId => {
|
|
37
38
|
const {
|
|
38
39
|
xAxisKey = defaultXAxisId,
|
|
39
40
|
yAxisKey = defaultYAxisId,
|
|
@@ -92,7 +93,7 @@ function AreaPlot(props) {
|
|
|
92
93
|
const getGradientId = useChartGradient();
|
|
93
94
|
const completedData = useAggregatedData();
|
|
94
95
|
return /*#__PURE__*/_jsx("g", _extends({}, other, {
|
|
95
|
-
children: completedData.
|
|
96
|
+
children: completedData.map(({
|
|
96
97
|
d,
|
|
97
98
|
seriesId,
|
|
98
99
|
color,
|
|
@@ -118,7 +119,7 @@ function AreaPlot(props) {
|
|
|
118
119
|
process.env.NODE_ENV !== "production" ? AreaPlot.propTypes = {
|
|
119
120
|
// ----------------------------- Warning --------------------------------
|
|
120
121
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
121
|
-
// | To update them edit the TypeScript types and run "
|
|
122
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
122
123
|
// ----------------------------------------------------------------------
|
|
123
124
|
/**
|
|
124
125
|
* Callback fired when a line area item is clicked.
|
|
@@ -133,7 +133,7 @@ const LineChart = /*#__PURE__*/React.forwardRef(function LineChart(props, ref) {
|
|
|
133
133
|
process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
134
134
|
// ----------------------------- Warning --------------------------------
|
|
135
135
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
136
|
-
// | To update them edit the TypeScript types and run "
|
|
136
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
137
137
|
// ----------------------------------------------------------------------
|
|
138
138
|
/**
|
|
139
139
|
* The configuration of axes highlight.
|
|
@@ -205,6 +205,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
205
205
|
}),
|
|
206
206
|
/**
|
|
207
207
|
* If `true`, a loading overlay is displayed.
|
|
208
|
+
* @default false
|
|
208
209
|
*/
|
|
209
210
|
loading: PropTypes.bool,
|
|
210
211
|
/**
|
|
@@ -304,6 +305,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
304
305
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
305
306
|
classes: PropTypes.object,
|
|
306
307
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
308
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
309
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
310
|
+
unknownColor: PropTypes.string,
|
|
311
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
312
|
+
}), PropTypes.shape({
|
|
307
313
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
308
314
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
309
315
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -312,11 +318,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
312
318
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
313
319
|
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
314
320
|
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
315
|
-
}), PropTypes.shape({
|
|
316
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
317
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
318
|
-
unknownColor: PropTypes.string,
|
|
319
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
320
321
|
})]),
|
|
321
322
|
data: PropTypes.array,
|
|
322
323
|
dataKey: PropTypes.string,
|
|
@@ -357,6 +358,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
357
358
|
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
358
359
|
classes: PropTypes.object,
|
|
359
360
|
colorMap: PropTypes.oneOfType([PropTypes.shape({
|
|
361
|
+
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
362
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
363
|
+
unknownColor: PropTypes.string,
|
|
364
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
365
|
+
}), PropTypes.shape({
|
|
360
366
|
color: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func]).isRequired,
|
|
361
367
|
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
362
368
|
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
@@ -365,11 +371,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
365
371
|
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
366
372
|
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
367
373
|
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
368
|
-
}), PropTypes.shape({
|
|
369
|
-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
370
|
-
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
371
|
-
unknownColor: PropTypes.string,
|
|
372
|
-
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
373
374
|
})]),
|
|
374
375
|
data: PropTypes.array,
|
|
375
376
|
dataKey: PropTypes.string,
|
|
@@ -74,22 +74,22 @@ function LineElement(props) {
|
|
|
74
74
|
const lineProps = useSlotProps({
|
|
75
75
|
elementType: Line,
|
|
76
76
|
externalSlotProps: slotProps?.line,
|
|
77
|
-
additionalProps: _extends({},
|
|
77
|
+
additionalProps: _extends({}, getInteractionItemProps({
|
|
78
78
|
type: 'line',
|
|
79
79
|
seriesId: id
|
|
80
80
|
}), {
|
|
81
|
-
className: classes.root,
|
|
82
81
|
onClick,
|
|
83
82
|
cursor: onClick ? 'pointer' : 'unset'
|
|
84
83
|
}),
|
|
84
|
+
className: classes.root,
|
|
85
85
|
ownerState
|
|
86
86
|
});
|
|
87
|
-
return /*#__PURE__*/_jsx(Line, _extends({}, lineProps));
|
|
87
|
+
return /*#__PURE__*/_jsx(Line, _extends({}, other, lineProps));
|
|
88
88
|
}
|
|
89
89
|
process.env.NODE_ENV !== "production" ? LineElement.propTypes = {
|
|
90
90
|
// ----------------------------- Warning --------------------------------
|
|
91
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
92
|
-
// | To update them edit the TypeScript types and run "
|
|
92
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
93
93
|
// ----------------------------------------------------------------------
|
|
94
94
|
classes: PropTypes.object,
|
|
95
95
|
color: PropTypes.string.isRequired,
|