@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
|
@@ -73,7 +73,7 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
73
73
|
process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
74
74
|
// ----------------------------- Warning --------------------------------
|
|
75
75
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
76
|
-
// | To update them edit the TypeScript types and run "
|
|
76
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
77
77
|
// ----------------------------------------------------------------------
|
|
78
78
|
children: _propTypes.default.node,
|
|
79
79
|
className: _propTypes.default.string,
|
|
@@ -136,6 +136,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
136
136
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
137
137
|
classes: _propTypes.default.object,
|
|
138
138
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
139
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
140
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
141
|
+
unknownColor: _propTypes.default.string,
|
|
142
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
143
|
+
}), _propTypes.default.shape({
|
|
139
144
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
140
145
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
141
146
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -144,11 +149,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
144
149
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
145
150
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
146
151
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
147
|
-
}), _propTypes.default.shape({
|
|
148
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
149
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
150
|
-
unknownColor: _propTypes.default.string,
|
|
151
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
152
152
|
})]),
|
|
153
153
|
data: _propTypes.default.array,
|
|
154
154
|
dataKey: _propTypes.default.string,
|
|
@@ -189,6 +189,11 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
189
189
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
190
190
|
classes: _propTypes.default.object,
|
|
191
191
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
192
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
193
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
194
|
+
unknownColor: _propTypes.default.string,
|
|
195
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
196
|
+
}), _propTypes.default.shape({
|
|
192
197
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
193
198
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
194
199
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -197,11 +202,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
197
202
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
198
203
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
199
204
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
200
|
-
}), _propTypes.default.shape({
|
|
201
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
202
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
203
|
-
unknownColor: _propTypes.default.string,
|
|
204
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
205
205
|
})]),
|
|
206
206
|
data: _propTypes.default.array,
|
|
207
207
|
dataKey: _propTypes.default.string,
|
package/ChartsAxis/ChartsAxis.js
CHANGED
|
@@ -100,7 +100,7 @@ function ChartsAxis(props) {
|
|
|
100
100
|
process.env.NODE_ENV !== "production" ? ChartsAxis.propTypes = {
|
|
101
101
|
// ----------------------------- Warning --------------------------------
|
|
102
102
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
103
|
-
// | To update them edit the TypeScript types and run "
|
|
103
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
104
104
|
// ----------------------------------------------------------------------
|
|
105
105
|
/**
|
|
106
106
|
* Indicate which axis to display the bottom of the charts.
|
|
@@ -108,7 +108,7 @@ function ChartsAxisHighlight(props) {
|
|
|
108
108
|
process.env.NODE_ENV !== "production" ? ChartsAxisHighlight.propTypes = {
|
|
109
109
|
// ----------------------------- Warning --------------------------------
|
|
110
110
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
111
|
-
// | To update them edit the TypeScript types and run "
|
|
111
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
112
112
|
// ----------------------------------------------------------------------
|
|
113
113
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
114
114
|
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
@@ -47,7 +47,7 @@ function ChartsClipPath(props) {
|
|
|
47
47
|
process.env.NODE_ENV !== "production" ? ChartsClipPath.propTypes = {
|
|
48
48
|
// ----------------------------- Warning --------------------------------
|
|
49
49
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
50
|
-
// | To update them edit the TypeScript types and run "
|
|
50
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
51
51
|
// ----------------------------------------------------------------------
|
|
52
52
|
id: _propTypes.default.string.isRequired,
|
|
53
53
|
offset: _propTypes.default.shape({
|
package/ChartsGrid/ChartsGrid.js
CHANGED
|
@@ -122,7 +122,7 @@ function ChartsGrid(props) {
|
|
|
122
122
|
process.env.NODE_ENV !== "production" ? ChartsGrid.propTypes = {
|
|
123
123
|
// ----------------------------- Warning --------------------------------
|
|
124
124
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
125
|
-
// | To update them edit the TypeScript types and run "
|
|
125
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
126
126
|
// ----------------------------------------------------------------------
|
|
127
127
|
/**
|
|
128
128
|
* Override or extend the styles applied to the component.
|
|
@@ -78,7 +78,7 @@ function ChartsLegend(inProps) {
|
|
|
78
78
|
process.env.NODE_ENV !== "production" ? ChartsLegend.propTypes = {
|
|
79
79
|
// ----------------------------- Warning --------------------------------
|
|
80
80
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
81
|
-
// | To update them edit the TypeScript types and run "
|
|
81
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
82
82
|
// ----------------------------------------------------------------------
|
|
83
83
|
/**
|
|
84
84
|
* Override or extend the styles applied to the component.
|
|
@@ -214,7 +214,7 @@ function DefaultChartsLegend(props) {
|
|
|
214
214
|
process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
215
215
|
// ----------------------------- Warning --------------------------------
|
|
216
216
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
217
|
-
// | To update them edit the TypeScript types and run "
|
|
217
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
218
218
|
// ----------------------------------------------------------------------
|
|
219
219
|
/**
|
|
220
220
|
* Override or extend the styles applied to the component.
|
|
@@ -71,7 +71,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
71
71
|
process.env.NODE_ENV !== "production" ? ChartsOnAxisClickHandler.propTypes = {
|
|
72
72
|
// ----------------------------- Warning --------------------------------
|
|
73
73
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
74
|
-
// | To update them edit the TypeScript types and run "
|
|
74
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
75
75
|
// ----------------------------------------------------------------------
|
|
76
76
|
/**
|
|
77
77
|
* The function called for onClick events.
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ChartsLoadingOverlay = ChartsLoadingOverlay;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
const StyledText = (0, _styles.styled)('text')(({
|
|
18
18
|
theme
|
|
19
|
-
}) => ({
|
|
19
|
+
}) => (0, _extends2.default)({}, theme.typography.body2, {
|
|
20
20
|
stroke: 'none',
|
|
21
21
|
fill: theme.palette.text.primary,
|
|
22
22
|
shapeRendering: 'crispEdges',
|
|
@@ -38,6 +38,6 @@ function ChartsLoadingOverlay(props) {
|
|
|
38
38
|
x: left + width / 2,
|
|
39
39
|
y: top + height / 2
|
|
40
40
|
}, other, {
|
|
41
|
-
children: message ?? 'Loading data
|
|
41
|
+
children: message ?? 'Loading data…'
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ChartsNoDataOverlay = ChartsNoDataOverlay;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _useDrawingArea = require("../hooks/useDrawingArea");
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
const StyledText = (0, _styles.styled)('text')(({
|
|
18
18
|
theme
|
|
19
|
-
}) => ({
|
|
19
|
+
}) => (0, _extends2.default)({}, theme.typography.body2, {
|
|
20
20
|
stroke: 'none',
|
|
21
21
|
fill: theme.palette.text.primary,
|
|
22
22
|
shapeRendering: 'crispEdges',
|
|
@@ -27,9 +27,18 @@ export interface ChartsOverlaySlotProps {
|
|
|
27
27
|
export interface ChartsOverlayProps {
|
|
28
28
|
/**
|
|
29
29
|
* If `true`, a loading overlay is displayed.
|
|
30
|
+
* @default false
|
|
30
31
|
*/
|
|
31
32
|
loading?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Overridable component slots.
|
|
35
|
+
* @default {}
|
|
36
|
+
*/
|
|
32
37
|
slots?: ChartsOverlaySlots;
|
|
38
|
+
/**
|
|
39
|
+
* The props used for each component slot.
|
|
40
|
+
* @default {}
|
|
41
|
+
*/
|
|
33
42
|
slotProps?: ChartsOverlaySlotProps;
|
|
34
43
|
}
|
|
35
44
|
export declare function ChartsOverlay(props: ChartsOverlayProps): React.JSX.Element | null;
|
|
@@ -32,7 +32,7 @@ function ChartsReferenceLine(props) {
|
|
|
32
32
|
process.env.NODE_ENV !== "production" ? ChartsReferenceLine.propTypes = {
|
|
33
33
|
// ----------------------------- Warning --------------------------------
|
|
34
34
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
35
|
-
// | To update them edit the TypeScript types and run "
|
|
35
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
36
36
|
// ----------------------------------------------------------------------
|
|
37
37
|
/**
|
|
38
38
|
* The id of the axis used for the reference value.
|
package/ChartsSurface.js
CHANGED
|
@@ -53,7 +53,7 @@ const ChartsSurface = exports.ChartsSurface = /*#__PURE__*/React.forwardRef(func
|
|
|
53
53
|
process.env.NODE_ENV !== "production" ? ChartsSurface.propTypes = {
|
|
54
54
|
// ----------------------------- Warning --------------------------------
|
|
55
55
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
|
-
// | To update them edit the TypeScript types and run "
|
|
56
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
57
57
|
// ----------------------------------------------------------------------
|
|
58
58
|
children: _propTypes.default.node,
|
|
59
59
|
className: _propTypes.default.string,
|
package/ChartsText/ChartsText.js
CHANGED
|
@@ -79,7 +79,7 @@ function ChartsText(props) {
|
|
|
79
79
|
process.env.NODE_ENV !== "production" ? ChartsText.propTypes = {
|
|
80
80
|
// ----------------------------- Warning --------------------------------
|
|
81
81
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
82
|
-
// | To update them edit the TypeScript types and run "
|
|
82
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
83
83
|
// ----------------------------------------------------------------------
|
|
84
84
|
/**
|
|
85
85
|
* Height of a text line (in `em`).
|
|
@@ -89,7 +89,7 @@ function ChartsAxisTooltipContent(props) {
|
|
|
89
89
|
process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.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
|
axisData: _propTypes.default.shape({
|
|
95
95
|
x: _propTypes.default.shape({
|
|
@@ -69,7 +69,7 @@ function ChartsItemTooltipContent(props) {
|
|
|
69
69
|
process.env.NODE_ENV !== "production" ? ChartsItemTooltipContent.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
|
classes: _propTypes.default.object.isRequired,
|
|
75
75
|
content: _propTypes.default.elementType,
|
|
@@ -119,7 +119,7 @@ function ChartsTooltip(props) {
|
|
|
119
119
|
process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
|
|
120
120
|
// ----------------------------- Warning --------------------------------
|
|
121
121
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
122
|
-
// | To update them edit the TypeScript types and run "
|
|
122
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
123
123
|
// ----------------------------------------------------------------------
|
|
124
124
|
/**
|
|
125
125
|
* Component to override the tooltip content when trigger is set to 'axis'.
|
|
@@ -11,6 +11,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
11
11
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
12
12
|
var _ChartsTooltipTable = require("./ChartsTooltipTable");
|
|
13
13
|
var _utils = require("./utils");
|
|
14
|
+
var _getLabel = require("../internals/getLabel");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -59,6 +60,7 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
59
60
|
if (formattedValue == null) {
|
|
60
61
|
return null;
|
|
61
62
|
}
|
|
63
|
+
const formattedLabel = (0, _getLabel.getLabel)(label, 'tooltip');
|
|
62
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipRow, {
|
|
63
65
|
className: classes.row,
|
|
64
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
@@ -69,8 +71,8 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
69
71
|
})
|
|
70
72
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
71
73
|
className: (0, _clsx.default)(classes.labelCell, classes.cell),
|
|
72
|
-
children:
|
|
73
|
-
children:
|
|
74
|
+
children: formattedLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
75
|
+
children: formattedLabel
|
|
74
76
|
}) : null
|
|
75
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
|
|
76
78
|
className: (0, _clsx.default)(classes.valueCell, classes.cell),
|
|
@@ -87,7 +89,7 @@ function DefaultChartsAxisTooltipContent(props) {
|
|
|
87
89
|
process.env.NODE_ENV !== "production" ? DefaultChartsAxisTooltipContent.propTypes = {
|
|
88
90
|
// ----------------------------- Warning --------------------------------
|
|
89
91
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
90
|
-
// | To update them edit the TypeScript types and run "
|
|
92
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
91
93
|
// ----------------------------------------------------------------------
|
|
92
94
|
/**
|
|
93
95
|
* The properties of the triggered axis.
|
|
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.DefaultChartsItemTooltipContent = DefaultChartsItemTooltipContent;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
12
|
var _ChartsTooltipTable = require("./ChartsTooltipTable");
|
|
13
|
+
var _getLabel = require("../internals/getLabel");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -28,12 +30,14 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
28
30
|
color
|
|
29
31
|
} = series.type === 'pie' ? {
|
|
30
32
|
color: getColor(itemData.dataIndex),
|
|
31
|
-
displayedLabel: series.data[itemData.dataIndex].label
|
|
33
|
+
displayedLabel: (0, _getLabel.getLabel)(series.data[itemData.dataIndex].label, 'tooltip')
|
|
32
34
|
} : {
|
|
33
35
|
color: getColor(itemData.dataIndex) ?? series.color,
|
|
34
|
-
displayedLabel: series.label
|
|
36
|
+
displayedLabel: (0, _getLabel.getLabel)(series.label, 'tooltip')
|
|
35
37
|
};
|
|
36
|
-
const value = series.data[itemData.dataIndex]
|
|
38
|
+
const value = series.type === 'pie' ? (0, _extends2.default)({}, series.data[itemData.dataIndex], {
|
|
39
|
+
label: (0, _getLabel.getLabel)(series.data[itemData.dataIndex].label, 'tooltip')
|
|
40
|
+
}) : series.data[itemData.dataIndex];
|
|
37
41
|
const formattedValue = series.valueFormatter?.(value, {
|
|
38
42
|
dataIndex: itemData.dataIndex
|
|
39
43
|
});
|
|
@@ -66,7 +70,7 @@ function DefaultChartsItemTooltipContent(props) {
|
|
|
66
70
|
process.env.NODE_ENV !== "production" ? DefaultChartsItemTooltipContent.propTypes = {
|
|
67
71
|
// ----------------------------- Warning --------------------------------
|
|
68
72
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
69
|
-
// | To update them edit the TypeScript types and run "
|
|
73
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
70
74
|
// ----------------------------------------------------------------------
|
|
71
75
|
/**
|
|
72
76
|
* Override or extend the styles applied to the component.
|
package/ChartsTooltip/utils.js
CHANGED
|
@@ -66,20 +66,25 @@ function useMouseTracker() {
|
|
|
66
66
|
if (element === null) {
|
|
67
67
|
return () => {};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const handleOut = () => {
|
|
70
70
|
setMousePosition(null);
|
|
71
71
|
};
|
|
72
|
-
const
|
|
72
|
+
const handleMove = event => {
|
|
73
|
+
const target = 'targetTouches' in event ? event.targetTouches[0] : event;
|
|
73
74
|
setMousePosition({
|
|
74
|
-
x:
|
|
75
|
-
y:
|
|
75
|
+
x: target.clientX,
|
|
76
|
+
y: target.clientY
|
|
76
77
|
});
|
|
77
78
|
};
|
|
78
|
-
element.addEventListener('mouseout',
|
|
79
|
-
element.addEventListener('mousemove',
|
|
79
|
+
element.addEventListener('mouseout', handleOut);
|
|
80
|
+
element.addEventListener('mousemove', handleMove);
|
|
81
|
+
element.addEventListener('touchend', handleOut);
|
|
82
|
+
element.addEventListener('touchmove', handleMove);
|
|
80
83
|
return () => {
|
|
81
|
-
element.removeEventListener('mouseout',
|
|
82
|
-
element.removeEventListener('mousemove',
|
|
84
|
+
element.removeEventListener('mouseout', handleOut);
|
|
85
|
+
element.removeEventListener('mousemove', handleMove);
|
|
86
|
+
element.addEventListener('touchend', handleOut);
|
|
87
|
+
element.addEventListener('touchmove', handleMove);
|
|
83
88
|
};
|
|
84
89
|
}, [svgRef]);
|
|
85
90
|
return mousePosition;
|
|
@@ -204,7 +204,7 @@ function ChartsVoronoiHandler(props) {
|
|
|
204
204
|
process.env.NODE_ENV !== "production" ? ChartsVoronoiHandler.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
|
* Callback fired when clicking on a scatter item.
|
|
@@ -176,8 +176,7 @@ function ChartsXAxis(inProps) {
|
|
|
176
176
|
textAnchor: 'middle',
|
|
177
177
|
dominantBaseline: position === 'bottom' ? 'hanging' : 'auto',
|
|
178
178
|
fontSize: tickFontSize ?? 12
|
|
179
|
-
}, tickLabelStyle)
|
|
180
|
-
className: classes.tickLabel
|
|
179
|
+
}, tickLabelStyle)
|
|
181
180
|
},
|
|
182
181
|
className: classes.tickLabel,
|
|
183
182
|
ownerState: {}
|
|
@@ -258,7 +257,7 @@ function ChartsXAxis(inProps) {
|
|
|
258
257
|
process.env.NODE_ENV !== "production" ? ChartsXAxis.propTypes = {
|
|
259
258
|
// ----------------------------- Warning --------------------------------
|
|
260
259
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
261
|
-
// | To update them edit the TypeScript types and run "
|
|
260
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
262
261
|
// ----------------------------------------------------------------------
|
|
263
262
|
/**
|
|
264
263
|
* The id of the axis to render.
|
|
@@ -129,9 +129,9 @@ function ChartsYAxis(inProps) {
|
|
|
129
129
|
fontSize: tickFontSize,
|
|
130
130
|
textAnchor: position === 'right' ? 'start' : 'end',
|
|
131
131
|
dominantBaseline: 'central'
|
|
132
|
-
}, tickLabelStyle)
|
|
133
|
-
className: classes.tickLabel
|
|
132
|
+
}, tickLabelStyle)
|
|
134
133
|
},
|
|
134
|
+
className: classes.tickLabel,
|
|
135
135
|
ownerState: {}
|
|
136
136
|
});
|
|
137
137
|
const axisLabelProps = (0, _utils.useSlotProps)({
|
|
@@ -193,7 +193,7 @@ function ChartsYAxis(inProps) {
|
|
|
193
193
|
process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
194
194
|
// ----------------------------- Warning --------------------------------
|
|
195
195
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
196
|
-
// | To update them edit the TypeScript types and run "
|
|
196
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
197
197
|
// ----------------------------------------------------------------------
|
|
198
198
|
/**
|
|
199
199
|
* The id of the axis to render.
|
package/Gauge/Gauge.js
CHANGED
|
@@ -53,7 +53,7 @@ function Gauge(props) {
|
|
|
53
53
|
process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
54
54
|
// ----------------------------- Warning --------------------------------
|
|
55
55
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
|
-
// | To update them edit the TypeScript types and run "
|
|
56
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
57
57
|
// ----------------------------------------------------------------------
|
|
58
58
|
children: _propTypes.default.node,
|
|
59
59
|
classes: _propTypes.default.object,
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -115,7 +115,7 @@ const GaugeContainer = exports.GaugeContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
115
115
|
process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
116
116
|
// ----------------------------- Warning --------------------------------
|
|
117
117
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
118
|
-
// | To update them edit the TypeScript types and run "
|
|
118
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
119
119
|
// ----------------------------------------------------------------------
|
|
120
120
|
children: _propTypes.default.node,
|
|
121
121
|
className: _propTypes.default.string,
|
package/Gauge/GaugeValueText.js
CHANGED
|
@@ -57,7 +57,7 @@ function GaugeValueText(props) {
|
|
|
57
57
|
process.env.NODE_ENV !== "production" ? GaugeValueText.propTypes = {
|
|
58
58
|
// ----------------------------- Warning --------------------------------
|
|
59
59
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
|
-
// | To update them edit the TypeScript types and run "
|
|
60
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
61
|
// ----------------------------------------------------------------------
|
|
62
62
|
/**
|
|
63
63
|
* Height of a text line (in `em`).
|
|
@@ -93,7 +93,7 @@ function AnimatedArea(props) {
|
|
|
93
93
|
process.env.NODE_ENV !== "production" ? AnimatedArea.propTypes = {
|
|
94
94
|
// ----------------------------- Warning --------------------------------
|
|
95
95
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
96
|
-
// | To update them edit the TypeScript types and run "
|
|
96
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
97
97
|
// ----------------------------------------------------------------------
|
|
98
98
|
d: _propTypes.default.string.isRequired,
|
|
99
99
|
ownerState: _propTypes.default.shape({
|
|
@@ -96,7 +96,7 @@ function AnimatedLine(props) {
|
|
|
96
96
|
process.env.NODE_ENV !== "production" ? AnimatedLine.propTypes = {
|
|
97
97
|
// ----------------------------- Warning --------------------------------
|
|
98
98
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
99
|
-
// | To update them edit the TypeScript types and run "
|
|
99
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
100
100
|
// ----------------------------------------------------------------------
|
|
101
101
|
d: _propTypes.default.string.isRequired,
|
|
102
102
|
ownerState: _propTypes.default.shape({
|
|
@@ -31,7 +31,7 @@ export interface AreaElementSlots {
|
|
|
31
31
|
export interface AreaElementSlotProps {
|
|
32
32
|
area?: AnimatedAreaProps;
|
|
33
33
|
}
|
|
34
|
-
export interface AreaElementProps extends Omit<AreaElementOwnerState, 'isFaded' | 'isHighlighted'>, Pick<AnimatedAreaProps, 'skipAnimation'>, Omit<React.
|
|
34
|
+
export interface AreaElementProps extends Omit<AreaElementOwnerState, 'isFaded' | 'isHighlighted'>, Pick<AnimatedAreaProps, 'skipAnimation'>, Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
35
35
|
d: string;
|
|
36
36
|
highlightScope?: Partial<HighlightScope>;
|
|
37
37
|
/**
|
package/LineChart/AreaElement.js
CHANGED
|
@@ -85,22 +85,22 @@ function AreaElement(props) {
|
|
|
85
85
|
const areaProps = (0, _utils.useSlotProps)({
|
|
86
86
|
elementType: Area,
|
|
87
87
|
externalSlotProps: slotProps?.area,
|
|
88
|
-
additionalProps: (0, _extends2.default)({},
|
|
88
|
+
additionalProps: (0, _extends2.default)({}, getInteractionItemProps({
|
|
89
89
|
type: 'line',
|
|
90
90
|
seriesId: id
|
|
91
91
|
}), {
|
|
92
|
-
className: classes.root,
|
|
93
92
|
onClick,
|
|
94
93
|
cursor: onClick ? 'pointer' : 'unset'
|
|
95
94
|
}),
|
|
95
|
+
className: classes.root,
|
|
96
96
|
ownerState
|
|
97
97
|
});
|
|
98
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Area, (0, _extends2.default)({}, areaProps));
|
|
98
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Area, (0, _extends2.default)({}, other, areaProps));
|
|
99
99
|
}
|
|
100
100
|
process.env.NODE_ENV !== "production" ? AreaElement.propTypes = {
|
|
101
101
|
// ----------------------------- Warning --------------------------------
|
|
102
102
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
103
|
-
// | To update them edit the TypeScript types and run "
|
|
103
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
104
104
|
// ----------------------------------------------------------------------
|
|
105
105
|
classes: _propTypes.default.object,
|
|
106
106
|
color: _propTypes.default.string.isRequired,
|
package/LineChart/AreaPlot.js
CHANGED
|
@@ -42,7 +42,8 @@ const useAggregatedData = () => {
|
|
|
42
42
|
return stackingGroups.flatMap(({
|
|
43
43
|
ids: groupIds
|
|
44
44
|
}) => {
|
|
45
|
-
return groupIds.
|
|
45
|
+
return [...groupIds].reverse() // Revert stacked area for a more pleasant animation
|
|
46
|
+
.map(seriesId => {
|
|
46
47
|
const {
|
|
47
48
|
xAxisKey = defaultXAxisId,
|
|
48
49
|
yAxisKey = defaultYAxisId,
|
|
@@ -101,7 +102,7 @@ function AreaPlot(props) {
|
|
|
101
102
|
const getGradientId = (0, _ChartsAxesGradients.useChartGradient)();
|
|
102
103
|
const completedData = useAggregatedData();
|
|
103
104
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", (0, _extends2.default)({}, other, {
|
|
104
|
-
children: completedData.
|
|
105
|
+
children: completedData.map(({
|
|
105
106
|
d,
|
|
106
107
|
seriesId,
|
|
107
108
|
color,
|
|
@@ -127,7 +128,7 @@ function AreaPlot(props) {
|
|
|
127
128
|
process.env.NODE_ENV !== "production" ? AreaPlot.propTypes = {
|
|
128
129
|
// ----------------------------- Warning --------------------------------
|
|
129
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
130
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
131
132
|
// ----------------------------------------------------------------------
|
|
132
133
|
/**
|
|
133
134
|
* Callback fired when a line area item is clicked.
|
package/LineChart/LineChart.js
CHANGED
|
@@ -142,7 +142,7 @@ const LineChart = exports.LineChart = /*#__PURE__*/React.forwardRef(function Lin
|
|
|
142
142
|
process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
143
143
|
// ----------------------------- Warning --------------------------------
|
|
144
144
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
145
|
-
// | To update them edit the TypeScript types and run "
|
|
145
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
146
146
|
// ----------------------------------------------------------------------
|
|
147
147
|
/**
|
|
148
148
|
* The configuration of axes highlight.
|
|
@@ -214,6 +214,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
214
214
|
}),
|
|
215
215
|
/**
|
|
216
216
|
* If `true`, a loading overlay is displayed.
|
|
217
|
+
* @default false
|
|
217
218
|
*/
|
|
218
219
|
loading: _propTypes.default.bool,
|
|
219
220
|
/**
|
|
@@ -313,6 +314,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
313
314
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
314
315
|
classes: _propTypes.default.object,
|
|
315
316
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
317
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
318
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
319
|
+
unknownColor: _propTypes.default.string,
|
|
320
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
321
|
+
}), _propTypes.default.shape({
|
|
316
322
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
317
323
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
318
324
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -321,11 +327,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
321
327
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
322
328
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
323
329
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
324
|
-
}), _propTypes.default.shape({
|
|
325
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
326
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
327
|
-
unknownColor: _propTypes.default.string,
|
|
328
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
329
330
|
})]),
|
|
330
331
|
data: _propTypes.default.array,
|
|
331
332
|
dataKey: _propTypes.default.string,
|
|
@@ -366,6 +367,11 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
366
367
|
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
367
368
|
classes: _propTypes.default.object,
|
|
368
369
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
370
|
+
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
371
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
372
|
+
unknownColor: _propTypes.default.string,
|
|
373
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
374
|
+
}), _propTypes.default.shape({
|
|
369
375
|
color: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func]).isRequired,
|
|
370
376
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
371
377
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
@@ -374,11 +380,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
374
380
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
375
381
|
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
376
382
|
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
377
|
-
}), _propTypes.default.shape({
|
|
378
|
-
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
379
|
-
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
380
|
-
unknownColor: _propTypes.default.string,
|
|
381
|
-
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
382
383
|
})]),
|
|
383
384
|
data: _propTypes.default.array,
|
|
384
385
|
dataKey: _propTypes.default.string,
|
|
@@ -31,7 +31,7 @@ export interface LineElementSlots {
|
|
|
31
31
|
export interface LineElementSlotProps {
|
|
32
32
|
line?: AnimatedLineProps;
|
|
33
33
|
}
|
|
34
|
-
export interface LineElementProps extends Omit<LineElementOwnerState, 'isFaded' | 'isHighlighted'>, Pick<AnimatedLineProps, 'skipAnimation'>, Omit<React.
|
|
34
|
+
export interface LineElementProps extends Omit<LineElementOwnerState, 'isFaded' | 'isHighlighted'>, Pick<AnimatedLineProps, 'skipAnimation'>, Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color' | 'id'> {
|
|
35
35
|
d: string;
|
|
36
36
|
highlightScope?: Partial<HighlightScope>;
|
|
37
37
|
/**
|