@mui/x-charts 7.11.0 → 7.12.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 +0 -2
- package/BarChart/BarElement.d.ts +22 -21
- package/BarChart/BarElement.js +3 -3
- package/BarChart/BarLabel/BarLabel.d.ts +20 -20
- package/BarChart/BarLabel/BarLabelItem.d.ts +2 -1
- package/BarChart/BarLabel/BarLabelItem.js +2 -2
- package/BarChart/BarPlot.js +8 -8
- package/BarChart/checkScaleErrors.d.ts +4 -4
- package/BarChart/checkScaleErrors.js +11 -11
- package/BarChart/extremums.js +4 -1
- package/BarChart/formatter.js +3 -3
- package/CHANGELOG.md +194 -4
- package/ChartContainer/ChartContainer.d.ts +3 -3
- package/ChartContainer/ChartContainer.js +3 -5
- package/ChartContainer/useChartContainerProps.d.ts +50 -52
- package/ChartContainer/useChartContainerProps.js +2 -2
- package/ChartContainer/useDefaultizeAxis.d.ts +24 -25
- package/ChartContainer/usePluginsMerge.d.ts +1 -1
- package/ChartsAxis/ChartsAxis.js +4 -4
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/ChartsLegend/ChartsLegend.js +6 -6
- package/ChartsLegend/DefaultChartsLegend.d.ts +1 -1
- package/ChartsLegend/LegendPerItem.js +2 -2
- package/ChartsLegend/utils.d.ts +1 -1
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +3 -1
- package/ChartsOverlay/ChartsOverlay.d.ts +3 -2
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +1 -2
- package/ChartsReferenceLine/ChartsYReferenceLine.js +1 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +9 -5
- package/ChartsTooltip/ChartsItemTooltipContent.js +6 -6
- package/ChartsTooltip/ChartsTooltip.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltip.js +10 -10
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +5 -3
- package/ChartsXAxis/ChartsXAxis.js +5 -5
- package/ChartsYAxis/ChartsYAxis.js +6 -6
- package/Gauge/GaugeReferenceArc.js +1 -1
- package/Gauge/GaugeValueArc.js +1 -1
- package/LineChart/AnimatedArea.d.ts +20 -20
- package/LineChart/AnimatedArea.js +1 -1
- package/LineChart/AnimatedLine.d.ts +20 -20
- package/LineChart/AnimatedLine.js +1 -1
- package/LineChart/AreaElement.d.ts +2 -1
- package/LineChart/AreaElement.js +2 -2
- package/LineChart/AreaPlot.js +11 -7
- package/LineChart/LineChart.js +4 -3
- package/LineChart/LineElement.d.ts +2 -1
- package/LineChart/LineElement.js +2 -2
- package/LineChart/LineHighlightPlot.d.ts +2 -1
- package/LineChart/LineHighlightPlot.js +9 -5
- package/LineChart/LinePlot.js +11 -7
- package/LineChart/MarkElement.js +1 -1
- package/LineChart/MarkPlot.js +9 -5
- package/LineChart/extremums.js +4 -1
- package/LineChart/formatter.js +3 -3
- package/PieChart/PieArc.js +2 -1
- package/PieChart/PieArcLabel.js +1 -1
- package/PieChart/PieChart.js +0 -2
- package/PieChart/formatter.js +1 -1
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/ResponsiveChartContainer/useChartContainerDimensions.js +2 -2
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.d.ts +2 -2
- package/ScatterChart/ScatterChart.js +4 -3
- package/ScatterChart/ScatterPlot.js +6 -3
- package/ScatterChart/extremums.js +8 -2
- package/SparkLineChart/SparkLineChart.js +0 -2
- package/context/CartesianProvider/CartesianContext.d.ts +1 -1
- package/context/CartesianProvider/computeValue.d.ts +1 -1
- package/context/CartesianProvider/computeValue.js +1 -1
- package/context/CartesianProvider/defaultizeAxis.d.ts +24 -25
- package/context/CartesianProvider/getAxisExtremum.d.ts +1 -1
- package/context/CartesianProvider/normalizeAxis.js +1 -1
- package/context/DrawingProvider.d.ts +2 -1
- package/context/DrawingProvider.js +7 -1
- package/context/{SeriesContextProvider.d.ts → SeriesProvider/Series.types.d.ts} +4 -8
- package/context/SeriesProvider/Series.types.js +5 -0
- package/context/SeriesProvider/SeriesContext.d.ts +4 -0
- package/context/SeriesProvider/SeriesContext.js +16 -0
- package/context/SeriesProvider/SeriesProvider.d.ts +5 -0
- package/context/SeriesProvider/SeriesProvider.js +37 -0
- package/context/SeriesProvider/index.d.ts +12 -0
- package/context/SeriesProvider/index.js +49 -0
- package/context/SeriesProvider/processSeries.d.ts +17 -0
- package/context/SeriesProvider/processSeries.js +55 -0
- package/context/ZAxisContextProvider.d.ts +1 -1
- package/context/ZAxisContextProvider.js +1 -1
- package/esm/BarChart/BarChart.js +0 -2
- package/esm/BarChart/BarElement.js +2 -2
- package/esm/BarChart/BarLabel/BarLabelItem.js +1 -1
- package/esm/BarChart/BarPlot.js +8 -8
- package/esm/BarChart/checkScaleErrors.js +11 -11
- package/esm/BarChart/extremums.js +4 -1
- package/esm/BarChart/formatter.js +3 -3
- package/esm/ChartContainer/ChartContainer.js +3 -5
- package/esm/ChartContainer/useChartContainerProps.js +2 -2
- package/esm/ChartsAxis/ChartsAxis.js +4 -4
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/esm/ChartsLegend/ChartsLegend.js +2 -2
- package/esm/ChartsLegend/LegendPerItem.js +1 -1
- package/esm/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +3 -1
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +2 -3
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +2 -3
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/esm/ChartsTooltip/ChartsTooltip.js +3 -3
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +5 -3
- package/esm/ChartsXAxis/ChartsXAxis.js +2 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +2 -2
- package/esm/Gauge/GaugeReferenceArc.js +1 -1
- package/esm/Gauge/GaugeValueArc.js +1 -1
- package/esm/LineChart/AnimatedArea.js +1 -1
- package/esm/LineChart/AnimatedLine.js +1 -1
- package/esm/LineChart/AreaElement.js +1 -1
- package/esm/LineChart/AreaPlot.js +11 -7
- package/esm/LineChart/LineChart.js +4 -3
- package/esm/LineChart/LineElement.js +1 -1
- package/esm/LineChart/LineHighlightPlot.js +9 -5
- package/esm/LineChart/LinePlot.js +11 -7
- package/esm/LineChart/MarkElement.js +1 -1
- package/esm/LineChart/MarkPlot.js +9 -5
- package/esm/LineChart/extremums.js +4 -1
- package/esm/LineChart/formatter.js +3 -3
- package/esm/PieChart/PieArc.js +2 -1
- package/esm/PieChart/PieArcLabel.js +1 -1
- package/esm/PieChart/PieChart.js +0 -2
- package/esm/PieChart/formatter.js +1 -1
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/esm/ResponsiveChartContainer/useChartContainerDimensions.js +2 -2
- package/esm/ScatterChart/ScatterChart.js +4 -3
- package/esm/ScatterChart/ScatterPlot.js +6 -3
- package/esm/ScatterChart/extremums.js +8 -2
- package/esm/SparkLineChart/SparkLineChart.js +0 -2
- package/esm/context/CartesianProvider/computeValue.js +1 -1
- package/esm/context/CartesianProvider/normalizeAxis.js +1 -1
- package/esm/context/DrawingProvider.js +7 -1
- package/esm/context/SeriesProvider/Series.types.js +1 -0
- package/esm/context/SeriesProvider/SeriesContext.js +8 -0
- package/esm/context/SeriesProvider/SeriesProvider.js +30 -0
- package/esm/context/SeriesProvider/index.js +8 -0
- package/esm/context/{SeriesContextProvider.js → SeriesProvider/processSeries.js} +10 -35
- package/esm/context/ZAxisContextProvider.js +1 -1
- package/esm/hooks/useAxisEvents.js +12 -8
- package/esm/hooks/useReducedMotion.js +2 -2
- package/esm/hooks/useSeries.js +1 -1
- package/esm/internals/SlotComponentPropsFromProps.js +1 -0
- package/esm/internals/colorScale.js +1 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -1
- package/esm/internals/geometry.js +1 -1
- package/esm/internals/getCurve.js +1 -1
- package/esm/internals/getPercentageValue.js +1 -1
- package/esm/internals/getScale.js +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/internals/stackSeries.js +1 -1
- package/esm/internals/useAnimatedPath.js +1 -1
- package/esm/internals/warning.js +19 -11
- package/hooks/useAxisEvents.js +12 -8
- package/hooks/useReducedMotion.js +2 -2
- package/hooks/useSeries.d.ts +1 -1
- package/hooks/useSeries.js +2 -2
- package/hooks/useTicks.d.ts +1 -1
- package/index.js +1 -1
- package/internals/SlotComponentPropsFromProps.d.ts +1 -0
- package/internals/SlotComponentPropsFromProps.js +5 -0
- package/internals/colorScale.d.ts +3 -3
- package/internals/colorScale.js +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -1
- package/internals/defaultizeColor.d.ts +8 -1
- package/internals/geometry.js +1 -1
- package/internals/getCurve.d.ts +1 -1
- package/internals/getCurve.js +1 -1
- package/internals/getPercentageValue.js +1 -1
- package/internals/getScale.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +4 -4
- package/internals/isBandScale.d.ts +1 -1
- package/internals/stackSeries.d.ts +1 -1
- package/internals/stackSeries.js +1 -1
- package/internals/useAnimatedPath.js +1 -1
- package/internals/warning.d.ts +2 -1
- package/internals/warning.js +21 -12
- package/models/axis.d.ts +2 -2
- package/models/seriesType/common.d.ts +10 -0
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +5 -0
- package/models/z-axis.d.ts +1 -1
- package/modern/BarChart/BarChart.js +0 -2
- package/modern/BarChart/BarElement.js +2 -2
- package/modern/BarChart/BarLabel/BarLabelItem.js +1 -1
- package/modern/BarChart/BarPlot.js +8 -8
- package/modern/BarChart/checkScaleErrors.js +11 -11
- package/modern/BarChart/extremums.js +4 -1
- package/modern/BarChart/formatter.js +3 -3
- package/modern/ChartContainer/ChartContainer.js +3 -5
- package/modern/ChartContainer/useChartContainerProps.js +2 -2
- package/modern/ChartsAxis/ChartsAxis.js +4 -4
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -1
- package/modern/ChartsLegend/ChartsLegend.js +2 -2
- package/modern/ChartsLegend/LegendPerItem.js +1 -1
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +3 -1
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +2 -3
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +2 -3
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +8 -4
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +5 -5
- package/modern/ChartsTooltip/ChartsTooltip.js +3 -3
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +5 -3
- package/modern/ChartsXAxis/ChartsXAxis.js +2 -2
- package/modern/ChartsYAxis/ChartsYAxis.js +2 -2
- package/modern/Gauge/GaugeReferenceArc.js +1 -1
- package/modern/Gauge/GaugeValueArc.js +1 -1
- package/modern/LineChart/AnimatedArea.js +1 -1
- package/modern/LineChart/AnimatedLine.js +1 -1
- package/modern/LineChart/AreaElement.js +1 -1
- package/modern/LineChart/AreaPlot.js +11 -7
- package/modern/LineChart/LineChart.js +4 -3
- package/modern/LineChart/LineElement.js +1 -1
- package/modern/LineChart/LineHighlightPlot.js +9 -5
- package/modern/LineChart/LinePlot.js +11 -7
- package/modern/LineChart/MarkElement.js +1 -1
- package/modern/LineChart/MarkPlot.js +9 -5
- package/modern/LineChart/extremums.js +4 -1
- package/modern/LineChart/formatter.js +3 -3
- package/modern/PieChart/PieArc.js +2 -1
- package/modern/PieChart/PieArcLabel.js +1 -1
- package/modern/PieChart/PieChart.js +0 -2
- package/modern/PieChart/formatter.js +1 -1
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +0 -2
- package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +2 -2
- package/modern/ScatterChart/ScatterChart.js +4 -3
- package/modern/ScatterChart/ScatterPlot.js +6 -3
- package/modern/ScatterChart/extremums.js +8 -2
- package/modern/SparkLineChart/SparkLineChart.js +0 -2
- package/modern/context/CartesianProvider/computeValue.js +1 -1
- package/modern/context/CartesianProvider/normalizeAxis.js +1 -1
- package/modern/context/DrawingProvider.js +7 -1
- package/modern/context/SeriesProvider/Series.types.js +1 -0
- package/modern/context/SeriesProvider/SeriesContext.js +8 -0
- package/modern/context/SeriesProvider/SeriesProvider.js +30 -0
- package/modern/context/SeriesProvider/index.js +8 -0
- package/modern/context/{SeriesContextProvider.js → SeriesProvider/processSeries.js} +10 -35
- package/modern/context/ZAxisContextProvider.js +1 -1
- package/modern/hooks/useAxisEvents.js +12 -8
- package/modern/hooks/useReducedMotion.js +2 -2
- package/modern/hooks/useSeries.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/SlotComponentPropsFromProps.js +1 -0
- package/modern/internals/colorScale.js +1 -1
- package/modern/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +1 -1
- package/modern/internals/geometry.js +1 -1
- package/modern/internals/getCurve.js +1 -1
- package/modern/internals/getPercentageValue.js +1 -1
- package/modern/internals/getScale.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/internals/stackSeries.js +1 -1
- package/modern/internals/useAnimatedPath.js +1 -1
- package/modern/internals/warning.js +19 -11
- package/package.json +8 -25
- package/context/SeriesContextProvider.js +0 -81
package/BarChart/BarChart.js
CHANGED
|
@@ -248,7 +248,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
248
248
|
* An array of [[AxisConfig]] objects.
|
|
249
249
|
*/
|
|
250
250
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
251
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
252
251
|
classes: _propTypes.default.object,
|
|
253
252
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
254
253
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -301,7 +300,6 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
301
300
|
* An array of [[AxisConfig]] objects.
|
|
302
301
|
*/
|
|
303
302
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
304
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
305
303
|
classes: _propTypes.default.object,
|
|
306
304
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
307
305
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
package/BarChart/BarElement.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AnimatedProps } from '@react-spring/web';
|
|
3
|
+
import { SlotComponentPropsFromProps } from '../internals/SlotComponentPropsFromProps';
|
|
3
4
|
import { SeriesId } from '../models/seriesType/common';
|
|
4
5
|
export interface BarElementClasses {
|
|
5
6
|
/** Styles applied to the root element. */
|
|
@@ -849,26 +850,26 @@ export declare const BarElementPath: import("@emotion/styled").StyledComponent<P
|
|
|
849
850
|
strokeWidth?: import("csstype").Property.StrokeWidth<string | number> | undefined;
|
|
850
851
|
textAnchor?: import("csstype").Property.TextAnchor | undefined;
|
|
851
852
|
vectorEffect?: import("csstype").Property.VectorEffect | undefined;
|
|
852
|
-
x?: string | number;
|
|
853
|
-
y?: string | number;
|
|
854
|
-
z?: string | number;
|
|
855
|
-
translateX?: string | number;
|
|
856
|
-
translateY?: string | number;
|
|
857
|
-
translateZ?: string | number;
|
|
858
|
-
translate3d?: readonly [string | number, string | number, string | number];
|
|
859
|
-
rotateX?: string | number;
|
|
860
|
-
rotateY?: string | number;
|
|
861
|
-
rotateZ?: string | number;
|
|
862
|
-
rotate3d?: readonly [number, number, number, string | number];
|
|
863
|
-
scaleX?: number;
|
|
864
|
-
scaleY?: number;
|
|
865
|
-
scaleZ?: number;
|
|
866
|
-
scale3d?: readonly [number, number, number];
|
|
867
|
-
skew?: (string | number) | readonly [string | number, string | number];
|
|
868
|
-
skewX?: string | number;
|
|
869
|
-
skewY?: string | number;
|
|
870
|
-
matrix?: readonly [number, number, number, number, number, number];
|
|
871
|
-
matrix3d?: readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
|
|
853
|
+
x?: (string | number) | undefined;
|
|
854
|
+
y?: (string | number) | undefined;
|
|
855
|
+
z?: (string | number) | undefined;
|
|
856
|
+
translateX?: (string | number) | undefined;
|
|
857
|
+
translateY?: (string | number) | undefined;
|
|
858
|
+
translateZ?: (string | number) | undefined;
|
|
859
|
+
translate3d?: readonly [string | number, string | number, string | number] | undefined;
|
|
860
|
+
rotateX?: (string | number) | undefined;
|
|
861
|
+
rotateY?: (string | number) | undefined;
|
|
862
|
+
rotateZ?: (string | number) | undefined;
|
|
863
|
+
rotate3d?: readonly [number, number, number, string | number] | undefined;
|
|
864
|
+
scaleX?: number | undefined;
|
|
865
|
+
scaleY?: number | undefined;
|
|
866
|
+
scaleZ?: number | undefined;
|
|
867
|
+
scale3d?: readonly [number, number, number] | undefined;
|
|
868
|
+
skew?: ((string | number) | readonly [string | number, string | number]) | undefined;
|
|
869
|
+
skewX?: (string | number) | undefined;
|
|
870
|
+
skewY?: (string | number) | undefined;
|
|
871
|
+
matrix?: readonly [number, number, number, number, number, number] | undefined;
|
|
872
|
+
matrix3d?: readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | undefined;
|
|
872
873
|
} | undefined;
|
|
873
874
|
unicode?: number | string | undefined;
|
|
874
875
|
fill?: string | undefined;
|
|
@@ -1365,7 +1366,7 @@ export interface BarElementSlots {
|
|
|
1365
1366
|
bar?: React.ElementType<BarProps>;
|
|
1366
1367
|
}
|
|
1367
1368
|
export interface BarElementSlotProps {
|
|
1368
|
-
bar?:
|
|
1369
|
+
bar?: SlotComponentPropsFromProps<BarProps, {}, BarElementOwnerState>;
|
|
1369
1370
|
}
|
|
1370
1371
|
export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGRectElement>, 'ref' | 'id'> & {
|
|
1371
1372
|
/**
|
package/BarChart/BarElement.js
CHANGED
|
@@ -12,11 +12,11 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
-
var
|
|
15
|
+
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
16
16
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
17
17
|
var _styles = require("@mui/material/styles");
|
|
18
|
-
var _d3Color = require("d3-color");
|
|
19
18
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
19
|
+
var _d3Color = require("@mui/x-charts-vendor/d3-color");
|
|
20
20
|
var _web = require("@react-spring/web");
|
|
21
21
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
22
22
|
var _context = require("../context");
|
|
@@ -80,7 +80,7 @@ function BarElement(props) {
|
|
|
80
80
|
};
|
|
81
81
|
const classes = useUtilityClasses(ownerState);
|
|
82
82
|
const Bar = slots?.bar ?? BarElementPath;
|
|
83
|
-
const barProps = (0,
|
|
83
|
+
const barProps = (0, _useSlotProps.default)({
|
|
84
84
|
elementType: Bar,
|
|
85
85
|
externalSlotProps: slotProps?.bar,
|
|
86
86
|
externalForwardedProps: other,
|
|
@@ -833,26 +833,26 @@ export declare const BarLabelComponent: import("@emotion/styled").StyledComponen
|
|
|
833
833
|
strokeWidth?: import("csstype").Property.StrokeWidth<string | number> | undefined;
|
|
834
834
|
textAnchor?: import("csstype").Property.TextAnchor | undefined;
|
|
835
835
|
vectorEffect?: import("csstype").Property.VectorEffect | undefined;
|
|
836
|
-
x?: string | number;
|
|
837
|
-
y?: string | number;
|
|
838
|
-
z?: string | number;
|
|
839
|
-
translateX?: string | number;
|
|
840
|
-
translateY?: string | number;
|
|
841
|
-
translateZ?: string | number;
|
|
842
|
-
translate3d?: readonly [string | number, string | number, string | number];
|
|
843
|
-
rotateX?: string | number;
|
|
844
|
-
rotateY?: string | number;
|
|
845
|
-
rotateZ?: string | number;
|
|
846
|
-
rotate3d?: readonly [number, number, number, string | number];
|
|
847
|
-
scaleX?: number;
|
|
848
|
-
scaleY?: number;
|
|
849
|
-
scaleZ?: number;
|
|
850
|
-
scale3d?: readonly [number, number, number];
|
|
851
|
-
skew?: (string | number) | readonly [string | number, string | number];
|
|
852
|
-
skewX?: string | number;
|
|
853
|
-
skewY?: string | number;
|
|
854
|
-
matrix?: readonly [number, number, number, number, number, number];
|
|
855
|
-
matrix3d?: readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];
|
|
836
|
+
x?: (string | number) | undefined;
|
|
837
|
+
y?: (string | number) | undefined;
|
|
838
|
+
z?: (string | number) | undefined;
|
|
839
|
+
translateX?: (string | number) | undefined;
|
|
840
|
+
translateY?: (string | number) | undefined;
|
|
841
|
+
translateZ?: (string | number) | undefined;
|
|
842
|
+
translate3d?: readonly [string | number, string | number, string | number] | undefined;
|
|
843
|
+
rotateX?: (string | number) | undefined;
|
|
844
|
+
rotateY?: (string | number) | undefined;
|
|
845
|
+
rotateZ?: (string | number) | undefined;
|
|
846
|
+
rotate3d?: readonly [number, number, number, string | number] | undefined;
|
|
847
|
+
scaleX?: number | undefined;
|
|
848
|
+
scaleY?: number | undefined;
|
|
849
|
+
scaleZ?: number | undefined;
|
|
850
|
+
scale3d?: readonly [number, number, number] | undefined;
|
|
851
|
+
skew?: ((string | number) | readonly [string | number, string | number]) | undefined;
|
|
852
|
+
skewX?: (string | number) | undefined;
|
|
853
|
+
skewY?: (string | number) | undefined;
|
|
854
|
+
matrix?: readonly [number, number, number, number, number, number] | undefined;
|
|
855
|
+
matrix3d?: readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | undefined;
|
|
856
856
|
} | undefined;
|
|
857
857
|
unicode?: number | string | undefined;
|
|
858
858
|
fill?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { SlotComponentPropsFromProps } from '../../internals/SlotComponentPropsFromProps';
|
|
2
3
|
import { BarLabelOwnerState, BarItem, BarLabelContext } from './BarLabel.types';
|
|
3
4
|
import { BarLabelProps } from './BarLabel';
|
|
4
5
|
export interface BarLabelSlots {
|
|
@@ -9,7 +10,7 @@ export interface BarLabelSlots {
|
|
|
9
10
|
barLabel?: React.JSXElementConstructor<BarLabelProps>;
|
|
10
11
|
}
|
|
11
12
|
export interface BarLabelSlotProps {
|
|
12
|
-
barLabel?:
|
|
13
|
+
barLabel?: SlotComponentPropsFromProps<BarLabelProps, {}, BarLabelOwnerState>;
|
|
13
14
|
}
|
|
14
15
|
export type BarLabelItemProps = Omit<BarLabelOwnerState, 'isFaded' | 'isHighlighted'> & Pick<BarLabelProps, 'style'> & {
|
|
15
16
|
/**
|
|
@@ -8,7 +8,7 @@ exports.BarLabelItem = BarLabelItem;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _useSlotProps2 = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _barLabelClasses = require("./barLabelClasses");
|
|
14
14
|
var _getBarLabel = require("./getBarLabel");
|
|
@@ -54,7 +54,7 @@ function BarLabelItem(props) {
|
|
|
54
54
|
};
|
|
55
55
|
const classes = (0, _barLabelClasses.useUtilityClasses)(ownerState);
|
|
56
56
|
const Component = slots?.barLabel ?? _BarLabel.BarLabel;
|
|
57
|
-
const _useSlotProps = (0,
|
|
57
|
+
const _useSlotProps = (0, _useSlotProps2.default)({
|
|
58
58
|
elementType: Component,
|
|
59
59
|
externalSlotProps: slotProps?.barLabel,
|
|
60
60
|
additionalProps: (0, _extends2.default)({}, other, {
|
package/BarChart/BarPlot.js
CHANGED
|
@@ -74,16 +74,16 @@ const useAggregatedData = () => {
|
|
|
74
74
|
ids: groupIds
|
|
75
75
|
}, groupIndex) => {
|
|
76
76
|
return groupIds.flatMap(seriesId => {
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const xAxisConfig = xAxis[
|
|
80
|
-
const yAxisConfig = yAxis[
|
|
77
|
+
const xAxisId = series[seriesId].xAxisId ?? series[seriesId].xAxisKey ?? defaultXAxisId;
|
|
78
|
+
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey ?? defaultYAxisId;
|
|
79
|
+
const xAxisConfig = xAxis[xAxisId];
|
|
80
|
+
const yAxisConfig = yAxis[yAxisId];
|
|
81
81
|
const verticalLayout = series[seriesId].layout === 'vertical';
|
|
82
|
-
(0, _checkScaleErrors.checkScaleErrors)(verticalLayout, seriesId,
|
|
82
|
+
(0, _checkScaleErrors.checkScaleErrors)(verticalLayout, seriesId, xAxisId, xAxis, yAxisId, yAxis);
|
|
83
83
|
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
84
84
|
const xScale = xAxisConfig.scale;
|
|
85
85
|
const yScale = yAxisConfig.scale;
|
|
86
|
-
const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[
|
|
86
|
+
const colorGetter = (0, _getColor.default)(series[seriesId], xAxis[xAxisId], yAxis[yAxisId]);
|
|
87
87
|
const bandWidth = baseScaleConfig.scale.bandwidth();
|
|
88
88
|
const {
|
|
89
89
|
barWidth,
|
|
@@ -106,8 +106,8 @@ const useAggregatedData = () => {
|
|
|
106
106
|
seriesId,
|
|
107
107
|
dataIndex,
|
|
108
108
|
layout: series[seriesId].layout,
|
|
109
|
-
x: verticalLayout ? xScale(xAxis[
|
|
110
|
-
y: verticalLayout ? minValueCoord : yScale(yAxis[
|
|
109
|
+
x: verticalLayout ? xScale(xAxis[xAxisId].data?.[dataIndex]) + barOffset : minValueCoord,
|
|
110
|
+
y: verticalLayout ? minValueCoord : yScale(yAxis[yAxisId].data?.[dataIndex]) + barOffset,
|
|
111
111
|
xOrigin: xScale(0),
|
|
112
112
|
yOrigin: yScale(0),
|
|
113
113
|
height: verticalLayout ? maxValueCoord - minValueCoord : barWidth,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxisDefaultized, AxisId } from '../models/axis';
|
|
2
2
|
import { SeriesId } from '../models/seriesType/common';
|
|
3
|
-
export declare function checkScaleErrors(verticalLayout: boolean, seriesId: SeriesId,
|
|
4
|
-
[
|
|
5
|
-
},
|
|
6
|
-
[
|
|
3
|
+
export declare function checkScaleErrors(verticalLayout: boolean, seriesId: SeriesId, xAxisId: AxisId, xAxis: {
|
|
4
|
+
[axisId: AxisId]: AxisDefaultized;
|
|
5
|
+
}, yAxisId: AxisId, yAxis: {
|
|
6
|
+
[axisId: AxisId]: AxisDefaultized;
|
|
7
7
|
}): void;
|
|
@@ -6,28 +6,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.checkScaleErrors = checkScaleErrors;
|
|
7
7
|
var _constants = require("../constants");
|
|
8
8
|
var _axis = require("../models/axis");
|
|
9
|
-
const getAxisMessage = (axisDirection,
|
|
9
|
+
const getAxisMessage = (axisDirection, axisId) => {
|
|
10
10
|
const axisName = `${axisDirection}-axis`;
|
|
11
|
-
const
|
|
11
|
+
const axisIdName = `${axisDirection}Axis`;
|
|
12
12
|
const axisDefaultKey = axisDirection === 'x' ? _constants.DEFAULT_X_AXIS_KEY : _constants.DEFAULT_Y_AXIS_KEY;
|
|
13
|
-
return
|
|
13
|
+
return axisId === axisDefaultKey ? `The first \`${axisIdName}\`` : `The ${axisName} with id "${axisId}"`;
|
|
14
14
|
};
|
|
15
|
-
function checkScaleErrors(verticalLayout, seriesId,
|
|
16
|
-
const xAxisConfig = xAxis[
|
|
17
|
-
const yAxisConfig = yAxis[
|
|
15
|
+
function checkScaleErrors(verticalLayout, seriesId, xAxisId, xAxis, yAxisId, yAxis) {
|
|
16
|
+
const xAxisConfig = xAxis[xAxisId];
|
|
17
|
+
const yAxisConfig = yAxis[yAxisId];
|
|
18
18
|
const discreteAxisConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
19
19
|
const continuousAxisConfig = verticalLayout ? yAxisConfig : xAxisConfig;
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const discreteAxisId = verticalLayout ? xAxisId : yAxisId;
|
|
21
|
+
const continuousAxisId = verticalLayout ? yAxisId : xAxisId;
|
|
22
22
|
const discreteAxisDirection = verticalLayout ? 'x' : 'y';
|
|
23
23
|
const continuousAxisDirection = verticalLayout ? 'y' : 'x';
|
|
24
24
|
if (!(0, _axis.isBandScaleConfig)(discreteAxisConfig)) {
|
|
25
|
-
throw new Error(`MUI X
|
|
25
|
+
throw new Error(`MUI X: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should be of type "band" to display the bar series of id "${seriesId}".`);
|
|
26
26
|
}
|
|
27
27
|
if (discreteAxisConfig.data === undefined) {
|
|
28
|
-
throw new Error(`MUI X
|
|
28
|
+
throw new Error(`MUI X: ${getAxisMessage(discreteAxisDirection, discreteAxisId)} should have data property.`);
|
|
29
29
|
}
|
|
30
30
|
if ((0, _axis.isBandScaleConfig)(continuousAxisConfig) || (0, _axis.isPointScaleConfig)(continuousAxisConfig)) {
|
|
31
|
-
throw new Error(`MUI X
|
|
31
|
+
throw new Error(`MUI X: ${getAxisMessage(continuousAxisDirection, continuousAxisId)} should be a continuous type to display the bar series of id "${seriesId}".`);
|
|
32
32
|
}
|
|
33
33
|
}
|
package/BarChart/extremums.js
CHANGED
|
@@ -18,7 +18,10 @@ const getValueExtremum = params => {
|
|
|
18
18
|
axis,
|
|
19
19
|
isDefaultAxis
|
|
20
20
|
} = params;
|
|
21
|
-
return Object.keys(series).filter(seriesId =>
|
|
21
|
+
return Object.keys(series).filter(seriesId => {
|
|
22
|
+
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
|
|
23
|
+
return yAxisId === axis.id || isDefaultAxis && yAxisId === undefined;
|
|
24
|
+
}).reduce((acc, seriesId) => {
|
|
22
25
|
const [seriesMin, seriesMax] = series[seriesId].stackedData?.reduce((seriesAcc, values) => [Math.min(...values, ...(seriesAcc[0] === null ? [] : [seriesAcc[0]])), Math.max(...values, ...(seriesAcc[1] === null ? [] : [seriesAcc[1]]))], series[seriesId].stackedData[0]) ?? [null, null];
|
|
23
26
|
return [acc[0] === null ? seriesMin : Math.min(seriesMin, acc[0]), acc[1] === null ? seriesMax : Math.max(seriesMax, acc[1])];
|
|
24
27
|
}, [null, null]);
|
package/BarChart/formatter.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _d3Shape = require("d3-shape");
|
|
9
|
+
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
10
10
|
var _stackSeries = require("../internals/stackSeries");
|
|
11
11
|
var _defaultizeValueFormatter = require("../internals/defaultizeValueFormatter");
|
|
12
12
|
let warnOnce = false;
|
|
@@ -32,7 +32,7 @@ const formatter = (params, dataset) => {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
} else if (dataset === undefined) {
|
|
35
|
-
throw new Error([`MUI X
|
|
35
|
+
throw new Error([`MUI X: bar series with id='${id}' has no data.`, 'Either provide a data property to the series or use the dataset prop.'].join('\n'));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
const completedSeries = {};
|
|
@@ -59,7 +59,7 @@ const formatter = (params, dataset) => {
|
|
|
59
59
|
if (typeof value !== 'number') {
|
|
60
60
|
if (process.env.NODE_ENV !== 'production' && !warnOnce && value !== null) {
|
|
61
61
|
warnOnce = true;
|
|
62
|
-
console.error([`MUI X charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.']);
|
|
62
|
+
console.error([`MUI X charts: your dataset key "${dataKey}" is used for plotting bars, but contains nonnumerical elements.`, 'Bar plots only support numbers and null values.'].join('\n'));
|
|
63
63
|
}
|
|
64
64
|
return 0;
|
|
65
65
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,196 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.12.0
|
|
7
|
+
|
|
8
|
+
_Aug 1, 2024_
|
|
9
|
+
|
|
10
|
+
### 💵 Our commercial offering is evolving
|
|
11
|
+
|
|
12
|
+
The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving two new packages:
|
|
13
|
+
|
|
14
|
+
- `@mui/x-tree-view-pro` (available today!)
|
|
15
|
+
- `@mui/x-charts-pro` (available in the coming weeks)
|
|
16
|
+
|
|
17
|
+
As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
|
|
18
|
+
|
|
19
|
+
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
|
|
20
|
+
|
|
21
|
+
### Highlights
|
|
22
|
+
|
|
23
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
24
|
+
|
|
25
|
+
- 🎁 Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
|
|
26
|
+
|
|
27
|
+
<img width="384" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
28
|
+
|
|
29
|
+
- 📦 Support Common JS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
30
|
+
|
|
31
|
+
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
32
|
+
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
- The solution up until now was to export charts with only ESM. But some frameworks are confused by this configuration.
|
|
37
|
+
|
|
38
|
+

|
|
39
|
+
|
|
40
|
+
- So in order to fix this, we are providing a CJS version of D3.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
- 🌍 Improve Turkish (tr-TR) locale on the Data Grid
|
|
45
|
+
- 🌍 Improve Finnish (fi-FI) locale on the Date and Time Pickers
|
|
46
|
+
- 🐞 Bugfixes
|
|
47
|
+
- 📚 Documentation improvements
|
|
48
|
+
|
|
49
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
50
|
+
|
|
51
|
+
### Data Grid
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid@7.12.0`
|
|
54
|
+
|
|
55
|
+
- [DataGrid] Fix crash when updating columns immediately after scrolling (#13781) @cherniavskii
|
|
56
|
+
- [DataGrid] Fix `role=presentation` a11y issue (#13891) @romgrk
|
|
57
|
+
- [DataGrid] Fix top corner pixels & outline radius (#13943) @romgrk
|
|
58
|
+
- [DataGrid] Refactor: remove useless copy (#14039) @romgrk
|
|
59
|
+
- [l10n] Improve Turkish (tr-TR) locale (#13996) @bagcivan
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-data-grid-pro@7.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-data-grid@7.12.0`.
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-data-grid-premium@7.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.0`.
|
|
68
|
+
|
|
69
|
+
### Date and Time Pickers
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-date-pickers@7.12.0`
|
|
72
|
+
|
|
73
|
+
- [l10n] Improve Finnish (fi-FI) locale (#14054) @frozenzia
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-date-pickers-pro@7.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-date-pickers@7.12.0`.
|
|
78
|
+
|
|
79
|
+
### Charts
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts@7.12.0`
|
|
82
|
+
|
|
83
|
+
- [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
|
|
84
|
+
- [charts] Use vendor to have Common JS bundle working out of the box (#13608) @alexfauquette
|
|
85
|
+
- [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
|
|
86
|
+
|
|
87
|
+
### Tree View
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@7.12.0`
|
|
90
|
+
|
|
91
|
+
- [TreeView] Add new prop `onItemClick` on the Tree View components (#14018) @flaviendelangle
|
|
92
|
+
- [TreeView] Add new utility function `isEventTargetInDescendants` (#13982) @flaviendelangle
|
|
93
|
+
- [TreeView] Support item reordering using drag and drop (#12213) @flaviendelangle
|
|
94
|
+
|
|
95
|
+
### Docs
|
|
96
|
+
|
|
97
|
+
- [docs] Add Pickers `minDate` and `maxDate` `default` description (#14024) @LukasTy
|
|
98
|
+
- [docs] Fix 404 (#13989) @alexfauquette
|
|
99
|
+
- [docs] Fix Vale errors (#14025) @oliviertassinari
|
|
100
|
+
- [docs] Update on `renderCell` & autogenerated rows (#13879) @romgrk
|
|
101
|
+
|
|
102
|
+
### Core
|
|
103
|
+
|
|
104
|
+
- [core] Fix event naming convention @oliviertassinari
|
|
105
|
+
- [core] Replace @mui/base with @mui/utils + @mui/material (#13823) @mnajdova
|
|
106
|
+
- [core] Test `charts` performance with codspeed (#13952) @JCQuintas
|
|
107
|
+
- [infra] Consolidate issue cleanup and support labeling action (#14031) @michelengelen
|
|
108
|
+
- [infra] Revert `vale` action `paths` filtering (#14038) @LukasTy
|
|
109
|
+
- [test] Fix adapters code coverage (#13969) @alexfauquette
|
|
110
|
+
- [test] Fix mocha config to run charts tests (#14041) @alexfauquette
|
|
111
|
+
|
|
112
|
+
## 7.11.1
|
|
113
|
+
|
|
114
|
+
_Jul 25, 2024_
|
|
115
|
+
|
|
116
|
+
We'd like to offer a big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
117
|
+
|
|
118
|
+
- 🔎 Allow `Zoom` to be controllable for charts (#13858) @JCQuintas
|
|
119
|
+
- 🌍 Add Icelandic (is-IS) and Norwegian Nynorsk (nn-NO) locales on the Data Grid
|
|
120
|
+
- 🌍 Improve Norwegian Bokmål (nb-NO) and German (de-DE) locales on the Data Grid
|
|
121
|
+
- 🌍 Add Norwegian Nynorsk (nn-NO) locale on the Date and Time Pickers
|
|
122
|
+
- 🐞 Bugfixes
|
|
123
|
+
- 📚 Documentation improvements
|
|
124
|
+
|
|
125
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
126
|
+
|
|
127
|
+
### Data Grid
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-data-grid@7.11.1`
|
|
130
|
+
|
|
131
|
+
- [DataGrid] Remove dead code in internal `GridPreferencesPanel` (#13934) @k-rajat19
|
|
132
|
+
- [DataGrid] Do not miss to escape formulas in CSV export (#13888) @arminmeh
|
|
133
|
+
- [l10n] Add Icelandic (is-IS) locale (#13283) @magnimarels
|
|
134
|
+
- [l10n] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale (#13588) @AnderzL7
|
|
135
|
+
- [l10n] Improve German (de-DE) locale (#13910) @lhilgert9
|
|
136
|
+
|
|
137
|
+
#### `@mui/x-data-grid-pro@7.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
138
|
+
|
|
139
|
+
Same changes as in `@mui/x-data-grid@7.11.1`.
|
|
140
|
+
|
|
141
|
+
#### `@mui/x-data-grid-premium@7.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
142
|
+
|
|
143
|
+
Same changes as in `@mui/x-data-grid-pro@7.11.1`, plus:
|
|
144
|
+
|
|
145
|
+
- [DataGridPremium] Pass the `api` object to events (#13893) @pcorpet
|
|
146
|
+
- [DataGridPremium] Fix paste to selected cells (#13967) @romgrk
|
|
147
|
+
|
|
148
|
+
### Date and Time Pickers
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers@7.11.1`
|
|
151
|
+
|
|
152
|
+
- [fields] Prevent keyboard editing when disabled (#13900) @arthurbalduini
|
|
153
|
+
- [l10n] Add Norwegian Nynorsk (nn-NO) locale (#13946) @AnderzL7
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-date-pickers-pro@7.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
156
|
+
|
|
157
|
+
Same changes as in `@mui/x-date-pickers@7.11.1`.
|
|
158
|
+
|
|
159
|
+
### Charts
|
|
160
|
+
|
|
161
|
+
#### `@mui/x-charts@7.11.1`
|
|
162
|
+
|
|
163
|
+
- [charts] Add `ownerState` function to `slotProps` typing when available (#13965) @alexfauquette
|
|
164
|
+
- [charts] Allow `Zoom` to be controllable (#13858) @JCQuintas
|
|
165
|
+
- [charts] Deprecate `xAxisKey` /`zAxisKey` in favor of `xAxisId`/`zAxisId` (#13940) @alexfauquette
|
|
166
|
+
- [charts] Hide empty arcs in the PieChart (#13897) @alexfauquette
|
|
167
|
+
- [charts] Limit the trigger of exit charts (#13682) @alexfauquette
|
|
168
|
+
|
|
169
|
+
### Tree View
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-tree-view@7.11.1`
|
|
172
|
+
|
|
173
|
+
- [TreeView] Allow the plugins to enrich the props passed to the item slots (#13953) @flaviendelangle
|
|
174
|
+
|
|
175
|
+
### Docs
|
|
176
|
+
|
|
177
|
+
- [docs] Bump pnpm priority as a package manager (#13894) @oliviertassinari
|
|
178
|
+
- [docs] Explicitly mark charts pro as not released (#13905) @alexfauquette
|
|
179
|
+
- [docs] Fix dot consistency a11y table @oliviertassinari
|
|
180
|
+
- [docs] Fix some typos in charts docs (#13906) @cratiu222
|
|
181
|
+
- [docs] Fix spelling (#13902) @nnsW3
|
|
182
|
+
- [docs] Improve error message when moving between plans (#13874) @oliviertassinari
|
|
183
|
+
- [docs] Update `SparkLineChart` reference not being correctly capitalised (#13960) @duckboy81
|
|
184
|
+
- [docs] Fix scroll demos disorientation (#13909) @oliviertassinari
|
|
185
|
+
|
|
186
|
+
### Core
|
|
187
|
+
|
|
188
|
+
- [core] Add `@mui/material-nextjs` to `MUI Core` renovate group (#13966) @LukasTy
|
|
189
|
+
- [core] Remove warning message in production (#13911) @oliviertassinari
|
|
190
|
+
- [code-infra] Reuse `useReactVersion` script from the monorepo (#13710) @cherniavskii
|
|
191
|
+
- [infra] Adds order id validation action (#13957) @michelengelen
|
|
192
|
+
- [infra] Fix order id validator action (#13971) @michelengelen
|
|
193
|
+
- [infra] Fix regex in order id validation (#13976) @michelengelen
|
|
194
|
+
- [infra] Issue template improvement (#13954) @michelengelen
|
|
195
|
+
|
|
6
196
|
## 7.11.0
|
|
7
197
|
|
|
8
198
|
_Jul 18, 2024_
|
|
@@ -59,8 +249,8 @@ Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
|
|
|
59
249
|
- [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
|
|
60
250
|
- [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
|
|
61
251
|
- [charts] Generate API documentation for pro components (#13822) @alexfauquette
|
|
62
|
-
- [charts] Improve zoomed highlight
|
|
63
|
-
- [charts] Allow zoom on Y axis and add zoom options to configure zooming
|
|
252
|
+
- [charts] Improve zoomed highlight behavior (unreleased) (#13868) @JCQuintas
|
|
253
|
+
- [charts] Allow zoom on Y axis and add zoom options to configure zooming behavior (unreleased) (#13726) @JCQuintas
|
|
64
254
|
- [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
|
|
65
255
|
|
|
66
256
|
### Tree View
|
|
@@ -533,7 +723,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
|
|
|
533
723
|
|
|
534
724
|
#### `@mui/x-charts@7.6.2`
|
|
535
725
|
|
|
536
|
-
- [charts] Add `Initializable` type and
|
|
726
|
+
- [charts] Add `Initializable` type and behavior to allow checking if a complex context has been initialized. (#13365) @JCQuintas
|
|
537
727
|
- [charts] Fix some props not working in `xAxis` and `yAxis` (#13372) @Valyok26
|
|
538
728
|
- [charts] Harmonize charts types (#13366) @alexfauquette
|
|
539
729
|
- [charts] Introduce plugins system (#13367) @alexfauquette
|
|
@@ -541,7 +731,7 @@ Same changes as in `@mui/x-date-pickers@7.6.2`.
|
|
|
541
731
|
|
|
542
732
|
### Docs
|
|
543
733
|
|
|
544
|
-
- [docs] Add badges like in Material
|
|
734
|
+
- [docs] Add badges like in Material UI @oliviertassinari
|
|
545
735
|
- [docs] Update twitter.com to x.com @oliviertassinari
|
|
546
736
|
- [docs] Fix the description of `tickInterval` (#13355) @alexfauquette
|
|
547
737
|
- [docs] Adjust the code example for `quickFilterValues` (#12919) @michelengelen
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DrawingProviderProps } from '../context/DrawingProvider';
|
|
3
|
-
import {
|
|
3
|
+
import { SeriesProviderProps } from '../context/SeriesProvider';
|
|
4
4
|
import { ChartsSurfaceProps } from '../ChartsSurface';
|
|
5
5
|
import { CartesianContextProviderProps } from '../context/CartesianProvider';
|
|
6
6
|
import { HighlightedProviderProps, ZAxisContextProviderProps } from '../context';
|
|
@@ -8,7 +8,7 @@ import { ChartsPluginType } from '../models/plugin';
|
|
|
8
8
|
import { ChartSeriesType } from '../models/seriesType/config';
|
|
9
9
|
import { AxisConfig, ChartsXAxisProps, ChartsYAxisProps, ScaleName } from '../models/axis';
|
|
10
10
|
import { MakeOptional } from '../models/helpers';
|
|
11
|
-
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<
|
|
11
|
+
export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, 'seriesFormatters'> & Omit<DrawingProviderProps, 'svgRef'> & Pick<CartesianContextProviderProps, 'dataset'> & ZAxisContextProviderProps & HighlightedProviderProps, 'children'> & {
|
|
12
12
|
/**
|
|
13
13
|
* The configuration of the x-axes.
|
|
14
14
|
* If not provided, a default axis config is used.
|
|
@@ -28,7 +28,7 @@ export type ChartContainerProps = Omit<ChartsSurfaceProps & Omit<SeriesContextPr
|
|
|
28
28
|
*/
|
|
29
29
|
plugins?: ChartsPluginType<ChartSeriesType>[];
|
|
30
30
|
};
|
|
31
|
-
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<
|
|
31
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<ChartsSurfaceProps & Omit<SeriesProviderProps, "seriesFormatters"> & Omit<DrawingProviderProps, "svgRef"> & Pick<CartesianContextProviderProps, "dataset"> & ZAxisContextProviderProps & HighlightedProviderProps, "children"> & {
|
|
32
32
|
/**
|
|
33
33
|
* The configuration of the x-axes.
|
|
34
34
|
* If not provided, a default axis config is used.
|
|
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _DrawingProvider = require("../context/DrawingProvider");
|
|
12
|
-
var
|
|
12
|
+
var _SeriesProvider = require("../context/SeriesProvider");
|
|
13
13
|
var _InteractionProvider = require("../context/InteractionProvider");
|
|
14
14
|
var _ColorProvider = require("../context/ColorProvider");
|
|
15
15
|
var _ChartsSurface = require("../ChartsSurface");
|
|
@@ -25,7 +25,7 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
25
25
|
children,
|
|
26
26
|
drawingProviderProps,
|
|
27
27
|
colorProviderProps,
|
|
28
|
-
|
|
28
|
+
seriesProviderProps,
|
|
29
29
|
cartesianContextProps,
|
|
30
30
|
zAxisContextProps,
|
|
31
31
|
highlightedProviderProps,
|
|
@@ -33,7 +33,7 @@ const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
33
33
|
} = (0, _useChartContainerProps.useChartContainerProps)(props, ref);
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DrawingProvider.DrawingProvider, (0, _extends2.default)({}, drawingProviderProps, {
|
|
35
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ColorProvider.ColorProvider, (0, _extends2.default)({}, colorProviderProps, {
|
|
36
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SeriesProvider.SeriesProvider, (0, _extends2.default)({}, seriesProviderProps, {
|
|
37
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartesianProvider.CartesianContextProvider, (0, _extends2.default)({}, cartesianContextProps, {
|
|
38
38
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ZAxisContextProvider, (0, _extends2.default)({}, zAxisContextProps, {
|
|
39
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InteractionProvider.InteractionProvider, {
|
|
@@ -130,7 +130,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
130
130
|
* An array of [[AxisConfig]] objects.
|
|
131
131
|
*/
|
|
132
132
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
133
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
134
133
|
classes: _propTypes.default.object,
|
|
135
134
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
136
135
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -183,7 +182,6 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
|
|
|
183
182
|
* An array of [[AxisConfig]] objects.
|
|
184
183
|
*/
|
|
185
184
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
186
|
-
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
187
185
|
classes: _propTypes.default.object,
|
|
188
186
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
189
187
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|