@mui/x-charts 8.14.0 → 8.15.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 +8 -0
- package/BarChart/BarChart.plugins.d.ts +2 -1
- package/BarChart/BarChart.plugins.js +2 -1
- package/BarChart/useBarChartProps.js +4 -2
- package/BarChart/useBarPlotData.js +20 -33
- package/CHANGELOG.md +202 -0
- package/ChartContainer/ChartContainer.js +8 -0
- package/ChartContainer/useChartContainerProps.js +4 -2
- package/ChartsBrushOverlay/ChartsBrushOverlay.classes.d.ts +12 -0
- package/ChartsBrushOverlay/ChartsBrushOverlay.classes.js +9 -0
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +6 -0
- package/ChartsBrushOverlay/ChartsBrushOverlay.js +102 -0
- package/ChartsBrushOverlay/index.d.ts +4 -0
- package/ChartsBrushOverlay/index.js +19 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.js +13 -8
- package/ChartsReferenceLine/ChartsYReferenceLine.js +13 -8
- package/ChartsReferenceLine/common.d.ts +3 -1
- package/ChartsReferenceLine/common.js +3 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +20 -2
- package/ChartsXAxis/getVisibleLabels.js +45 -25
- package/Gauge/Gauge.js +2 -9
- package/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/Gauge/GaugeReferenceArc.js +12 -3
- package/Gauge/GaugeValueArc.d.ts +4 -1
- package/Gauge/GaugeValueArc.js +16 -8
- package/Gauge/GaugeValueText.js +3 -1
- package/LineChart/LineChart.js +8 -0
- package/LineChart/LineChart.plugins.d.ts +2 -1
- package/LineChart/LineChart.plugins.js +2 -1
- package/LineChart/useLineChartProps.js +4 -2
- package/ScatterChart/ScatterChart.js +8 -0
- package/ScatterChart/ScatterChart.plugins.d.ts +2 -1
- package/ScatterChart/ScatterChart.plugins.js +2 -1
- package/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/ScatterChart/useScatterChartProps.js +5 -3
- package/SparkLineChart/SparkLineChart.js +8 -0
- package/esm/BarChart/BarChart.js +8 -0
- package/esm/BarChart/BarChart.plugins.d.ts +2 -1
- package/esm/BarChart/BarChart.plugins.js +2 -1
- package/esm/BarChart/useBarChartProps.js +4 -2
- package/esm/BarChart/useBarPlotData.js +20 -33
- package/esm/ChartContainer/ChartContainer.js +8 -0
- package/esm/ChartContainer/useChartContainerProps.js +4 -2
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.classes.d.ts +12 -0
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.classes.js +2 -0
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +6 -0
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.js +95 -0
- package/esm/ChartsBrushOverlay/index.d.ts +4 -0
- package/esm/ChartsBrushOverlay/index.js +2 -0
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +14 -9
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +14 -9
- package/esm/ChartsReferenceLine/common.d.ts +3 -1
- package/esm/ChartsReferenceLine/common.js +2 -0
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +20 -2
- package/esm/ChartsXAxis/getVisibleLabels.js +45 -25
- package/esm/Gauge/Gauge.js +2 -9
- package/esm/Gauge/GaugeReferenceArc.d.ts +4 -1
- package/esm/Gauge/GaugeReferenceArc.js +11 -2
- package/esm/Gauge/GaugeValueArc.d.ts +4 -1
- package/esm/Gauge/GaugeValueArc.js +16 -8
- package/esm/Gauge/GaugeValueText.js +3 -1
- package/esm/LineChart/LineChart.js +8 -0
- package/esm/LineChart/LineChart.plugins.d.ts +2 -1
- package/esm/LineChart/LineChart.plugins.js +2 -1
- package/esm/LineChart/useLineChartProps.js +4 -2
- package/esm/ScatterChart/ScatterChart.js +8 -0
- package/esm/ScatterChart/ScatterChart.plugins.d.ts +2 -1
- package/esm/ScatterChart/ScatterChart.plugins.js +2 -1
- package/esm/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/ScatterChart/useScatterChartProps.js +5 -3
- package/esm/SparkLineChart/SparkLineChart.js +8 -0
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/index.js +2 -1
- package/esm/hooks/useBrush.d.ts +18 -0
- package/esm/hooks/useBrush.js +16 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/internals/Flatbush.d.ts +63 -0
- package/esm/internals/Flatbush.js +468 -0
- package/esm/internals/domUtils.d.ts +9 -4
- package/esm/internals/domUtils.js +115 -52
- package/esm/internals/index.d.ts +1 -0
- package/esm/internals/index.js +1 -0
- package/esm/internals/plugins/allPlugins.d.ts +4 -3
- package/esm/internals/plugins/allPlugins.js +2 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +16 -10
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/index.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/index.js +3 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +109 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +82 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +75 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.d.ts +72 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +8 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +19 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +41 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +13 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +33 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +40 -81
- package/esm/internals/plugins/utils/selectors.d.ts +1 -1
- package/esm/locales/elGR.js +97 -99
- package/esm/models/seriesType/scatter.d.ts +2 -0
- package/esm/tests/constants.js +1 -0
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/overrides.d.ts +2 -0
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +12 -0
- package/hooks/useBrush.d.ts +18 -0
- package/hooks/useBrush.js +21 -0
- package/index.d.ts +2 -1
- package/index.js +13 -1
- package/internals/Flatbush.d.ts +63 -0
- package/internals/Flatbush.js +477 -0
- package/internals/domUtils.d.ts +9 -4
- package/internals/domUtils.js +119 -54
- package/internals/index.d.ts +1 -0
- package/internals/index.js +12 -0
- package/internals/plugins/allPlugins.d.ts +4 -3
- package/internals/plugins/allPlugins.js +2 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +16 -10
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartBrush/index.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartBrush/index.js +38 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +117 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +82 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +82 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.d.ts +72 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.types.js +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +8 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +19 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +43 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +13 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +39 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +39 -80
- package/internals/plugins/utils/selectors.d.ts +1 -1
- package/locales/elGR.js +97 -99
- package/models/seriesType/scatter.d.ts +2 -0
- package/package.json +5 -4
- package/tests/constants.js +7 -0
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/overrides.d.ts +2 -0
|
@@ -11,13 +11,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
13
13
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
14
|
-
var _d3Delaunay = require("@mui/x-charts-vendor/d3-delaunay");
|
|
15
|
-
var _useScale = require("../../../../hooks/useScale");
|
|
16
14
|
var _getSVGPoint = require("../../../getSVGPoint");
|
|
17
15
|
var _useSelector = require("../../../store/useSelector");
|
|
18
16
|
var _useChartCartesianAxis = require("../useChartCartesianAxis");
|
|
19
17
|
var _useChartSeries = require("../../corePlugins/useChartSeries/useChartSeries.selectors");
|
|
20
18
|
var _useChartDimensions = require("../../corePlugins/useChartDimensions");
|
|
19
|
+
var _findClosestPoints = require("./findClosestPoints");
|
|
21
20
|
const useChartClosestPoint = ({
|
|
22
21
|
svgRef,
|
|
23
22
|
params,
|
|
@@ -43,9 +42,7 @@ const useChartClosestPoint = ({
|
|
|
43
42
|
series,
|
|
44
43
|
seriesOrder
|
|
45
44
|
} = (0, _useSelector.useSelector)(store, _useChartSeries.selectorChartSeriesProcessed)?.scatter ?? {};
|
|
46
|
-
const
|
|
47
|
-
const delauneyRef = React.useRef(undefined);
|
|
48
|
-
const lastFind = React.useRef(undefined);
|
|
45
|
+
const flatbushMap = (0, _useSelector.useSelector)(store, zoomIsInteracting ? _useChartCartesianAxis.selectorChartSeriesEmptyFlatbushMap : _useChartCartesianAxis.selectorChartSeriesFlatbushMap);
|
|
49
46
|
const defaultXAxisId = xAxisIds[0];
|
|
50
47
|
const defaultYAxisId = yAxisIds[0];
|
|
51
48
|
(0, _useEnhancedEffect.default)(() => {
|
|
@@ -55,52 +52,6 @@ const useChartClosestPoint = ({
|
|
|
55
52
|
}
|
|
56
53
|
}));
|
|
57
54
|
}, [store, disableVoronoi]);
|
|
58
|
-
(0, _useEnhancedEffect.default)(() => {
|
|
59
|
-
// This effect generate and store the Delaunay object that's used to map coordinate to closest point.
|
|
60
|
-
|
|
61
|
-
if (zoomIsInteracting || seriesOrder === undefined || series === undefined || disableVoronoi) {
|
|
62
|
-
// If there is no scatter chart series
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
voronoiRef.current = {};
|
|
66
|
-
let points = [];
|
|
67
|
-
seriesOrder.forEach(seriesId => {
|
|
68
|
-
const {
|
|
69
|
-
data,
|
|
70
|
-
xAxisId,
|
|
71
|
-
yAxisId
|
|
72
|
-
} = series[seriesId];
|
|
73
|
-
const xScale = xAxis[xAxisId ?? defaultXAxisId].scale;
|
|
74
|
-
const yScale = yAxis[yAxisId ?? defaultYAxisId].scale;
|
|
75
|
-
const getXPosition = (0, _useScale.getValueToPositionMapper)(xScale);
|
|
76
|
-
const getYPosition = (0, _useScale.getValueToPositionMapper)(yScale);
|
|
77
|
-
const seriesPoints = [];
|
|
78
|
-
const seriesIndexes = [];
|
|
79
|
-
for (let dataIndex = 0; dataIndex < data.length; dataIndex += 1) {
|
|
80
|
-
const {
|
|
81
|
-
x,
|
|
82
|
-
y
|
|
83
|
-
} = data[dataIndex];
|
|
84
|
-
const pointX = getXPosition(x);
|
|
85
|
-
const pointY = getYPosition(y);
|
|
86
|
-
if (instance.isPointInside(pointX, pointY)) {
|
|
87
|
-
seriesPoints.push(pointX);
|
|
88
|
-
seriesPoints.push(pointY);
|
|
89
|
-
seriesIndexes.push(dataIndex);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
voronoiRef.current[seriesId] = {
|
|
93
|
-
seriesId,
|
|
94
|
-
seriesIndexes,
|
|
95
|
-
startIndex: points.length,
|
|
96
|
-
endIndex: points.length + seriesPoints.length,
|
|
97
|
-
markerSize: series[seriesId].markerSize
|
|
98
|
-
};
|
|
99
|
-
points = points.concat(seriesPoints);
|
|
100
|
-
});
|
|
101
|
-
delauneyRef.current = new _d3Delaunay.Delaunay(points);
|
|
102
|
-
lastFind.current = undefined;
|
|
103
|
-
}, [zoomIsInteracting, defaultXAxisId, defaultYAxisId, series, seriesOrder, xAxis, yAxis, drawingArea, instance, disableVoronoi]);
|
|
104
55
|
React.useEffect(() => {
|
|
105
56
|
if (svgRef.current === null || disableVoronoi) {
|
|
106
57
|
return undefined;
|
|
@@ -110,40 +61,48 @@ const useChartClosestPoint = ({
|
|
|
110
61
|
// Get mouse coordinate in global SVG space
|
|
111
62
|
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, event);
|
|
112
63
|
if (!instance.isPointInside(svgPoint.x, svgPoint.y)) {
|
|
113
|
-
lastFind.current = undefined;
|
|
114
64
|
return 'outside-chart';
|
|
115
65
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
66
|
+
let closestPoint = undefined;
|
|
67
|
+
for (const seriesId of seriesOrder ?? []) {
|
|
68
|
+
const aSeries = (series ?? {})[seriesId];
|
|
69
|
+
const flatbush = flatbushMap.get(seriesId);
|
|
70
|
+
if (!flatbush) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const xAxisId = aSeries.xAxisId ?? defaultXAxisId;
|
|
74
|
+
const yAxisId = aSeries.yAxisId ?? defaultYAxisId;
|
|
75
|
+
const xAxisZoom = (0, _useChartCartesianAxis.selectorChartAxisZoomData)(store.getSnapshot(), xAxisId);
|
|
76
|
+
const yAxisZoom = (0, _useChartCartesianAxis.selectorChartAxisZoomData)(store.getSnapshot(), yAxisId);
|
|
77
|
+
const maxRadius = voronoiMaxRadius === 'item' ? aSeries.markerSize : voronoiMaxRadius;
|
|
78
|
+
const xZoomStart = (xAxisZoom?.start ?? 0) / 100;
|
|
79
|
+
const xZoomEnd = (xAxisZoom?.end ?? 100) / 100;
|
|
80
|
+
const yZoomStart = (yAxisZoom?.start ?? 0) / 100;
|
|
81
|
+
const yZoomEnd = (yAxisZoom?.end ?? 100) / 100;
|
|
82
|
+
const xScale = xAxis[xAxisId].scale;
|
|
83
|
+
const yScale = yAxis[yAxisId].scale;
|
|
84
|
+
const closestPointIndex = (0, _findClosestPoints.findClosestPoints)(flatbush, drawingArea, aSeries.data, xScale, yScale, xZoomStart, xZoomEnd, yZoomStart, yZoomEnd, svgPoint.x, svgPoint.y, maxRadius)[0];
|
|
85
|
+
if (closestPointIndex === undefined) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const point = aSeries.data[closestPointIndex];
|
|
89
|
+
const scaledX = xScale(point.x);
|
|
90
|
+
const scaledY = yScale(point.y);
|
|
91
|
+
const distSq = (scaledX - svgPoint.x) ** 2 + (scaledY - svgPoint.y) ** 2;
|
|
92
|
+
if (closestPoint === undefined || distSq < closestPoint.distanceSq) {
|
|
93
|
+
closestPoint = {
|
|
94
|
+
dataIndex: closestPointIndex,
|
|
95
|
+
seriesId,
|
|
96
|
+
distanceSq: distSq
|
|
97
|
+
};
|
|
98
|
+
}
|
|
122
99
|
}
|
|
123
|
-
|
|
124
|
-
const closestSeries = Object.values(voronoiRef.current).find(value => {
|
|
125
|
-
return 2 * closestPointIndex >= value.startIndex && 2 * closestPointIndex < value.endIndex;
|
|
126
|
-
});
|
|
127
|
-
if (closestSeries === undefined) {
|
|
100
|
+
if (closestPoint === undefined) {
|
|
128
101
|
return 'no-point-found';
|
|
129
102
|
}
|
|
130
|
-
|
|
131
|
-
// The point index in the series with id=closestSeries.seriesId.
|
|
132
|
-
const seriesPointIndex = (2 * closestPointIndex - voronoiRef.current[closestSeries.seriesId].startIndex) / 2;
|
|
133
|
-
const dataIndex = voronoiRef.current[closestSeries.seriesId].seriesIndexes[seriesPointIndex];
|
|
134
|
-
const maxRadius = voronoiMaxRadius === 'item' ? closestSeries.markerSize : voronoiMaxRadius;
|
|
135
|
-
if (maxRadius !== undefined) {
|
|
136
|
-
const pointX = delauneyRef.current.points[2 * closestPointIndex];
|
|
137
|
-
const pointY = delauneyRef.current.points[2 * closestPointIndex + 1];
|
|
138
|
-
const dist2 = (pointX - svgPoint.x) ** 2 + (pointY - svgPoint.y) ** 2;
|
|
139
|
-
if (dist2 > maxRadius ** 2) {
|
|
140
|
-
// The closest point is too far to be considered.
|
|
141
|
-
return 'outside-voronoi-max-radius';
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
103
|
return {
|
|
145
|
-
seriesId:
|
|
146
|
-
dataIndex
|
|
104
|
+
seriesId: closestPoint.seriesId,
|
|
105
|
+
dataIndex: closestPoint.dataIndex
|
|
147
106
|
};
|
|
148
107
|
}
|
|
149
108
|
|
|
@@ -218,7 +177,7 @@ const useChartClosestPoint = ({
|
|
|
218
177
|
pressHandler.cleanup();
|
|
219
178
|
pressEndHandler.cleanup();
|
|
220
179
|
};
|
|
221
|
-
}, [svgRef, yAxis, xAxis, voronoiMaxRadius, onItemClick, disableVoronoi, drawingArea, instance]);
|
|
180
|
+
}, [svgRef, yAxis, xAxis, voronoiMaxRadius, onItemClick, disableVoronoi, drawingArea, instance, seriesOrder, series, flatbushMap, defaultXAxisId, defaultYAxisId, store]);
|
|
222
181
|
|
|
223
182
|
// Instance implementation
|
|
224
183
|
const enableVoronoiCallback = (0, _useEventCallback.default)(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectorArray, Combiner, Selector, GetStateFromSelectors, GetParamsFromSelectors, CreateSelectorOptions } from 'reselect';
|
|
2
2
|
import { ChartAnyPluginSignature, ChartState, ChartStateCacheKey } from "../models/index.js";
|
|
3
|
-
export type ChartRootSelector<TSignature extends ChartAnyPluginSignature> = Selector<ChartState<[TSignature]>, TSignature['state'][
|
|
3
|
+
export type ChartRootSelector<TSignature extends ChartAnyPluginSignature, T extends keyof TSignature['state'] = keyof TSignature['state']> = Selector<ChartState<[TSignature]>, TSignature['state'][T]>;
|
|
4
4
|
export type ChartOptionalRootSelector<TSignature extends ChartAnyPluginSignature> = Selector<ChartState<[], [TSignature]>, TSignature['state'][keyof TSignature['state']] | undefined>;
|
|
5
5
|
export type ChartsSelector<Signatures extends readonly ChartAnyPluginSignature[] = [], OptionalSignatures extends readonly ChartAnyPluginSignature[] = [], Result = unknown, Args extends readonly any[] = []> = Selector<ChartState<Signatures, OptionalSignatures>, Result, Args>;
|
|
6
6
|
type InterruptRecursion = NonNullable<unknown>;
|
package/locales/elGR.js
CHANGED
|
@@ -16,106 +16,104 @@ const elGRLocaleText = exports.elGRLocaleText = {
|
|
|
16
16
|
toolbarExport: 'Εξαγωγή',
|
|
17
17
|
// Toolbar Export Menu
|
|
18
18
|
toolbarExportPrint: 'Εκτύπωση',
|
|
19
|
-
toolbarExportImage: mimeType => `Εξαγωγή ως ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}
|
|
20
|
-
|
|
19
|
+
toolbarExportImage: mimeType => `Εξαγωγή ως ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`,
|
|
21
20
|
// Charts renderer configuration
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
21
|
+
chartTypeBar: 'Μπάρα',
|
|
22
|
+
chartTypeColumn: 'Στήλη',
|
|
23
|
+
chartTypeLine: 'Γραμμή',
|
|
24
|
+
chartTypeArea: 'Περιοχή',
|
|
25
|
+
chartTypePie: 'Πίτα',
|
|
26
|
+
chartPaletteLabel: 'Παλέτα χρωμάτων',
|
|
27
|
+
chartPaletteNameRainbowSurge: 'Έκρηξη Ουράνιου Τόξου',
|
|
28
|
+
chartPaletteNameBlueberryTwilight: 'Λυκόφως Μύρτιλου',
|
|
29
|
+
chartPaletteNameMangoFusion: 'Ένωση Μάνγκο',
|
|
30
|
+
chartPaletteNameCheerfulFiesta: 'Χαρούμενη Γιορτή',
|
|
31
|
+
chartPaletteNameStrawberrySky: 'Φραουλένιος Ουρανός',
|
|
32
|
+
chartPaletteNameBlue: 'Μπλέ',
|
|
33
|
+
chartPaletteNameGreen: 'Πράσινο',
|
|
34
|
+
chartPaletteNamePurple: 'Μώβ',
|
|
35
|
+
chartPaletteNameRed: 'Κόκκινο',
|
|
36
|
+
chartPaletteNameOrange: 'Πορτοκαλί',
|
|
37
|
+
chartPaletteNameYellow: 'Κίτρινο',
|
|
38
|
+
chartPaletteNameCyan: 'Κυανό',
|
|
39
|
+
chartPaletteNamePink: 'Ρόζ',
|
|
40
|
+
chartConfigurationSectionChart: 'Γράφημα',
|
|
41
|
+
chartConfigurationSectionColumns: 'Στήλες',
|
|
42
|
+
chartConfigurationSectionBars: 'Μπάρες',
|
|
43
|
+
chartConfigurationSectionAxes: 'Άξονες',
|
|
44
|
+
chartConfigurationGrid: 'Πλέγμα',
|
|
45
|
+
chartConfigurationBorderRadius: 'Ακτίνα περιγράμματος',
|
|
46
|
+
chartConfigurationCategoryGapRatio: 'Λόγος κενών κατηγορίας',
|
|
47
|
+
chartConfigurationBarGapRatio: 'Λόγος κενών Σειράς',
|
|
48
|
+
chartConfigurationStacked: 'Στοίβαγμα',
|
|
49
|
+
chartConfigurationShowToolbar: 'Εμφάνιση γραμμής εργαλείων',
|
|
50
|
+
chartConfigurationSkipAnimation: 'Παράξειψη Animation',
|
|
51
|
+
chartConfigurationInnerRadius: 'Εσωτερική ακτίνα',
|
|
52
|
+
chartConfigurationOuterRadius: 'Εξωτερική ακτίνα',
|
|
53
|
+
chartConfigurationColors: 'Χρώματα',
|
|
54
|
+
chartConfigurationHideLegend: 'Απόκρυψη Υπομνήματος',
|
|
55
|
+
chartConfigurationShowMark: 'Εμφάνιση Σημείωσης',
|
|
56
|
+
chartConfigurationHeight: 'Ύψος',
|
|
57
|
+
chartConfigurationWidth: 'Πλάτος',
|
|
58
|
+
chartConfigurationSeriesGap: 'Κενό Σειράς',
|
|
59
|
+
chartConfigurationTickPlacement: 'Τοποθέτηση Σημείων',
|
|
60
|
+
chartConfigurationTickLabelPlacement: 'Τοποθέτηση Ετικετών Σημείων',
|
|
61
|
+
chartConfigurationCategoriesAxisLabel: 'Ετικέτα άξονα κατηγοριών',
|
|
62
|
+
chartConfigurationSeriesAxisLabel: 'Ετικέτα άξονα σειρών',
|
|
63
|
+
chartConfigurationXAxisPosition: 'Θέση άξονα Χ',
|
|
64
|
+
chartConfigurationYAxisPosition: 'Θέση άξονα Υ',
|
|
65
|
+
chartConfigurationSeriesAxisReverse: 'Αντιστροφή άξονα σειρών',
|
|
66
|
+
chartConfigurationTooltipPlacement: 'Τοποθέτηση',
|
|
67
|
+
chartConfigurationTooltipTrigger: 'Τρόπος ενεργοποίησης του tooltip',
|
|
68
|
+
chartConfigurationLegendPosition: 'Θέση',
|
|
69
|
+
chartConfigurationLegendDirection: 'Κατεύθυνση',
|
|
70
|
+
chartConfigurationBarLabels: 'Ετικέτες μπαρών',
|
|
71
|
+
chartConfigurationColumnLabels: 'Ετικέτες στηλών',
|
|
72
|
+
chartConfigurationInterpolation: 'Διαμεσολάβηση',
|
|
73
|
+
chartConfigurationSectionTooltip: 'Tooltip',
|
|
74
|
+
chartConfigurationSectionLegend: 'Υπόμνημα',
|
|
75
|
+
chartConfigurationSectionLines: 'Γραμμές',
|
|
76
|
+
chartConfigurationSectionAreas: 'Περιοχές',
|
|
77
|
+
chartConfigurationSectionArcs: 'Τόξα',
|
|
78
|
+
chartConfigurationPaddingAngle: 'Γωνία περιθωρίου',
|
|
79
|
+
chartConfigurationCornerRadius: 'Ακτίνα γωνίας',
|
|
80
|
+
chartConfigurationArcLabels: 'Ετικέτες τόξων',
|
|
81
|
+
chartConfigurationStartAngle: 'Γωνία εκκίνησης',
|
|
82
|
+
chartConfigurationEndAngle: 'Γωνία λήξης',
|
|
83
|
+
chartConfigurationPieTooltipTrigger: 'Τρόπος ενεργοποίησης του tooltip',
|
|
84
|
+
chartConfigurationPieLegendPosition: 'Θέση',
|
|
85
|
+
chartConfigurationPieLegendDirection: 'Κατεύθυνση',
|
|
88
86
|
// Common option labels
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
87
|
+
chartConfigurationOptionNone: 'Κανένα',
|
|
88
|
+
chartConfigurationOptionValue: 'Τιμή',
|
|
89
|
+
chartConfigurationOptionAuto: 'Αυτόματο',
|
|
90
|
+
chartConfigurationOptionTop: 'Πάνω',
|
|
91
|
+
chartConfigurationOptionTopLeft: 'Πάνω Αριστερά',
|
|
92
|
+
chartConfigurationOptionTopRight: 'Πάνω Δεξιά',
|
|
93
|
+
chartConfigurationOptionBottom: 'Κάτω',
|
|
94
|
+
chartConfigurationOptionBottomLeft: 'Κάτω Αριστερά',
|
|
95
|
+
chartConfigurationOptionBottomRight: 'Κάτω Δεξιά',
|
|
96
|
+
chartConfigurationOptionLeft: 'Αριστερά',
|
|
97
|
+
chartConfigurationOptionRight: 'Δεξιά',
|
|
98
|
+
chartConfigurationOptionAxis: 'Άξονας',
|
|
99
|
+
chartConfigurationOptionItem: 'Στοιχείο',
|
|
100
|
+
chartConfigurationOptionHorizontal: 'Οριζόντιο',
|
|
101
|
+
chartConfigurationOptionVertical: 'Κάθετο',
|
|
102
|
+
chartConfigurationOptionBoth: 'Και τα δύο',
|
|
103
|
+
chartConfigurationOptionStart: 'Αρχή',
|
|
104
|
+
chartConfigurationOptionMiddle: 'Κέντρο',
|
|
105
|
+
chartConfigurationOptionEnd: 'Τέλος',
|
|
106
|
+
chartConfigurationOptionExtremities: 'Ακρότατα',
|
|
107
|
+
chartConfigurationOptionTick: 'Σημείο',
|
|
108
|
+
chartConfigurationOptionMonotoneX: 'Μονοτονικό Χ',
|
|
109
|
+
chartConfigurationOptionMonotoneY: 'Μονοτονικό Υ',
|
|
110
|
+
chartConfigurationOptionCatmullRom: 'Catmull-Rom',
|
|
111
|
+
chartConfigurationOptionLinear: 'Γραμμικό',
|
|
112
|
+
chartConfigurationOptionNatural: 'Φυσικό',
|
|
113
|
+
chartConfigurationOptionStep: 'Βήμα',
|
|
114
|
+
chartConfigurationOptionStepBefore: 'Βήμα Πριν',
|
|
115
|
+
chartConfigurationOptionStepAfter: 'Βήμα Μετά',
|
|
116
|
+
chartConfigurationOptionBumpX: 'Κυρτότητα Χ',
|
|
117
|
+
chartConfigurationOptionBumpY: 'Κυρτότητα Υ'
|
|
120
118
|
};
|
|
121
119
|
const elGR = exports.elGR = (0, _getChartsLocalization.getChartsLocalization)(elGRLocaleText);
|
|
@@ -23,6 +23,8 @@ export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | n
|
|
|
23
23
|
/**
|
|
24
24
|
* If true, the interaction will not use element hover for this series.
|
|
25
25
|
* @default false
|
|
26
|
+
* @deprecated This prop will be removed in a future version because it is ambiguous. You can select what to disable
|
|
27
|
+
* on hover by disabling the highlight or the tooltip separately.
|
|
26
28
|
*/
|
|
27
29
|
disableHover?: boolean;
|
|
28
30
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.15.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"@mui/utils": "^7.3.3",
|
|
32
32
|
"bezier-easing": "^2.1.0",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
|
+
"flatqueue": "^3.0.0",
|
|
34
35
|
"prop-types": "^15.8.1",
|
|
35
36
|
"reselect": "^5.1.1",
|
|
36
37
|
"use-sync-external-store": "^1.6.0",
|
|
37
|
-
"@mui/x-charts-vendor": "8.
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-
|
|
38
|
+
"@mui/x-charts-vendor": "8.15.0",
|
|
39
|
+
"@mui/x-internals": "8.14.0",
|
|
40
|
+
"@mui/x-internal-gestures": "0.3.4"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
43
|
"@emotion/react": "^11.9.0",
|
|
@@ -62,6 +62,9 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
62
62
|
defaultProps?: ComponentsProps['MuiScatterChart'];
|
|
63
63
|
};
|
|
64
64
|
MuiScatter?: {};
|
|
65
|
+
MuiGauge?: {
|
|
66
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiGauge'];
|
|
67
|
+
};
|
|
65
68
|
}
|
|
66
69
|
declare module '@mui/material/styles' {
|
|
67
70
|
interface Components<Theme = unknown> extends ChartsComponents<Theme> {}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GaugeClassKey } from "../Gauge/index.js";
|
|
1
2
|
import { BarLabelClassKey } from "../BarChart/index.js";
|
|
2
3
|
import { BarElementClassKey } from "../BarChart/barElementClasses.js";
|
|
3
4
|
import { ChartsAxisHighlightClassKey } from "../ChartsAxisHighlight/index.js";
|
|
@@ -18,6 +19,7 @@ export interface ChartsComponentNameToClassKey {
|
|
|
18
19
|
MuiAreaElement: AreaElementClassKey;
|
|
19
20
|
MuiLineElement: LineElementClassKey;
|
|
20
21
|
MuiMarkElement: MarkElementClassKey;
|
|
22
|
+
MuiGauge: GaugeClassKey;
|
|
21
23
|
}
|
|
22
24
|
declare module '@mui/material/styles' {
|
|
23
25
|
interface ComponentNameToClassKey extends ChartsComponentNameToClassKey {}
|