@mui/x-charts 9.2.0 → 9.4.0
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 +10 -10
- package/BarChart/BarChart.mjs +10 -10
- package/BarChart/BarElement.d.mts +3 -2
- package/BarChart/BarElement.d.ts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
- package/BarChart/seriesConfig/bar/extremums.js +7 -2
- package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
- package/BarChart/seriesConfig/bar/getColor.js +7 -53
- package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
- package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
- package/BarChart/seriesConfig/bar/tooltip.js +4 -27
- package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
- package/CHANGELOG.md +314 -0
- package/ChartsContainer/ChartsContainer.js +30 -9
- package/ChartsContainer/ChartsContainer.mjs +30 -9
- package/ChartsLabel/ChartsLabelMark.js +1 -23
- package/ChartsLabel/ChartsLabelMark.mjs +0 -22
- package/ChartsLabel/labelMarkClasses.d.mts +0 -1
- package/ChartsLabel/labelMarkClasses.d.ts +0 -1
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLabel/labelMarkClasses.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
- package/ChartsLegend/chartsLegend.types.d.mts +3 -2
- package/ChartsLegend/chartsLegend.types.d.ts +3 -2
- package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
- package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
- package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
- package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
- package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
- package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
- package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
- package/ChartsTooltip/useAxesTooltip.js +2 -2
- package/ChartsTooltip/useAxesTooltip.mjs +2 -2
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsTooltip/useItemTooltip.mjs +2 -2
- package/ChartsXAxis/ChartsXAxis.js +3 -1
- package/ChartsXAxis/ChartsXAxis.mjs +3 -1
- package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/ChartsYAxis/ChartsYAxis.mjs +3 -1
- package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
- package/LineChart/AreaElement.d.mts +3 -2
- package/LineChart/AreaElement.d.ts +3 -2
- package/LineChart/LineChart.js +6 -6
- package/LineChart/LineChart.mjs +6 -6
- package/LineChart/LineElement.d.mts +3 -2
- package/LineChart/LineElement.d.ts +3 -2
- package/LineChart/LineHighlightPlot.d.mts +3 -2
- package/LineChart/LineHighlightPlot.d.ts +3 -2
- package/LineChart/LineHighlightPlot.js +65 -45
- package/LineChart/LineHighlightPlot.mjs +65 -45
- package/LineChart/MarkPlot.d.mts +3 -2
- package/LineChart/MarkPlot.d.ts +3 -2
- package/LineChart/seriesConfig/curveEvaluation.js +40 -15
- package/LineChart/seriesConfig/curveEvaluation.mjs +39 -15
- package/LineChart/seriesConfig/extremums.js +5 -1
- package/LineChart/seriesConfig/extremums.mjs +5 -1
- package/LineChart/seriesConfig/getColor.js +7 -54
- package/LineChart/seriesConfig/getColor.mjs +7 -54
- package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.js +2 -139
- package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
- package/LineChart/seriesConfig/tooltip.js +4 -25
- package/LineChart/seriesConfig/tooltip.mjs +4 -25
- package/LineChart/useMarkPlotData.js +3 -1
- package/LineChart/useMarkPlotData.mjs +3 -1
- package/PieChart/PieArcLabelPlot.d.mts +3 -2
- package/PieChart/PieArcLabelPlot.d.ts +3 -2
- package/PieChart/PieArcPlot.d.mts +3 -2
- package/PieChart/PieArcPlot.d.ts +3 -2
- package/PieChart/PieChart.js +6 -6
- package/PieChart/PieChart.mjs +6 -6
- package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarChart.mjs +8 -8
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
- package/ScatterChart/BatchScatter.d.mts +2 -8
- package/ScatterChart/BatchScatter.d.ts +2 -8
- package/ScatterChart/BatchScatter.js +17 -12
- package/ScatterChart/BatchScatter.mjs +17 -12
- package/ScatterChart/FocusedScatterMark.js +2 -2
- package/ScatterChart/FocusedScatterMark.mjs +2 -2
- package/ScatterChart/HighlightedScatterMark.js +3 -3
- package/ScatterChart/HighlightedScatterMark.mjs +3 -3
- package/ScatterChart/Scatter.d.mts +5 -0
- package/ScatterChart/Scatter.d.ts +5 -0
- package/ScatterChart/Scatter.js +7 -2
- package/ScatterChart/Scatter.mjs +7 -2
- package/ScatterChart/ScatterChart.d.mts +2 -1
- package/ScatterChart/ScatterChart.d.ts +2 -1
- package/ScatterChart/ScatterChart.js +32 -11
- package/ScatterChart/ScatterChart.mjs +32 -11
- package/ScatterChart/ScatterMarker.types.d.mts +3 -2
- package/ScatterChart/ScatterMarker.types.d.ts +3 -2
- package/ScatterChart/ScatterPlot.d.mts +3 -2
- package/ScatterChart/ScatterPlot.d.ts +3 -2
- package/ScatterChart/ScatterPlot.js +6 -1
- package/ScatterChart/ScatterPlot.mjs +6 -1
- package/ScatterChart/seriesConfig/extremums.js +6 -0
- package/ScatterChart/seriesConfig/extremums.mjs +6 -0
- package/ScatterChart/seriesConfig/getColor.js +1 -1
- package/ScatterChart/seriesConfig/getColor.mjs +1 -1
- package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
- package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
- package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
- package/ScatterChart/seriesConfig/tooltip.js +2 -24
- package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
- package/ScatterChart/useScatterItemPosition.d.mts +4 -0
- package/ScatterChart/useScatterItemPosition.d.ts +4 -0
- package/ScatterChart/useScatterItemPosition.js +9 -0
- package/ScatterChart/useScatterItemPosition.mjs +8 -0
- package/SparkLineChart/SparkLineChart.js +27 -27
- package/SparkLineChart/SparkLineChart.mjs +27 -27
- package/Toolbar/Toolbar.types.d.mts +3 -2
- package/Toolbar/Toolbar.types.d.ts +3 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/animation/animation.d.mts +1 -2
- package/internals/animation/animation.d.ts +1 -2
- package/internals/commonNextFocusItem.d.mts +10 -2
- package/internals/commonNextFocusItem.d.ts +10 -2
- package/internals/commonNextFocusItem.js +12 -4
- package/internals/commonNextFocusItem.mjs +12 -4
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
- package/internals/createCommonKeyboardFocusHandler.js +3 -3
- package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
- package/internals/getLineLikeTooltip.d.mts +9 -0
- package/internals/getLineLikeTooltip.d.ts +9 -0
- package/internals/getLineLikeTooltip.js +38 -0
- package/internals/getLineLikeTooltip.mjs +31 -0
- package/internals/incompleteDatasetKeysError.d.mts +1 -0
- package/internals/incompleteDatasetKeysError.d.ts +1 -0
- package/internals/incompleteDatasetKeysError.js +11 -0
- package/internals/incompleteDatasetKeysError.mjs +4 -0
- package/internals/index.d.mts +5 -0
- package/internals/index.d.ts +5 -0
- package/internals/index.js +48 -0
- package/internals/index.mjs +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +6 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +6 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
- package/internals/processLineLikeSeries.d.mts +6 -0
- package/internals/processLineLikeSeries.d.ts +6 -0
- package/internals/processLineLikeSeries.js +145 -0
- package/internals/processLineLikeSeries.mjs +138 -0
- package/internals/resolveColorProcessor.d.mts +11 -0
- package/internals/resolveColorProcessor.d.ts +11 -0
- package/internals/resolveColorProcessor.js +62 -0
- package/internals/resolveColorProcessor.mjs +56 -0
- package/internals/sizeScale.d.mts +6 -0
- package/internals/sizeScale.d.ts +6 -0
- package/internals/sizeScale.js +46 -0
- package/internals/sizeScale.mjs +38 -0
- package/models/axis.d.mts +18 -12
- package/models/axis.d.ts +18 -12
- package/models/chartsSlotsComponentsProps.d.mts +25 -0
- package/models/chartsSlotsComponentsProps.d.ts +25 -0
- package/models/chartsSlotsComponentsProps.js +5 -0
- package/models/chartsSlotsComponentsProps.mjs +1 -0
- package/models/index.d.mts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/index.mjs +1 -0
- package/models/seriesType/line.d.mts +5 -2
- package/models/seriesType/line.d.ts +5 -2
- package/models/seriesType/scatter.d.mts +34 -2
- package/models/seriesType/scatter.d.ts +34 -2
- package/models/sizeMapping.d.mts +64 -0
- package/models/sizeMapping.d.ts +64 -0
- package/models/sizeMapping.js +5 -0
- package/models/sizeMapping.mjs +1 -0
- package/models/slots/chartsBaseSlots.d.mts +6 -5
- package/models/slots/chartsBaseSlots.d.ts +6 -5
- package/models/z-axis.d.mts +10 -1
- package/models/z-axis.d.ts +10 -1
- package/package.json +6 -6
|
@@ -81,37 +81,43 @@ const ChartsLayerContainer = exports.ChartsLayerContainer = /*#__PURE__*/React.f
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, other, {
|
|
95
|
-
onPointerEnter: event => {
|
|
96
|
-
other.onPointerEnter?.(event);
|
|
97
|
-
instance.handlePointerEnter?.(event);
|
|
98
|
-
},
|
|
99
|
-
onPointerLeave: event => {
|
|
100
|
-
other.onPointerLeave?.(event);
|
|
101
|
-
instance.handlePointerLeave?.(event);
|
|
102
|
-
},
|
|
103
|
-
onClick: event => {
|
|
104
|
-
other.onClick?.(event);
|
|
105
|
-
instance.handleClick?.(event);
|
|
106
|
-
},
|
|
107
|
-
children: [isKeyboardNavigationEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAccessibilityProxy.ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
108
|
-
id: descId,
|
|
109
|
-
style: {
|
|
110
|
-
display: 'none'
|
|
84
|
+
return (
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// `role="none"` is an alias for `role="presentation"`, but aria-query treats them differently.
|
|
87
|
+
// See https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/1090
|
|
88
|
+
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
|
|
89
|
+
(0, _jsxRuntime.jsxs)(ChartsLayerContainerDiv, (0, _extends2.default)({
|
|
90
|
+
ref: handleRef,
|
|
91
|
+
ownerState: {
|
|
92
|
+
width: propsWidth,
|
|
93
|
+
height: propsHeight
|
|
111
94
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
role: "none",
|
|
96
|
+
"aria-label": title,
|
|
97
|
+
"aria-describedby": desc ? descId : undefined,
|
|
98
|
+
className: (0, _clsx.default)(classes.root, className)
|
|
99
|
+
}, other, {
|
|
100
|
+
onPointerEnter: event => {
|
|
101
|
+
other.onPointerEnter?.(event);
|
|
102
|
+
instance.handlePointerEnter?.(event);
|
|
103
|
+
},
|
|
104
|
+
onPointerLeave: event => {
|
|
105
|
+
other.onPointerLeave?.(event);
|
|
106
|
+
instance.handlePointerLeave?.(event);
|
|
107
|
+
},
|
|
108
|
+
onClick: event => {
|
|
109
|
+
other.onClick?.(event);
|
|
110
|
+
instance.handleClick?.(event);
|
|
111
|
+
},
|
|
112
|
+
children: [isKeyboardNavigationEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAccessibilityProxy.ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
113
|
+
id: descId,
|
|
114
|
+
style: {
|
|
115
|
+
display: 'none'
|
|
116
|
+
},
|
|
117
|
+
children: desc
|
|
118
|
+
}), children]
|
|
119
|
+
}))
|
|
120
|
+
);
|
|
115
121
|
});
|
|
116
122
|
if (process.env.NODE_ENV !== "production") ChartsLayerContainer.displayName = "ChartsLayerContainer";
|
|
117
123
|
process.env.NODE_ENV !== "production" ? ChartsLayerContainer.propTypes = {
|
|
@@ -75,37 +75,43 @@ const ChartsLayerContainer = /*#__PURE__*/React.forwardRef(function ChartsLayerC
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, other, {
|
|
89
|
-
onPointerEnter: event => {
|
|
90
|
-
other.onPointerEnter?.(event);
|
|
91
|
-
instance.handlePointerEnter?.(event);
|
|
92
|
-
},
|
|
93
|
-
onPointerLeave: event => {
|
|
94
|
-
other.onPointerLeave?.(event);
|
|
95
|
-
instance.handlePointerLeave?.(event);
|
|
96
|
-
},
|
|
97
|
-
onClick: event => {
|
|
98
|
-
other.onClick?.(event);
|
|
99
|
-
instance.handleClick?.(event);
|
|
100
|
-
},
|
|
101
|
-
children: [isKeyboardNavigationEnabled && /*#__PURE__*/_jsx(ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/_jsx("span", {
|
|
102
|
-
id: descId,
|
|
103
|
-
style: {
|
|
104
|
-
display: 'none'
|
|
78
|
+
return (
|
|
79
|
+
/*#__PURE__*/
|
|
80
|
+
// `role="none"` is an alias for `role="presentation"`, but aria-query treats them differently.
|
|
81
|
+
// See https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/1090
|
|
82
|
+
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
|
|
83
|
+
_jsxs(ChartsLayerContainerDiv, _extends({
|
|
84
|
+
ref: handleRef,
|
|
85
|
+
ownerState: {
|
|
86
|
+
width: propsWidth,
|
|
87
|
+
height: propsHeight
|
|
105
88
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
role: "none",
|
|
90
|
+
"aria-label": title,
|
|
91
|
+
"aria-describedby": desc ? descId : undefined,
|
|
92
|
+
className: clsx(classes.root, className)
|
|
93
|
+
}, other, {
|
|
94
|
+
onPointerEnter: event => {
|
|
95
|
+
other.onPointerEnter?.(event);
|
|
96
|
+
instance.handlePointerEnter?.(event);
|
|
97
|
+
},
|
|
98
|
+
onPointerLeave: event => {
|
|
99
|
+
other.onPointerLeave?.(event);
|
|
100
|
+
instance.handlePointerLeave?.(event);
|
|
101
|
+
},
|
|
102
|
+
onClick: event => {
|
|
103
|
+
other.onClick?.(event);
|
|
104
|
+
instance.handleClick?.(event);
|
|
105
|
+
},
|
|
106
|
+
children: [isKeyboardNavigationEnabled && /*#__PURE__*/_jsx(ChartsAccessibilityProxy, {}), desc && /*#__PURE__*/_jsx("span", {
|
|
107
|
+
id: descId,
|
|
108
|
+
style: {
|
|
109
|
+
display: 'none'
|
|
110
|
+
},
|
|
111
|
+
children: desc
|
|
112
|
+
}), children]
|
|
113
|
+
}))
|
|
114
|
+
);
|
|
109
115
|
});
|
|
110
116
|
if (process.env.NODE_ENV !== "production") ChartsLayerContainer.displayName = "ChartsLayerContainer";
|
|
111
117
|
process.env.NODE_ENV !== "production" ? ChartsLayerContainer.propTypes = {
|
|
@@ -2,15 +2,16 @@ import type { ChartsLegendProps } from "./ChartsLegend.mjs";
|
|
|
2
2
|
import { type ContinuousColorLegendProps } from "./ContinuousColorLegend.mjs";
|
|
3
3
|
import { type ChartsLegendPosition } from "./legend.types.mjs";
|
|
4
4
|
import { type PiecewiseColorLegendProps } from "./PiecewiseColorLegend.mjs";
|
|
5
|
+
import type { LegendPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
5
6
|
export interface ChartsLegendSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom rendering of the legend.
|
|
8
9
|
* @default ChartsLegend
|
|
9
10
|
*/
|
|
10
|
-
legend?: React.JSXElementConstructor<ChartsLegendProps> | React.JSXElementConstructor<ContinuousColorLegendProps> | React.JSXElementConstructor<PiecewiseColorLegendProps>;
|
|
11
|
+
legend?: React.JSXElementConstructor<ChartsLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<ContinuousColorLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<PiecewiseColorLegendProps & LegendPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface ChartsLegendSlotProps {
|
|
13
|
-
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition;
|
|
14
|
+
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition & LegendPropsOverrides;
|
|
14
15
|
}
|
|
15
16
|
export interface ChartsLegendSlotExtension {
|
|
16
17
|
/**
|
|
@@ -2,15 +2,16 @@ import type { ChartsLegendProps } from "./ChartsLegend.js";
|
|
|
2
2
|
import { type ContinuousColorLegendProps } from "./ContinuousColorLegend.js";
|
|
3
3
|
import { type ChartsLegendPosition } from "./legend.types.js";
|
|
4
4
|
import { type PiecewiseColorLegendProps } from "./PiecewiseColorLegend.js";
|
|
5
|
+
import type { LegendPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
5
6
|
export interface ChartsLegendSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom rendering of the legend.
|
|
8
9
|
* @default ChartsLegend
|
|
9
10
|
*/
|
|
10
|
-
legend?: React.JSXElementConstructor<ChartsLegendProps> | React.JSXElementConstructor<ContinuousColorLegendProps> | React.JSXElementConstructor<PiecewiseColorLegendProps>;
|
|
11
|
+
legend?: React.JSXElementConstructor<ChartsLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<ContinuousColorLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<PiecewiseColorLegendProps & LegendPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface ChartsLegendSlotProps {
|
|
13
|
-
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition;
|
|
14
|
+
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition & LegendPropsOverrides;
|
|
14
15
|
}
|
|
15
16
|
export interface ChartsLegendSlotExtension {
|
|
16
17
|
/**
|
|
@@ -8,8 +8,14 @@ exports.useUtilityClasses = exports.piecewiseColorLegendClasses = void 0;
|
|
|
8
8
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
9
9
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
10
10
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
|
+
const CORRECT_PREFIX = 'MuiPiecewiseColorLegend';
|
|
12
|
+
// TODO v10: remove `MuiPiecewiseColorLegendClasses`. Kept for backwards compatibility with
|
|
13
|
+
// users targeting the historically-incorrect prefix.
|
|
14
|
+
const LEGACY_PREFIX = 'MuiPiecewiseColorLegendClasses';
|
|
15
|
+
|
|
16
|
+
// Used by `useUtilityClasses` to also emit the legacy prefix in the rendered className.
|
|
11
17
|
function getLegendUtilityClass(slot) {
|
|
12
|
-
return (0, _generateUtilityClass.default)(
|
|
18
|
+
return `${(0, _generateUtilityClass.default)(CORRECT_PREFIX, slot)} ${(0, _generateUtilityClass.default)(LEGACY_PREFIX, slot)}`;
|
|
13
19
|
}
|
|
14
20
|
const useUtilityClasses = props => {
|
|
15
21
|
const {
|
|
@@ -28,4 +34,4 @@ const useUtilityClasses = props => {
|
|
|
28
34
|
return (0, _composeClasses.default)(slots, getLegendUtilityClass, classes);
|
|
29
35
|
};
|
|
30
36
|
exports.useUtilityClasses = useUtilityClasses;
|
|
31
|
-
const piecewiseColorLegendClasses = exports.piecewiseColorLegendClasses = (0, _generateUtilityClasses.default)(
|
|
37
|
+
const piecewiseColorLegendClasses = exports.piecewiseColorLegendClasses = (0, _generateUtilityClasses.default)(CORRECT_PREFIX, ['root', 'minLabel', 'maxLabel', 'item', 'vertical', 'horizontal', 'start', 'end', 'extremes', 'inlineStart', 'inlineEnd', 'mark', 'label']);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
2
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
+
const CORRECT_PREFIX = 'MuiPiecewiseColorLegend';
|
|
5
|
+
// TODO v10: remove `MuiPiecewiseColorLegendClasses`. Kept for backwards compatibility with
|
|
6
|
+
// users targeting the historically-incorrect prefix.
|
|
7
|
+
const LEGACY_PREFIX = 'MuiPiecewiseColorLegendClasses';
|
|
8
|
+
|
|
9
|
+
// Used by `useUtilityClasses` to also emit the legacy prefix in the rendered className.
|
|
4
10
|
function getLegendUtilityClass(slot) {
|
|
5
|
-
return generateUtilityClass(
|
|
11
|
+
return `${generateUtilityClass(CORRECT_PREFIX, slot)} ${generateUtilityClass(LEGACY_PREFIX, slot)}`;
|
|
6
12
|
}
|
|
7
13
|
export const useUtilityClasses = props => {
|
|
8
14
|
const {
|
|
@@ -20,4 +26,4 @@ export const useUtilityClasses = props => {
|
|
|
20
26
|
};
|
|
21
27
|
return composeClasses(slots, getLegendUtilityClass, classes);
|
|
22
28
|
};
|
|
23
|
-
export const piecewiseColorLegendClasses = generateUtilityClasses(
|
|
29
|
+
export const piecewiseColorLegendClasses = generateUtilityClasses(CORRECT_PREFIX, ['root', 'minLabel', 'maxLabel', 'item', 'vertical', 'horizontal', 'start', 'end', 'extremes', 'inlineStart', 'inlineEnd', 'mark', 'label']);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
3
3
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
4
|
+
import type { LoadingOverlayPropsOverrides, NoDataOverlayPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
4
5
|
export declare function useNoData(): boolean;
|
|
5
6
|
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
|
|
6
7
|
sx?: SxProps<Theme>;
|
|
@@ -10,16 +11,16 @@ export interface ChartsOverlaySlots {
|
|
|
10
11
|
* Overlay component rendered when the chart is in a loading state.
|
|
11
12
|
* @default ChartsLoadingOverlay
|
|
12
13
|
*/
|
|
13
|
-
loadingOverlay?: React.ElementType<CommonOverlayProps>;
|
|
14
|
+
loadingOverlay?: React.ElementType<CommonOverlayProps & LoadingOverlayPropsOverrides>;
|
|
14
15
|
/**
|
|
15
16
|
* Overlay component rendered when the chart has no data to display.
|
|
16
17
|
* @default ChartsNoDataOverlay
|
|
17
18
|
*/
|
|
18
|
-
noDataOverlay?: React.ElementType<CommonOverlayProps>;
|
|
19
|
+
noDataOverlay?: React.ElementType<CommonOverlayProps & NoDataOverlayPropsOverrides>;
|
|
19
20
|
}
|
|
20
21
|
export interface ChartsOverlaySlotProps {
|
|
21
|
-
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
-
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
+
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, LoadingOverlayPropsOverrides, {}>;
|
|
23
|
+
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, NoDataOverlayPropsOverrides, {}>;
|
|
23
24
|
}
|
|
24
25
|
export interface ChartsOverlayProps {
|
|
25
26
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
3
3
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
4
|
+
import type { LoadingOverlayPropsOverrides, NoDataOverlayPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
4
5
|
export declare function useNoData(): boolean;
|
|
5
6
|
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
|
|
6
7
|
sx?: SxProps<Theme>;
|
|
@@ -10,16 +11,16 @@ export interface ChartsOverlaySlots {
|
|
|
10
11
|
* Overlay component rendered when the chart is in a loading state.
|
|
11
12
|
* @default ChartsLoadingOverlay
|
|
12
13
|
*/
|
|
13
|
-
loadingOverlay?: React.ElementType<CommonOverlayProps>;
|
|
14
|
+
loadingOverlay?: React.ElementType<CommonOverlayProps & LoadingOverlayPropsOverrides>;
|
|
14
15
|
/**
|
|
15
16
|
* Overlay component rendered when the chart has no data to display.
|
|
16
17
|
* @default ChartsNoDataOverlay
|
|
17
18
|
*/
|
|
18
|
-
noDataOverlay?: React.ElementType<CommonOverlayProps>;
|
|
19
|
+
noDataOverlay?: React.ElementType<CommonOverlayProps & NoDataOverlayPropsOverrides>;
|
|
19
20
|
}
|
|
20
21
|
export interface ChartsOverlaySlotProps {
|
|
21
|
-
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
-
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
+
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, LoadingOverlayPropsOverrides, {}>;
|
|
23
|
+
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, NoDataOverlayPropsOverrides, {}>;
|
|
23
24
|
}
|
|
24
25
|
export interface ChartsOverlayProps {
|
|
25
26
|
/**
|
|
@@ -76,7 +76,9 @@ function ChartsXReferenceLine(props) {
|
|
|
76
76
|
} = props;
|
|
77
77
|
const {
|
|
78
78
|
top,
|
|
79
|
-
height
|
|
79
|
+
height,
|
|
80
|
+
left,
|
|
81
|
+
width
|
|
80
82
|
} = (0, _hooks.useDrawingArea)();
|
|
81
83
|
const xAxisScale = (0, _hooks.useXScale)(axisId);
|
|
82
84
|
const xPosition = xAxisScale(x);
|
|
@@ -86,6 +88,9 @@ function ChartsXReferenceLine(props) {
|
|
|
86
88
|
}
|
|
87
89
|
return null;
|
|
88
90
|
}
|
|
91
|
+
if (xPosition < left || xPosition > left + width) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
89
94
|
const d = `M ${xPosition} ${top} l 0 ${height}`;
|
|
90
95
|
const classes = getXReferenceLineClasses(inClasses);
|
|
91
96
|
const textParams = (0, _extends2.default)({
|
|
@@ -69,7 +69,9 @@ function ChartsXReferenceLine(props) {
|
|
|
69
69
|
} = props;
|
|
70
70
|
const {
|
|
71
71
|
top,
|
|
72
|
-
height
|
|
72
|
+
height,
|
|
73
|
+
left,
|
|
74
|
+
width
|
|
73
75
|
} = useDrawingArea();
|
|
74
76
|
const xAxisScale = useXScale(axisId);
|
|
75
77
|
const xPosition = xAxisScale(x);
|
|
@@ -79,6 +81,9 @@ function ChartsXReferenceLine(props) {
|
|
|
79
81
|
}
|
|
80
82
|
return null;
|
|
81
83
|
}
|
|
84
|
+
if (xPosition < left || xPosition > left + width) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
82
87
|
const d = `M ${xPosition} ${top} l 0 ${height}`;
|
|
83
88
|
const classes = getXReferenceLineClasses(inClasses);
|
|
84
89
|
const textParams = _extends({
|
|
@@ -75,6 +75,8 @@ function ChartsYReferenceLine(props) {
|
|
|
75
75
|
axisId
|
|
76
76
|
} = props;
|
|
77
77
|
const {
|
|
78
|
+
top,
|
|
79
|
+
height,
|
|
78
80
|
left,
|
|
79
81
|
width
|
|
80
82
|
} = (0, _hooks.useDrawingArea)();
|
|
@@ -86,6 +88,9 @@ function ChartsYReferenceLine(props) {
|
|
|
86
88
|
}
|
|
87
89
|
return null;
|
|
88
90
|
}
|
|
91
|
+
if (yPosition < top || yPosition > top + height) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
89
94
|
const d = `M ${left} ${yPosition} l ${width} 0`;
|
|
90
95
|
const classes = getYReferenceLineClasses(inClasses);
|
|
91
96
|
const textParams = (0, _extends2.default)({
|
|
@@ -68,6 +68,8 @@ function ChartsYReferenceLine(props) {
|
|
|
68
68
|
axisId
|
|
69
69
|
} = props;
|
|
70
70
|
const {
|
|
71
|
+
top,
|
|
72
|
+
height,
|
|
71
73
|
left,
|
|
72
74
|
width
|
|
73
75
|
} = useDrawingArea();
|
|
@@ -79,6 +81,9 @@ function ChartsYReferenceLine(props) {
|
|
|
79
81
|
}
|
|
80
82
|
return null;
|
|
81
83
|
}
|
|
84
|
+
if (yPosition < top || yPosition > top + height) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
82
87
|
const d = `M ${left} ${yPosition} l ${width} 0`;
|
|
83
88
|
const classes = getYReferenceLineClasses(inClasses);
|
|
84
89
|
const textParams = _extends({
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { type ChartsTooltipProps } from "./ChartsTooltip.mjs";
|
|
2
2
|
import { type TriggerOptions } from "./utils.mjs";
|
|
3
|
+
import type { TooltipPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
3
4
|
export interface ChartsTooltipSlots<T extends TriggerOptions = TriggerOptions> {
|
|
4
5
|
/**
|
|
5
6
|
* Custom component for the tooltip popper.
|
|
6
7
|
* @default ChartsTooltipRoot
|
|
7
8
|
*/
|
|
8
|
-
tooltip?: React.ElementType<ChartsTooltipProps<T
|
|
9
|
+
tooltip?: React.ElementType<ChartsTooltipProps<T> & TooltipPropsOverrides>;
|
|
9
10
|
}
|
|
10
11
|
export interface ChartsTooltipSlotProps<T extends TriggerOptions = TriggerOptions> {
|
|
11
12
|
/**
|
|
12
13
|
* Custom component for the tooltip popper.
|
|
13
14
|
* @default ChartsTooltipRoot
|
|
14
15
|
*/
|
|
15
|
-
tooltip?: Partial<ChartsTooltipProps<T
|
|
16
|
+
tooltip?: Partial<ChartsTooltipProps<T>> & TooltipPropsOverrides;
|
|
16
17
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { type ChartsTooltipProps } from "./ChartsTooltip.js";
|
|
2
2
|
import { type TriggerOptions } from "./utils.js";
|
|
3
|
+
import type { TooltipPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
3
4
|
export interface ChartsTooltipSlots<T extends TriggerOptions = TriggerOptions> {
|
|
4
5
|
/**
|
|
5
6
|
* Custom component for the tooltip popper.
|
|
6
7
|
* @default ChartsTooltipRoot
|
|
7
8
|
*/
|
|
8
|
-
tooltip?: React.ElementType<ChartsTooltipProps<T
|
|
9
|
+
tooltip?: React.ElementType<ChartsTooltipProps<T> & TooltipPropsOverrides>;
|
|
9
10
|
}
|
|
10
11
|
export interface ChartsTooltipSlotProps<T extends TriggerOptions = TriggerOptions> {
|
|
11
12
|
/**
|
|
12
13
|
* Custom component for the tooltip popper.
|
|
13
14
|
* @default ChartsTooltipRoot
|
|
14
15
|
*/
|
|
15
|
-
tooltip?: Partial<ChartsTooltipProps<T
|
|
16
|
+
tooltip?: Partial<ChartsTooltipProps<T>> & TooltipPropsOverrides;
|
|
16
17
|
}
|
|
@@ -137,11 +137,11 @@ function useAxesTooltip(params) {
|
|
|
137
137
|
}) => axisDirection === 'x' && axisId === providedXAxisId || axisDirection === 'y' && axisId === providedYAxisId);
|
|
138
138
|
// Test if the series uses the default axis
|
|
139
139
|
if (tooltipItemIndex >= 0) {
|
|
140
|
-
const
|
|
140
|
+
const colorAxisId = 'colorAxisId' in seriesToAdd && seriesToAdd.colorAxisId || 'zAxisId' in seriesToAdd && seriesToAdd.zAxisId || zAxisIds[0];
|
|
141
141
|
const {
|
|
142
142
|
dataIndex
|
|
143
143
|
} = tooltipAxes[tooltipItemIndex];
|
|
144
|
-
const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[providedXAxisId], yAxis[providedYAxisId],
|
|
144
|
+
const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[providedXAxisId], yAxis[providedYAxisId], colorAxisId ? zAxis[colorAxisId] : undefined)(dataIndex) ?? '';
|
|
145
145
|
const rawValue = seriesToAdd.data[dataIndex] ?? null;
|
|
146
146
|
const formattedLabel = (0, _getLabel.getLabel)(seriesToAdd.label, 'tooltip') ?? null;
|
|
147
147
|
let value;
|
|
@@ -132,11 +132,11 @@ export function useAxesTooltip(params) {
|
|
|
132
132
|
}) => axisDirection === 'x' && axisId === providedXAxisId || axisDirection === 'y' && axisId === providedYAxisId);
|
|
133
133
|
// Test if the series uses the default axis
|
|
134
134
|
if (tooltipItemIndex >= 0) {
|
|
135
|
-
const
|
|
135
|
+
const colorAxisId = 'colorAxisId' in seriesToAdd && seriesToAdd.colorAxisId || 'zAxisId' in seriesToAdd && seriesToAdd.zAxisId || zAxisIds[0];
|
|
136
136
|
const {
|
|
137
137
|
dataIndex
|
|
138
138
|
} = tooltipAxes[tooltipItemIndex];
|
|
139
|
-
const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[providedXAxisId], yAxis[providedYAxisId],
|
|
139
|
+
const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[providedXAxisId], yAxis[providedYAxisId], colorAxisId ? zAxis[colorAxisId] : undefined)(dataIndex) ?? '';
|
|
140
140
|
const rawValue = seriesToAdd.data[dataIndex] ?? null;
|
|
141
141
|
const formattedLabel = getLabel(seriesToAdd.label, 'tooltip') ?? null;
|
|
142
142
|
let value;
|
|
@@ -50,14 +50,14 @@ function useInternalItemTooltip() {
|
|
|
50
50
|
const yAxisId = (0, _isCartesian.isCartesianSeries)(itemSeries) ? itemSeries.yAxisId ?? yAxisIds[0] : undefined;
|
|
51
51
|
const radiusAxisId = (0, _isPolar.isPolarSeries)(itemSeries) ? ('radiusAxisId' in itemSeries ? itemSeries.radiusAxisId : undefined) ?? radiusAxisIds[0] : undefined;
|
|
52
52
|
const rotationAxisId = (0, _isPolar.isPolarSeries)(itemSeries) ? ('rotationAxisId' in itemSeries ? itemSeries.rotationAxisId : undefined) ?? rotationAxisIds[0] : undefined;
|
|
53
|
-
const
|
|
53
|
+
const colorAxisId = ('colorAxisId' in itemSeries ? itemSeries.colorAxisId : undefined) ?? ('zAxisId' in itemSeries ? itemSeries.zAxisId : undefined) ?? zAxisIds[0];
|
|
54
54
|
const mainAxis =
|
|
55
55
|
// eslint-disable-next-line no-nested-ternary
|
|
56
56
|
rotationAxisId !== undefined ? rotationAxis[rotationAxisId] : xAxisId !== undefined ? xAxis[xAxisId] : undefined;
|
|
57
57
|
const secondAxis =
|
|
58
58
|
// eslint-disable-next-line no-nested-ternary
|
|
59
59
|
radiusAxisId !== undefined ? radiusAxis[radiusAxisId] : yAxisId !== undefined ? yAxis[yAxisId] : undefined;
|
|
60
|
-
const getColor = seriesConfig[itemSeries.type].colorProcessor(itemSeries, mainAxis, secondAxis,
|
|
60
|
+
const getColor = seriesConfig[itemSeries.type].colorProcessor(itemSeries, mainAxis, secondAxis, colorAxisId !== undefined ? zAxis[colorAxisId] : undefined);
|
|
61
61
|
const axesConfig = {};
|
|
62
62
|
if (xAxisId !== undefined) {
|
|
63
63
|
axesConfig.x = xAxis[xAxisId];
|
|
@@ -44,14 +44,14 @@ export function useInternalItemTooltip() {
|
|
|
44
44
|
const yAxisId = isCartesianSeries(itemSeries) ? itemSeries.yAxisId ?? yAxisIds[0] : undefined;
|
|
45
45
|
const radiusAxisId = isPolarSeries(itemSeries) ? ('radiusAxisId' in itemSeries ? itemSeries.radiusAxisId : undefined) ?? radiusAxisIds[0] : undefined;
|
|
46
46
|
const rotationAxisId = isPolarSeries(itemSeries) ? ('rotationAxisId' in itemSeries ? itemSeries.rotationAxisId : undefined) ?? rotationAxisIds[0] : undefined;
|
|
47
|
-
const
|
|
47
|
+
const colorAxisId = ('colorAxisId' in itemSeries ? itemSeries.colorAxisId : undefined) ?? ('zAxisId' in itemSeries ? itemSeries.zAxisId : undefined) ?? zAxisIds[0];
|
|
48
48
|
const mainAxis =
|
|
49
49
|
// eslint-disable-next-line no-nested-ternary
|
|
50
50
|
rotationAxisId !== undefined ? rotationAxis[rotationAxisId] : xAxisId !== undefined ? xAxis[xAxisId] : undefined;
|
|
51
51
|
const secondAxis =
|
|
52
52
|
// eslint-disable-next-line no-nested-ternary
|
|
53
53
|
radiusAxisId !== undefined ? radiusAxis[radiusAxisId] : yAxisId !== undefined ? yAxis[yAxisId] : undefined;
|
|
54
|
-
const getColor = seriesConfig[itemSeries.type].colorProcessor(itemSeries, mainAxis, secondAxis,
|
|
54
|
+
const getColor = seriesConfig[itemSeries.type].colorProcessor(itemSeries, mainAxis, secondAxis, colorAxisId !== undefined ? zAxis[colorAxisId] : undefined);
|
|
55
55
|
const axesConfig = {};
|
|
56
56
|
if (xAxisId !== undefined) {
|
|
57
57
|
axesConfig.x = xAxis[xAxisId];
|
|
@@ -28,7 +28,9 @@ function ChartsXAxis(inProps) {
|
|
|
28
28
|
} = (0, _useAxis.useXAxes)();
|
|
29
29
|
const axis = xAxis[inProps.axisId ?? xAxisIds[0]];
|
|
30
30
|
if (!axis) {
|
|
31
|
-
|
|
31
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
32
|
+
(0, _warning.warnOnce)(`MUI X Charts: No axis found. The axisId "${inProps.axisId}" is probably invalid.`);
|
|
33
|
+
}
|
|
32
34
|
return null;
|
|
33
35
|
}
|
|
34
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsXAxisImpl.ChartsXAxisImpl, (0, _extends2.default)({}, inProps, {
|
|
@@ -22,7 +22,9 @@ function ChartsXAxis(inProps) {
|
|
|
22
22
|
} = useXAxes();
|
|
23
23
|
const axis = xAxis[inProps.axisId ?? xAxisIds[0]];
|
|
24
24
|
if (!axis) {
|
|
25
|
-
|
|
25
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
26
|
+
warnOnce(`MUI X Charts: No axis found. The axisId "${inProps.axisId}" is probably invalid.`);
|
|
27
|
+
}
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
28
30
|
return /*#__PURE__*/_jsx(ChartsXAxisImpl, _extends({}, inProps, {
|