@mui/x-charts 8.6.0 → 8.8.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.d.ts +1 -1
- package/BarChart/BarChart.js +16 -0
- package/BarChart/BarPlot.js +11 -150
- package/BarChart/useBarPlotData.d.ts +8 -0
- package/BarChart/useBarPlotData.js +146 -0
- package/CHANGELOG.md +202 -1
- package/ChartContainer/ChartContainer.d.ts +1 -21
- package/ChartContainer/ChartContainer.js +22 -8
- package/ChartContainer/index.d.ts +8 -1
- package/ChartContainer/useChartContainerProps.js +8 -2
- package/ChartDataProvider/ChartDataProvider.js +6 -0
- package/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.js +6 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +34 -24
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +34 -24
- package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
- package/ChartsReferenceLine/ChartsXReferenceLine.js +48 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.js +48 -1
- package/ChartsReferenceLine/index.d.ts +3 -1
- package/ChartsSurface/ChartsSurface.js +2 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +6 -3
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/utils.js +18 -29
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/LineChart/AreaPlot.js +5 -115
- package/LineChart/LineChart.js +22 -0
- package/LineChart/LineHighlightPlot.js +10 -4
- package/LineChart/LinePlot.js +5 -99
- package/LineChart/MarkPlot.js +17 -3
- package/LineChart/useAreaPlotData.d.ts +12 -0
- package/LineChart/useAreaPlotData.js +126 -0
- package/LineChart/useLinePlotData.d.ts +11 -0
- package/LineChart/useLinePlotData.js +108 -0
- package/PieChart/PieChart.d.ts +1 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
- package/ScatterChart/Scatter.js +22 -48
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterPlot.js +2 -2
- package/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
- package/ScatterChart/useScatterPlotData.d.ts +8 -0
- package/ScatterChart/useScatterPlotData.js +33 -0
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +16 -0
- package/context/ChartApi.d.ts +22 -0
- package/context/ChartApi.js +5 -0
- package/context/ChartProvider/ChartContext.js +1 -0
- package/context/index.d.ts +2 -1
- package/context/useChartApiContext.d.ts +1 -1
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +16 -0
- package/esm/BarChart/BarPlot.js +12 -152
- package/esm/BarChart/useBarPlotData.d.ts +8 -0
- package/esm/BarChart/useBarPlotData.js +139 -0
- package/esm/ChartContainer/ChartContainer.d.ts +1 -21
- package/esm/ChartContainer/ChartContainer.js +22 -8
- package/esm/ChartContainer/index.d.ts +8 -1
- package/esm/ChartContainer/index.js +6 -1
- package/esm/ChartContainer/useChartContainerProps.js +8 -2
- package/esm/ChartDataProvider/ChartDataProvider.js +6 -0
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +1 -1
- package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -2
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +36 -26
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -1
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +36 -26
- package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +3 -0
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +47 -0
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +3 -0
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +47 -0
- package/esm/ChartsReferenceLine/index.d.ts +3 -1
- package/esm/ChartsReferenceLine/index.js +2 -1
- package/esm/ChartsSurface/ChartsSurface.js +2 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +6 -3
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/esm/ChartsTooltip/utils.js +18 -29
- package/esm/Gauge/GaugeContainer.d.ts +1 -1
- package/esm/LineChart/AreaPlot.js +5 -115
- package/esm/LineChart/LineChart.js +22 -0
- package/esm/LineChart/LineHighlightPlot.js +11 -5
- package/esm/LineChart/LinePlot.js +5 -99
- package/esm/LineChart/MarkPlot.js +17 -3
- package/esm/LineChart/useAreaPlotData.d.ts +12 -0
- package/esm/LineChart/useAreaPlotData.js +119 -0
- package/esm/LineChart/useLinePlotData.d.ts +11 -0
- package/esm/LineChart/useLinePlotData.js +101 -0
- package/esm/PieChart/PieChart.d.ts +1 -1
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -1
- package/esm/ScatterChart/Scatter.js +23 -49
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterPlot.js +2 -2
- package/esm/ScatterChart/seriesConfig/seriesProcessor.js +3 -0
- package/esm/ScatterChart/useScatterPlotData.d.ts +8 -0
- package/esm/ScatterChart/useScatterPlotData.js +26 -0
- package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +16 -0
- package/esm/context/ChartApi.d.ts +22 -0
- package/esm/context/ChartApi.js +1 -0
- package/esm/context/ChartProvider/ChartContext.js +2 -0
- package/esm/context/index.d.ts +2 -1
- package/esm/context/useChartApiContext.d.ts +1 -1
- package/esm/hooks/useAxis.d.ts +2 -2
- package/esm/hooks/useInteractionItemProps.d.ts +14 -9
- package/esm/hooks/useInteractionItemProps.js +28 -28
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -2
- package/esm/internals/constants.d.ts +3 -0
- package/esm/internals/constants.js +4 -0
- package/esm/internals/getLabel.d.ts +1 -1
- package/esm/internals/index.d.ts +6 -0
- package/esm/internals/index.js +6 -0
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
- package/esm/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +2 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +27 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +3 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +2 -0
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/index.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +77 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +5 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +14 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +2 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +76 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +8 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +48 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +16 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +47 -30
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
- package/esm/internals/plugins/utils/useLazySelectorEffect.js +70 -0
- package/esm/internals/store/useCharts.d.ts +1 -1
- package/esm/locales/elGR.d.ts +19 -0
- package/esm/locales/elGR.js +15 -0
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/models/axis.d.ts +15 -0
- package/esm/models/axis.js +4 -0
- package/esm/models/index.d.ts +1 -1
- package/esm/models/seriesType/scatter.d.ts +11 -2
- package/esm/themeAugmentation/components.d.ts +3 -0
- package/esm/themeAugmentation/props.d.ts +2 -0
- package/hooks/useAxis.d.ts +2 -2
- package/hooks/useInteractionItemProps.d.ts +14 -9
- package/hooks/useInteractionItemProps.js +29 -28
- package/index.d.ts +2 -1
- package/index.js +37 -11
- package/internals/constants.d.ts +3 -0
- package/internals/constants.js +5 -1
- package/internals/getLabel.d.ts +1 -1
- package/internals/index.d.ts +6 -0
- package/internals/index.js +52 -0
- package/internals/plugins/corePlugins/corePlugins.d.ts +4 -2
- package/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +1 -29
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +0 -6
- package/internals/plugins/corePlugins/useChartExperimentalFeature/index.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/index.js +27 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +34 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.js +10 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +21 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js +5 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/index.js +12 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +84 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +31 -0
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +4 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +7 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.js +21 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +24 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +90 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +82 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +9 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +47 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +55 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +18 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +18 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +6 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +34 -34
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +7 -8
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.js +46 -30
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/internals/plugins/utils/useLazySelectorEffect.d.ts +7 -0
- package/internals/plugins/utils/useLazySelectorEffect.js +77 -0
- package/internals/store/useCharts.d.ts +1 -1
- package/locales/elGR.d.ts +19 -0
- package/locales/elGR.js +21 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/models/axis.d.ts +15 -0
- package/models/axis.js +4 -0
- package/models/index.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +11 -2
- package/package.json +4 -3
- package/themeAugmentation/components.d.ts +3 -0
- package/themeAugmentation/props.d.ts +2 -0
|
@@ -17,6 +17,7 @@ const defaultZoomOptions = exports.defaultZoomOptions = {
|
|
|
17
17
|
filterMode: 'keep',
|
|
18
18
|
slider: {
|
|
19
19
|
enabled: false,
|
|
20
|
+
preview: false,
|
|
20
21
|
size: _constants.DEFAULT_ZOOM_SLIDER_SIZE,
|
|
21
22
|
showTooltip: _constants.DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP
|
|
22
23
|
}
|
|
@@ -35,7 +36,9 @@ const defaultizeZoom = (zoom, axisId, axisDirection) => {
|
|
|
35
36
|
axisId,
|
|
36
37
|
axisDirection
|
|
37
38
|
}, defaultZoomOptions, zoom, {
|
|
38
|
-
slider: (0, _extends2.default)({}, defaultZoomOptions.slider,
|
|
39
|
+
slider: (0, _extends2.default)({}, defaultZoomOptions.slider, {
|
|
40
|
+
size: zoom.slider?.preview ?? defaultZoomOptions.slider.preview ? _constants.DEFAULT_ZOOM_SLIDER_PREVIEW_SIZE : _constants.DEFAULT_ZOOM_SLIDER_SIZE
|
|
41
|
+
}, zoom.slider)
|
|
39
42
|
});
|
|
40
43
|
};
|
|
41
44
|
exports.defaultizeZoom = defaultizeZoom;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AxisConfig } from "../../../../models/axis.js";
|
|
2
|
+
import { CartesianChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
+
import { ProcessedSeries } from "../../corePlugins/useChartSeries/index.js";
|
|
4
|
+
export declare const getAxisDomainLimit: <T extends CartesianChartSeriesType>(axis: AxisConfig, axisDirection: "x" | "y", axisIndex: number, formattedSeries: ProcessedSeries<T | "line">) => "nice" | "strict" | ((min: number, max: number) => {
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getAxisDomainLimit = void 0;
|
|
7
|
+
const getAxisDomainLimit = (axis, axisDirection, axisIndex, formattedSeries) => {
|
|
8
|
+
if (axis.domainLimit !== undefined) {
|
|
9
|
+
return axis.domainLimit;
|
|
10
|
+
}
|
|
11
|
+
if (axisDirection === 'x') {
|
|
12
|
+
for (const seriesId of formattedSeries.line?.seriesOrder ?? []) {
|
|
13
|
+
const series = formattedSeries.line.series[seriesId];
|
|
14
|
+
if (series.xAxisId === axis.id || series.xAxisId === undefined && axisIndex === 0) {
|
|
15
|
+
return 'strict';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return 'nice';
|
|
20
|
+
};
|
|
21
|
+
exports.getAxisDomainLimit = getAxisDomainLimit;
|
|
@@ -3,6 +3,8 @@ export type * from "./useChartCartesianAxis.types.js";
|
|
|
3
3
|
export * from "./useChartCartesianAxisRendering.selectors.js";
|
|
4
4
|
export * from "./useChartCartesianAxisLayout.selectors.js";
|
|
5
5
|
export * from "./useChartCartesianInteraction.selectors.js";
|
|
6
|
+
export * from "./useChartCartesianHighlight.selectors.js";
|
|
7
|
+
export * from "./useChartCartesianAxisPreview.selectors.js";
|
|
6
8
|
export { defaultizeXAxis, defaultizeYAxis } from "./defaultizeAxis.js";
|
|
7
9
|
export * from "./computeAxisValue.js";
|
|
8
10
|
export * from "./createZoomLookup.js";
|
|
@@ -63,6 +63,30 @@ Object.keys(_useChartCartesianInteraction).forEach(function (key) {
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
+
var _useChartCartesianHighlight = require("./useChartCartesianHighlight.selectors");
|
|
67
|
+
Object.keys(_useChartCartesianHighlight).forEach(function (key) {
|
|
68
|
+
if (key === "default" || key === "__esModule") return;
|
|
69
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
70
|
+
if (key in exports && exports[key] === _useChartCartesianHighlight[key]) return;
|
|
71
|
+
Object.defineProperty(exports, key, {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () {
|
|
74
|
+
return _useChartCartesianHighlight[key];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
var _useChartCartesianAxisPreview = require("./useChartCartesianAxisPreview.selectors");
|
|
79
|
+
Object.keys(_useChartCartesianAxisPreview).forEach(function (key) {
|
|
80
|
+
if (key === "default" || key === "__esModule") return;
|
|
81
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
82
|
+
if (key in exports && exports[key] === _useChartCartesianAxisPreview[key]) return;
|
|
83
|
+
Object.defineProperty(exports, key, {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () {
|
|
86
|
+
return _useChartCartesianAxisPreview[key];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
66
90
|
var _defaultizeAxis = require("./defaultizeAxis");
|
|
67
91
|
var _computeAxisValue = require("./computeAxisValue");
|
|
68
92
|
Object.keys(_computeAxisValue).forEach(function (key) {
|
package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare const selectorChartLeftAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
1
|
+
export declare const selectorChartLeftAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
3
|
} & {
|
|
4
4
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
5
5
|
}, number, []>;
|
|
6
|
-
export declare const selectorChartRightAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
6
|
+
export declare const selectorChartRightAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
7
7
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
8
|
} & {
|
|
9
9
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
10
|
}, number, []>;
|
|
11
|
-
export declare const selectorChartTopAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
11
|
+
export declare const selectorChartTopAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
12
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
13
|
} & {
|
|
14
14
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
15
15
|
}, number, []>;
|
|
16
|
-
export declare const selectorChartBottomAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
16
|
+
export declare const selectorChartBottomAxisSize: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
17
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
18
|
} & {
|
|
19
19
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.useChartCartesianAxis = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
13
|
+
var _useAssertModelConsistency = require("@mui/x-internals/useAssertModelConsistency");
|
|
12
14
|
var _warning = require("@mui/x-internals/warning");
|
|
13
15
|
var _colorPalettes = require("../../../../colorPalettes");
|
|
14
16
|
var _useSelector = require("../../../store/useSelector");
|
|
@@ -19,6 +21,8 @@ var _useChartCartesianAxisRendering = require("./useChartCartesianAxisRendering.
|
|
|
19
21
|
var _getAxisValue = require("./getAxisValue");
|
|
20
22
|
var _getSVGPoint = require("../../../getSVGPoint");
|
|
21
23
|
var _useChartInteraction = require("../useChartInteraction");
|
|
24
|
+
var _useChartCartesianInteraction = require("./useChartCartesianInteraction.selectors");
|
|
25
|
+
var _useLazySelectorEffect = require("../../utils/useLazySelectorEffect");
|
|
22
26
|
const useChartCartesianAxis = ({
|
|
23
27
|
params,
|
|
24
28
|
store,
|
|
@@ -29,7 +33,8 @@ const useChartCartesianAxis = ({
|
|
|
29
33
|
const {
|
|
30
34
|
xAxis,
|
|
31
35
|
yAxis,
|
|
32
|
-
dataset
|
|
36
|
+
dataset,
|
|
37
|
+
onHighlightedAxisChange
|
|
33
38
|
} = params;
|
|
34
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
35
40
|
const ids = [...(xAxis ?? []), ...(yAxis ?? [])].filter(axis => axis.id).map(axis => axis.id);
|
|
@@ -49,6 +54,25 @@ const useChartCartesianAxis = ({
|
|
|
49
54
|
axis: yAxisWithScale,
|
|
50
55
|
axisIds: yAxisIds
|
|
51
56
|
} = (0, _useSelector.useSelector)(store, _useChartCartesianAxisRendering.selectorChartYAxis);
|
|
57
|
+
(0, _useAssertModelConsistency.useAssertModelConsistency)({
|
|
58
|
+
warningPrefix: 'MUI X Charts',
|
|
59
|
+
componentName: 'Chart',
|
|
60
|
+
propName: 'highlightedAxis',
|
|
61
|
+
controlled: params.highlightedAxis,
|
|
62
|
+
defaultValue: undefined
|
|
63
|
+
});
|
|
64
|
+
(0, _useEnhancedEffect.default)(() => {
|
|
65
|
+
if (params.highlightedAxis !== undefined) {
|
|
66
|
+
store.update(prevState => {
|
|
67
|
+
if (prevState.controlledCartesianAxisHighlight === params.highlightedAxis) {
|
|
68
|
+
return prevState;
|
|
69
|
+
}
|
|
70
|
+
return (0, _extends2.default)({}, prevState, {
|
|
71
|
+
controlledCartesianAxisHighlight: params.highlightedAxis
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}, [store, params.highlightedAxis]);
|
|
52
76
|
|
|
53
77
|
// The effect do not track any value defined synchronously during the 1st render by hooks called after `useChartCartesianAxis`
|
|
54
78
|
// As a consequence, the state generated by the 1st run of this useEffect will always be equal to the initialization one
|
|
@@ -67,41 +91,69 @@ const useChartCartesianAxis = ({
|
|
|
67
91
|
}, [seriesConfig, drawingArea, xAxis, yAxis, dataset, store]);
|
|
68
92
|
const usedXAxis = xAxisIds[0];
|
|
69
93
|
const usedYAxis = yAxisIds[0];
|
|
94
|
+
(0, _useLazySelectorEffect.useLazySelectorEffect)(store, _useChartCartesianInteraction.selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {
|
|
95
|
+
if (Object.is(prevAxisInteraction, nextAxisInteraction)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (prevAxisInteraction.length !== nextAxisInteraction.length) {
|
|
99
|
+
onHighlightedAxisChange(nextAxisInteraction);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (prevAxisInteraction?.some(({
|
|
103
|
+
axisId,
|
|
104
|
+
dataIndex
|
|
105
|
+
}, itemIndex) => nextAxisInteraction[itemIndex].axisId !== axisId || nextAxisInteraction[itemIndex].dataIndex !== dataIndex)) {
|
|
106
|
+
onHighlightedAxisChange(nextAxisInteraction);
|
|
107
|
+
}
|
|
108
|
+
}, !onHighlightedAxisChange);
|
|
70
109
|
React.useEffect(() => {
|
|
71
110
|
const element = svgRef.current;
|
|
72
|
-
if (!isInteractionEnabled || element
|
|
111
|
+
if (!isInteractionEnabled || !element || params.disableAxisListener) {
|
|
73
112
|
return () => {};
|
|
74
113
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const target = 'targetTouches' in event ? event.targetTouches[0] : event;
|
|
80
|
-
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, target);
|
|
81
|
-
if (!instance.isPointInside(svgPoint.x, svgPoint.y, event.target)) {
|
|
114
|
+
|
|
115
|
+
// Clean the interaction when the mouse leaves the chart.
|
|
116
|
+
const moveEndHandler = instance.addInteractionListener('moveEnd', event => {
|
|
117
|
+
if (!event.detail.activeGestures.pan) {
|
|
82
118
|
instance.cleanInteraction?.();
|
|
83
|
-
return;
|
|
84
119
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
120
|
+
});
|
|
121
|
+
const panEndHandler = instance.addInteractionListener('panEnd', event => {
|
|
122
|
+
if (!event.detail.activeGestures.move) {
|
|
123
|
+
instance.cleanInteraction?.();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
const pressEndHandler = instance.addInteractionListener('quickPressEnd', event => {
|
|
127
|
+
if (!event.detail.activeGestures.move && !event.detail.activeGestures.pan) {
|
|
128
|
+
instance.cleanInteraction?.();
|
|
91
129
|
}
|
|
92
|
-
|
|
93
|
-
|
|
130
|
+
});
|
|
131
|
+
const gestureHandler = event => {
|
|
132
|
+
const srvEvent = event.detail.srcEvent;
|
|
133
|
+
const target = event.detail.target;
|
|
134
|
+
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, srvEvent);
|
|
135
|
+
|
|
136
|
+
// Release the pointer capture if we are panning, as this would cause the tooltip to
|
|
137
|
+
// be locked to the first "section" it touches.
|
|
138
|
+
if (event.detail.srcEvent.buttons >= 1 && target?.hasPointerCapture(event.detail.srcEvent.pointerId) && !target?.closest('[data-charts-zoom-slider]')) {
|
|
139
|
+
target?.releasePointerCapture(event.detail.srcEvent.pointerId);
|
|
140
|
+
}
|
|
141
|
+
if (!instance.isPointInside(svgPoint.x, svgPoint.y, target)) {
|
|
142
|
+
instance.cleanInteraction?.();
|
|
143
|
+
return;
|
|
94
144
|
}
|
|
145
|
+
instance.setPointerCoordinate?.(svgPoint);
|
|
95
146
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
element.addEventListener('pointerleave', handleOut);
|
|
147
|
+
const moveHandler = instance.addInteractionListener('move', gestureHandler);
|
|
148
|
+
const panHandler = instance.addInteractionListener('pan', gestureHandler);
|
|
149
|
+
const pressHandler = instance.addInteractionListener('quickPress', gestureHandler);
|
|
100
150
|
return () => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
151
|
+
moveHandler.cleanup();
|
|
152
|
+
moveEndHandler.cleanup();
|
|
153
|
+
panHandler.cleanup();
|
|
154
|
+
panEndHandler.cleanup();
|
|
155
|
+
pressHandler.cleanup();
|
|
156
|
+
pressEndHandler.cleanup();
|
|
105
157
|
};
|
|
106
158
|
}, [svgRef, store, xAxisWithScale, usedXAxis, yAxisWithScale, usedYAxis, instance, params.disableAxisListener, isInteractionEnabled]);
|
|
107
159
|
React.useEffect(() => {
|
|
@@ -110,11 +162,10 @@ const useChartCartesianAxis = ({
|
|
|
110
162
|
if (element === null || !onAxisClick) {
|
|
111
163
|
return () => {};
|
|
112
164
|
}
|
|
113
|
-
const
|
|
114
|
-
event.preventDefault();
|
|
165
|
+
const axisClickHandler = instance.addInteractionListener('tap', event => {
|
|
115
166
|
let dataIndex = null;
|
|
116
167
|
let isXAxis = false;
|
|
117
|
-
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, event);
|
|
168
|
+
const svgPoint = (0, _getSVGPoint.getSVGPoint)(element, event.detail.srcEvent);
|
|
118
169
|
const xIndex = (0, _getAxisValue.getAxisIndex)(xAxisWithScale[usedXAxis], svgPoint.x);
|
|
119
170
|
isXAxis = xIndex !== -1;
|
|
120
171
|
dataIndex = isXAxis ? xIndex : (0, _getAxisValue.getAxisIndex)(yAxisWithScale[usedYAxis], svgPoint.y);
|
|
@@ -137,17 +188,16 @@ const useChartCartesianAxis = ({
|
|
|
137
188
|
}
|
|
138
189
|
});
|
|
139
190
|
});
|
|
140
|
-
onAxisClick(event, {
|
|
191
|
+
onAxisClick(event.detail.srcEvent, {
|
|
141
192
|
dataIndex,
|
|
142
193
|
axisValue,
|
|
143
194
|
seriesValues
|
|
144
195
|
});
|
|
145
|
-
};
|
|
146
|
-
element.addEventListener('click', handleMouseClick);
|
|
196
|
+
});
|
|
147
197
|
return () => {
|
|
148
|
-
|
|
198
|
+
axisClickHandler.cleanup();
|
|
149
199
|
};
|
|
150
|
-
}, [params.onAxisClick, processedSeries, svgRef, xAxisWithScale, xAxisIds, yAxisWithScale, yAxisIds, usedXAxis, usedYAxis]);
|
|
200
|
+
}, [params.onAxisClick, processedSeries, svgRef, xAxisWithScale, xAxisIds, yAxisWithScale, yAxisIds, usedXAxis, usedYAxis, instance]);
|
|
151
201
|
return {};
|
|
152
202
|
};
|
|
153
203
|
exports.useChartCartesianAxis = useChartCartesianAxis;
|
|
@@ -156,7 +206,9 @@ useChartCartesianAxis.params = {
|
|
|
156
206
|
yAxis: true,
|
|
157
207
|
dataset: true,
|
|
158
208
|
onAxisClick: true,
|
|
159
|
-
disableAxisListener: true
|
|
209
|
+
disableAxisListener: true,
|
|
210
|
+
onHighlightedAxisChange: true,
|
|
211
|
+
highlightedAxis: true
|
|
160
212
|
};
|
|
161
213
|
useChartCartesianAxis.getDefaultizedParams = ({
|
|
162
214
|
params
|
|
@@ -168,9 +220,11 @@ useChartCartesianAxis.getDefaultizedParams = ({
|
|
|
168
220
|
defaultizedYAxis: (0, _defaultizeAxis.defaultizeYAxis)(params.yAxis, params.dataset)
|
|
169
221
|
});
|
|
170
222
|
};
|
|
171
|
-
useChartCartesianAxis.getInitialState = params => ({
|
|
223
|
+
useChartCartesianAxis.getInitialState = params => (0, _extends2.default)({
|
|
172
224
|
cartesianAxis: {
|
|
173
225
|
x: params.defaultizedXAxis,
|
|
174
226
|
y: params.defaultizedYAxis
|
|
175
227
|
}
|
|
228
|
+
}, params.highlightedAxis === undefined ? {} : {
|
|
229
|
+
controlledCartesianAxisHighlight: params.highlightedAxis
|
|
176
230
|
});
|
package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChartPluginSignature } from "../../models/index.js";
|
|
2
2
|
import type { ChartSeriesType, DatasetType } from "../../../../models/seriesType/config.js";
|
|
3
|
-
import type { ComputedAxis, ScaleName, AxisId, ChartsAxisData, YAxis, XAxis, DefaultedXAxis, DefaultedYAxis } from "../../../../models/axis.js";
|
|
3
|
+
import type { ComputedAxis, ScaleName, AxisId, ChartsAxisData, YAxis, XAxis, DefaultedXAxis, DefaultedYAxis, AxisItemIdentifier } from "../../../../models/axis.js";
|
|
4
4
|
import type { UseChartSeriesSignature } from "../../corePlugins/useChartSeries/index.js";
|
|
5
5
|
import type { ZoomData, ZoomOptions, ZoomSliderShowTooltip } from "./zoom.types.js";
|
|
6
6
|
import type { UseChartInteractionSignature } from "../useChartInteraction/index.js";
|
|
@@ -36,6 +36,19 @@ export interface UseChartCartesianAxisParameters<S extends ScaleName = ScaleName
|
|
|
36
36
|
* @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
|
|
37
37
|
*/
|
|
38
38
|
onAxisClick?: (event: MouseEvent, data: null | ChartsAxisData) => void;
|
|
39
|
+
/**
|
|
40
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
41
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
42
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
43
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
44
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
45
|
+
*/
|
|
46
|
+
onHighlightedAxisChange?: (axisItems: AxisItemIdentifier[]) => void;
|
|
47
|
+
/**
|
|
48
|
+
* The controlled axis highlight.
|
|
49
|
+
* Identified by the axis id, and data index.
|
|
50
|
+
*/
|
|
51
|
+
highlightedAxis?: AxisItemIdentifier[];
|
|
39
52
|
/**
|
|
40
53
|
* If `true`, the charts will not listen to the mouse move event.
|
|
41
54
|
* It might break interactive features, but will improve performance.
|
|
@@ -67,6 +80,10 @@ export interface UseChartCartesianAxisState {
|
|
|
67
80
|
x: DefaultedXAxis[];
|
|
68
81
|
y: DefaultedYAxis[];
|
|
69
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* The controlled axis item highlighted.
|
|
85
|
+
*/
|
|
86
|
+
controlledCartesianAxisHighlight?: AxisItemIdentifier[];
|
|
70
87
|
}
|
|
71
88
|
export type ExtremumFilter = (value: {
|
|
72
89
|
x: number | Date | string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AxisId } from "../../../../models/axis.js";
|
|
2
|
+
export declare const selectorChartPreviewComputedXAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsXAxisProps>, [axisId: AxisId]>;
|
|
3
|
+
export declare const selectorChartPreviewComputedYAxis: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsYAxisProps>, [axisId: AxisId]>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.selectorChartPreviewComputedYAxis = exports.selectorChartPreviewComputedXAxis = void 0;
|
|
7
|
+
var _selectors = require("../../utils/selectors");
|
|
8
|
+
var _useChartCartesianAxisLayout = require("./useChartCartesianAxisLayout.selectors");
|
|
9
|
+
var _useChartSeries = require("../../corePlugins/useChartSeries");
|
|
10
|
+
var _computeAxisValue = require("./computeAxisValue");
|
|
11
|
+
var _useChartCartesianAxisRendering = require("./useChartCartesianAxisRendering.selectors");
|
|
12
|
+
var _useChartDimensions = require("../../corePlugins/useChartDimensions");
|
|
13
|
+
var _constants = require("../../../constants");
|
|
14
|
+
function createPreviewDrawingArea(axisDirection, mainChartDrawingArea) {
|
|
15
|
+
return axisDirection === 'x' ? {
|
|
16
|
+
left: 0,
|
|
17
|
+
top: 0,
|
|
18
|
+
width: mainChartDrawingArea.width,
|
|
19
|
+
height: _constants.ZOOM_SLIDER_PREVIEW_SIZE,
|
|
20
|
+
right: mainChartDrawingArea.width,
|
|
21
|
+
bottom: _constants.ZOOM_SLIDER_PREVIEW_SIZE
|
|
22
|
+
} : {
|
|
23
|
+
left: 0,
|
|
24
|
+
top: 0,
|
|
25
|
+
width: _constants.ZOOM_SLIDER_PREVIEW_SIZE,
|
|
26
|
+
height: mainChartDrawingArea.height,
|
|
27
|
+
right: _constants.ZOOM_SLIDER_PREVIEW_SIZE,
|
|
28
|
+
bottom: mainChartDrawingArea.height
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const selectorChartPreviewComputedXAxis = exports.selectorChartPreviewComputedXAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, _useChartCartesianAxisRendering.selectorChartZoomOptionsLookup, _useChartCartesianAxisRendering.selectorChartZoomAxisFilters, _useChartDimensions.selectorChartDrawingArea, (_, axisId) => axisId], (xAxes, formattedSeries, seriesConfig, zoomOptions, getFilters, chartDrawingArea, axisId) => {
|
|
32
|
+
const hasAxis = xAxes?.some(axis => axis.id === axisId);
|
|
33
|
+
const drawingArea = createPreviewDrawingArea(hasAxis ? 'x' : 'y', chartDrawingArea);
|
|
34
|
+
const options = zoomOptions[axisId];
|
|
35
|
+
const zoomMap = new Map([[axisId, {
|
|
36
|
+
axisId,
|
|
37
|
+
start: options.minStart,
|
|
38
|
+
end: options.maxEnd
|
|
39
|
+
}]]);
|
|
40
|
+
const computedAxes = (0, _computeAxisValue.computeAxisValue)({
|
|
41
|
+
drawingArea,
|
|
42
|
+
formattedSeries,
|
|
43
|
+
axis: xAxes,
|
|
44
|
+
seriesConfig,
|
|
45
|
+
axisDirection: 'x',
|
|
46
|
+
zoomMap,
|
|
47
|
+
zoomOptions,
|
|
48
|
+
getFilters
|
|
49
|
+
});
|
|
50
|
+
if (computedAxes.axis[axisId]) {
|
|
51
|
+
return {
|
|
52
|
+
[axisId]: computedAxes.axis[axisId]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return computedAxes.axis;
|
|
56
|
+
});
|
|
57
|
+
const selectorChartPreviewComputedYAxis = exports.selectorChartPreviewComputedYAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawYAxis, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, _useChartCartesianAxisRendering.selectorChartZoomOptionsLookup, _useChartCartesianAxisRendering.selectorChartZoomAxisFilters, _useChartDimensions.selectorChartDrawingArea, (_, axisId) => axisId], (yAxes, formattedSeries, seriesConfig, zoomOptions, getFilters, chartDrawingArea, axisId) => {
|
|
58
|
+
const hasAxis = yAxes?.some(axis => axis.id === axisId);
|
|
59
|
+
const drawingArea = createPreviewDrawingArea(hasAxis ? 'y' : 'x', chartDrawingArea);
|
|
60
|
+
const options = zoomOptions[axisId];
|
|
61
|
+
const zoomMap = new Map([[axisId, {
|
|
62
|
+
axisId,
|
|
63
|
+
start: options.minStart,
|
|
64
|
+
end: options.maxEnd
|
|
65
|
+
}]]);
|
|
66
|
+
const computedAxes = (0, _computeAxisValue.computeAxisValue)({
|
|
67
|
+
drawingArea,
|
|
68
|
+
formattedSeries,
|
|
69
|
+
axis: yAxes,
|
|
70
|
+
seriesConfig,
|
|
71
|
+
axisDirection: 'y',
|
|
72
|
+
zoomMap,
|
|
73
|
+
zoomOptions,
|
|
74
|
+
getFilters
|
|
75
|
+
});
|
|
76
|
+
if (computedAxes.axis[axisId]) {
|
|
77
|
+
return {
|
|
78
|
+
[axisId]: computedAxes.axis[axisId]
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return computedAxes.axis;
|
|
82
|
+
});
|
|
@@ -4,17 +4,17 @@ export declare const createZoomMap: (zoom: readonly ZoomData[]) => Map<AxisId, Z
|
|
|
4
4
|
/**
|
|
5
5
|
* Following selectors are not exported because they exist in the MIT chart only to ba able to reuse the Zoom state from the pro.
|
|
6
6
|
*/
|
|
7
|
-
export declare const selectorChartZoomIsInteracting: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
7
|
+
export declare const selectorChartZoomIsInteracting: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
8
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
9
9
|
} & {
|
|
10
10
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
11
|
}, boolean | undefined, []>;
|
|
12
|
-
export declare const selectorChartZoomMap: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
12
|
+
export declare const selectorChartZoomMap: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
13
13
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
14
14
|
} & {
|
|
15
15
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
16
|
}, Map<AxisId, ZoomData> | undefined, []>;
|
|
17
|
-
export declare const selectorChartZoomOptionsLookup: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
17
|
+
export declare const selectorChartZoomOptionsLookup: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
18
18
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
19
19
|
} & {
|
|
20
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
@@ -23,15 +23,20 @@ export declare const selectorChartZoomOptionsLookup: import("reselect").Selector
|
|
|
23
23
|
[x: number]: import("./useChartCartesianAxis.types.js").DefaultizedZoomOptions;
|
|
24
24
|
}, []>;
|
|
25
25
|
export declare const selectorChartAxisZoomOptionsLookup: import("reselect").Selector<any, import("./useChartCartesianAxis.types.js").DefaultizedZoomOptions, [axisId: AxisId]>;
|
|
26
|
+
export declare const selectorChartZoomAxisFilters: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
27
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
+
} & {
|
|
29
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
30
|
+
} & Partial<{}>, import("./zoom.types.js").GetZoomAxisFilters | undefined, []>;
|
|
26
31
|
/**
|
|
27
32
|
* The only interesting selectors that merge axis data and zoom if provided.
|
|
28
33
|
*/
|
|
29
|
-
export declare const selectorChartXAxis: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
34
|
+
export declare const selectorChartXAxis: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
30
35
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
31
36
|
} & Partial<{}> & {
|
|
32
37
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
33
38
|
}, import("./computeAxisValue.js").ComputeResult<import("../../../index.js").ChartsXAxisProps>, []>;
|
|
34
|
-
export declare const selectorChartYAxis: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
39
|
+
export declare const selectorChartYAxis: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
35
40
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
36
41
|
} & Partial<{}> & {
|
|
37
42
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.selectorChartZoomOptionsLookup = exports.selectorChartZoomMap = exports.selectorChartZoomIsInteracting = exports.selectorChartYAxis = exports.selectorChartXAxis = exports.selectorChartRawAxis = exports.selectorChartAxisZoomOptionsLookup = exports.selectorChartAxis = exports.createZoomMap = void 0;
|
|
7
|
+
exports.selectorChartZoomOptionsLookup = exports.selectorChartZoomMap = exports.selectorChartZoomIsInteracting = exports.selectorChartZoomAxisFilters = exports.selectorChartYAxis = exports.selectorChartXAxis = exports.selectorChartRawAxis = exports.selectorChartAxisZoomOptionsLookup = exports.selectorChartAxis = exports.createZoomMap = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _useChartDimensions = require("../../corePlugins/useChartDimensions");
|
|
10
10
|
var _useChartSeries = require("../../corePlugins/useChartSeries");
|
|
@@ -13,6 +13,7 @@ var _computeAxisValue = require("./computeAxisValue");
|
|
|
13
13
|
var _createAxisFilterMapper = require("./createAxisFilterMapper");
|
|
14
14
|
var _createZoomLookup = require("./createZoomLookup");
|
|
15
15
|
var _useChartCartesianAxisLayout = require("./useChartCartesianAxisLayout.selectors");
|
|
16
|
+
var _useChartExperimentalFeature = require("../../corePlugins/useChartExperimentalFeature");
|
|
16
17
|
const createZoomMap = zoom => {
|
|
17
18
|
const zoomItemMap = new Map();
|
|
18
19
|
zoom.forEach(zoomItem => {
|
|
@@ -45,7 +46,7 @@ const selectorChartYFilter = (0, _selectors.createSelector)([selectorChartZoomMa
|
|
|
45
46
|
formattedSeries,
|
|
46
47
|
direction: 'y'
|
|
47
48
|
}));
|
|
48
|
-
const selectorChartZoomAxisFilters = (0, _selectors.createSelector)([selectorChartXFilter, selectorChartYFilter, _useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartRawYAxis], (xMapper, yMapper, xAxis, yAxis) => {
|
|
49
|
+
const selectorChartZoomAxisFilters = exports.selectorChartZoomAxisFilters = (0, _selectors.createSelector)([selectorChartXFilter, selectorChartYFilter, _useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartRawYAxis], (xMapper, yMapper, xAxis, yAxis) => {
|
|
49
50
|
if (xMapper === undefined || yMapper === undefined) {
|
|
50
51
|
// Early return if there is no zoom.
|
|
51
52
|
return undefined;
|
|
@@ -74,7 +75,7 @@ const selectorChartZoomAxisFilters = (0, _selectors.createSelector)([selectorCha
|
|
|
74
75
|
* The only interesting selectors that merge axis data and zoom if provided.
|
|
75
76
|
*/
|
|
76
77
|
|
|
77
|
-
const selectorChartXAxis = exports.selectorChartXAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartDimensions.selectorChartDrawingArea, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters) => (0, _computeAxisValue.computeAxisValue)({
|
|
78
|
+
const selectorChartXAxis = exports.selectorChartXAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartDimensions.selectorChartDrawingArea, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, _useChartExperimentalFeature.selectorPreferStrictDomainInLineCharts], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts) => (0, _computeAxisValue.computeAxisValue)({
|
|
78
79
|
drawingArea,
|
|
79
80
|
formattedSeries,
|
|
80
81
|
axis,
|
|
@@ -82,9 +83,10 @@ const selectorChartXAxis = exports.selectorChartXAxis = (0, _selectors.createSel
|
|
|
82
83
|
axisDirection: 'x',
|
|
83
84
|
zoomMap,
|
|
84
85
|
zoomOptions,
|
|
85
|
-
getFilters
|
|
86
|
+
getFilters,
|
|
87
|
+
preferStrictDomainInLineCharts
|
|
86
88
|
}));
|
|
87
|
-
const selectorChartYAxis = exports.selectorChartYAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawYAxis, _useChartDimensions.selectorChartDrawingArea, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters) => (0, _computeAxisValue.computeAxisValue)({
|
|
89
|
+
const selectorChartYAxis = exports.selectorChartYAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawYAxis, _useChartDimensions.selectorChartDrawingArea, _useChartSeries.selectorChartSeriesProcessed, _useChartSeries.selectorChartSeriesConfig, selectorChartZoomMap, selectorChartZoomOptionsLookup, selectorChartZoomAxisFilters, _useChartExperimentalFeature.selectorPreferStrictDomainInLineCharts], (axis, drawingArea, formattedSeries, seriesConfig, zoomMap, zoomOptions, getFilters, preferStrictDomainInLineCharts) => (0, _computeAxisValue.computeAxisValue)({
|
|
88
90
|
drawingArea,
|
|
89
91
|
formattedSeries,
|
|
90
92
|
axis,
|
|
@@ -92,7 +94,8 @@ const selectorChartYAxis = exports.selectorChartYAxis = (0, _selectors.createSel
|
|
|
92
94
|
axisDirection: 'y',
|
|
93
95
|
zoomMap,
|
|
94
96
|
zoomOptions,
|
|
95
|
-
getFilters
|
|
97
|
+
getFilters,
|
|
98
|
+
preferStrictDomainInLineCharts
|
|
96
99
|
}));
|
|
97
100
|
const selectorChartAxis = exports.selectorChartAxis = (0, _selectors.createSelector)([selectorChartXAxis, selectorChartYAxis, (_, axisId) => axisId], (xAxes, yAxes, axisId) => xAxes?.axis[axisId] ?? yAxes?.axis[axisId]);
|
|
98
101
|
const selectorChartRawAxis = exports.selectorChartRawAxis = (0, _selectors.createSelector)([_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartRawYAxis, (state, axisId) => axisId], (xAxes, yAxes, axisId) => {
|