@mui/x-charts 9.2.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +10 -10
- package/BarChart/BarChart.mjs +10 -10
- package/BarChart/BarElement.d.mts +3 -2
- package/BarChart/BarElement.d.ts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
- package/BarChart/seriesConfig/bar/extremums.js +7 -2
- package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
- package/BarChart/seriesConfig/bar/getColor.js +7 -53
- package/BarChart/seriesConfig/bar/getColor.mjs +7 -53
- package/BarChart/seriesConfig/bar/seriesProcessor.js +3 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +3 -1
- package/BarChart/seriesConfig/bar/tooltip.js +4 -27
- package/BarChart/seriesConfig/bar/tooltip.mjs +4 -27
- package/CHANGELOG.md +314 -0
- package/ChartsContainer/ChartsContainer.js +30 -9
- package/ChartsContainer/ChartsContainer.mjs +30 -9
- package/ChartsLabel/ChartsLabelMark.js +1 -23
- package/ChartsLabel/ChartsLabelMark.mjs +0 -22
- package/ChartsLabel/labelMarkClasses.d.mts +0 -1
- package/ChartsLabel/labelMarkClasses.d.ts +0 -1
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLabel/labelMarkClasses.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +36 -30
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +36 -30
- package/ChartsLegend/chartsLegend.types.d.mts +3 -2
- package/ChartsLegend/chartsLegend.types.d.ts +3 -2
- package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
- package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
- package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
- package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
- package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
- package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
- package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
- package/ChartsTooltip/useAxesTooltip.js +2 -2
- package/ChartsTooltip/useAxesTooltip.mjs +2 -2
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsTooltip/useItemTooltip.mjs +2 -2
- package/ChartsXAxis/ChartsXAxis.js +3 -1
- package/ChartsXAxis/ChartsXAxis.mjs +3 -1
- package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/ChartsYAxis/ChartsYAxis.mjs +3 -1
- package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
- package/LineChart/AreaElement.d.mts +3 -2
- package/LineChart/AreaElement.d.ts +3 -2
- package/LineChart/LineChart.js +6 -6
- package/LineChart/LineChart.mjs +6 -6
- package/LineChart/LineElement.d.mts +3 -2
- package/LineChart/LineElement.d.ts +3 -2
- package/LineChart/LineHighlightPlot.d.mts +3 -2
- package/LineChart/LineHighlightPlot.d.ts +3 -2
- package/LineChart/LineHighlightPlot.js +65 -45
- package/LineChart/LineHighlightPlot.mjs +65 -45
- package/LineChart/MarkPlot.d.mts +3 -2
- package/LineChart/MarkPlot.d.ts +3 -2
- package/LineChart/seriesConfig/curveEvaluation.js +40 -15
- package/LineChart/seriesConfig/curveEvaluation.mjs +39 -15
- package/LineChart/seriesConfig/extremums.js +5 -1
- package/LineChart/seriesConfig/extremums.mjs +5 -1
- package/LineChart/seriesConfig/getColor.js +7 -54
- package/LineChart/seriesConfig/getColor.mjs +7 -54
- package/LineChart/seriesConfig/seriesProcessor.d.mts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.d.ts +2 -4
- package/LineChart/seriesConfig/seriesProcessor.js +2 -139
- package/LineChart/seriesConfig/seriesProcessor.mjs +2 -138
- package/LineChart/seriesConfig/tooltip.js +4 -25
- package/LineChart/seriesConfig/tooltip.mjs +4 -25
- package/LineChart/useMarkPlotData.js +3 -1
- package/LineChart/useMarkPlotData.mjs +3 -1
- package/PieChart/PieArcLabelPlot.d.mts +3 -2
- package/PieChart/PieArcLabelPlot.d.ts +3 -2
- package/PieChart/PieArcPlot.d.mts +3 -2
- package/PieChart/PieArcPlot.d.ts +3 -2
- package/PieChart/PieChart.js +6 -6
- package/PieChart/PieChart.mjs +6 -6
- package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarChart.mjs +8 -8
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -0
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -0
- package/ScatterChart/BatchScatter.d.mts +2 -8
- package/ScatterChart/BatchScatter.d.ts +2 -8
- package/ScatterChart/BatchScatter.js +17 -12
- package/ScatterChart/BatchScatter.mjs +17 -12
- package/ScatterChart/FocusedScatterMark.js +2 -2
- package/ScatterChart/FocusedScatterMark.mjs +2 -2
- package/ScatterChart/HighlightedScatterMark.js +3 -3
- package/ScatterChart/HighlightedScatterMark.mjs +3 -3
- package/ScatterChart/Scatter.d.mts +5 -0
- package/ScatterChart/Scatter.d.ts +5 -0
- package/ScatterChart/Scatter.js +7 -2
- package/ScatterChart/Scatter.mjs +7 -2
- package/ScatterChart/ScatterChart.d.mts +2 -1
- package/ScatterChart/ScatterChart.d.ts +2 -1
- package/ScatterChart/ScatterChart.js +32 -11
- package/ScatterChart/ScatterChart.mjs +32 -11
- package/ScatterChart/ScatterMarker.types.d.mts +3 -2
- package/ScatterChart/ScatterMarker.types.d.ts +3 -2
- package/ScatterChart/ScatterPlot.d.mts +3 -2
- package/ScatterChart/ScatterPlot.d.ts +3 -2
- package/ScatterChart/ScatterPlot.js +6 -1
- package/ScatterChart/ScatterPlot.mjs +6 -1
- package/ScatterChart/seriesConfig/extremums.js +6 -0
- package/ScatterChart/seriesConfig/extremums.mjs +6 -0
- package/ScatterChart/seriesConfig/getColor.js +1 -1
- package/ScatterChart/seriesConfig/getColor.mjs +1 -1
- package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
- package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
- package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
- package/ScatterChart/seriesConfig/tooltip.js +2 -24
- package/ScatterChart/seriesConfig/tooltip.mjs +2 -24
- package/ScatterChart/useScatterItemPosition.d.mts +4 -0
- package/ScatterChart/useScatterItemPosition.d.ts +4 -0
- package/ScatterChart/useScatterItemPosition.js +9 -0
- package/ScatterChart/useScatterItemPosition.mjs +8 -0
- package/SparkLineChart/SparkLineChart.js +27 -27
- package/SparkLineChart/SparkLineChart.mjs +27 -27
- package/Toolbar/Toolbar.types.d.mts +3 -2
- package/Toolbar/Toolbar.types.d.ts +3 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/animation/animation.d.mts +1 -2
- package/internals/animation/animation.d.ts +1 -2
- package/internals/commonNextFocusItem.d.mts +10 -2
- package/internals/commonNextFocusItem.d.ts +10 -2
- package/internals/commonNextFocusItem.js +12 -4
- package/internals/commonNextFocusItem.mjs +12 -4
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
- package/internals/createCommonKeyboardFocusHandler.js +3 -3
- package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
- package/internals/getLineLikeTooltip.d.mts +9 -0
- package/internals/getLineLikeTooltip.d.ts +9 -0
- package/internals/getLineLikeTooltip.js +38 -0
- package/internals/getLineLikeTooltip.mjs +31 -0
- package/internals/incompleteDatasetKeysError.d.mts +1 -0
- package/internals/incompleteDatasetKeysError.d.ts +1 -0
- package/internals/incompleteDatasetKeysError.js +11 -0
- package/internals/incompleteDatasetKeysError.mjs +4 -0
- package/internals/index.d.mts +5 -0
- package/internals/index.d.ts +5 -0
- package/internals/index.js +48 -0
- package/internals/index.mjs +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +4 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +6 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +6 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
- package/internals/processLineLikeSeries.d.mts +6 -0
- package/internals/processLineLikeSeries.d.ts +6 -0
- package/internals/processLineLikeSeries.js +145 -0
- package/internals/processLineLikeSeries.mjs +138 -0
- package/internals/resolveColorProcessor.d.mts +11 -0
- package/internals/resolveColorProcessor.d.ts +11 -0
- package/internals/resolveColorProcessor.js +62 -0
- package/internals/resolveColorProcessor.mjs +56 -0
- package/internals/sizeScale.d.mts +6 -0
- package/internals/sizeScale.d.ts +6 -0
- package/internals/sizeScale.js +46 -0
- package/internals/sizeScale.mjs +38 -0
- package/models/axis.d.mts +18 -12
- package/models/axis.d.ts +18 -12
- package/models/chartsSlotsComponentsProps.d.mts +25 -0
- package/models/chartsSlotsComponentsProps.d.ts +25 -0
- package/models/chartsSlotsComponentsProps.js +5 -0
- package/models/chartsSlotsComponentsProps.mjs +1 -0
- package/models/index.d.mts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/index.mjs +1 -0
- package/models/seriesType/line.d.mts +5 -2
- package/models/seriesType/line.d.ts +5 -2
- package/models/seriesType/scatter.d.mts +34 -2
- package/models/seriesType/scatter.d.ts +34 -2
- package/models/sizeMapping.d.mts +64 -0
- package/models/sizeMapping.d.ts +64 -0
- package/models/sizeMapping.js +5 -0
- package/models/sizeMapping.mjs +1 -0
- package/models/slots/chartsBaseSlots.d.mts +6 -5
- package/models/slots/chartsBaseSlots.d.ts +6 -5
- package/models/z-axis.d.mts +10 -1
- package/models/z-axis.d.ts +10 -1
- package/package.json +6 -6
|
@@ -4,28 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
const tooltipGetter = params =>
|
|
9
|
-
const {
|
|
10
|
-
series,
|
|
11
|
-
getColor,
|
|
12
|
-
identifier
|
|
13
|
-
} = params;
|
|
14
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const label = (0, _getLabel.getLabel)(series.label, 'tooltip');
|
|
18
|
-
const value = series.data[identifier.dataIndex];
|
|
19
|
-
const formattedValue = series.valueFormatter(value, {
|
|
20
|
-
dataIndex: identifier.dataIndex
|
|
21
|
-
});
|
|
22
|
-
return {
|
|
23
|
-
identifier,
|
|
24
|
-
color: getColor(identifier.dataIndex),
|
|
25
|
-
label,
|
|
26
|
-
value,
|
|
27
|
-
formattedValue,
|
|
28
|
-
markType: series.labelMarkType
|
|
29
|
-
};
|
|
30
|
-
};
|
|
7
|
+
var _getLineLikeTooltip = require("../../internals/getLineLikeTooltip");
|
|
8
|
+
const tooltipGetter = params => (0, _getLineLikeTooltip.getLineLikeTooltip)(params);
|
|
31
9
|
var _default = exports.default = tooltipGetter;
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const tooltipGetter = params =>
|
|
3
|
-
const {
|
|
4
|
-
series,
|
|
5
|
-
getColor,
|
|
6
|
-
identifier
|
|
7
|
-
} = params;
|
|
8
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
const label = getLabel(series.label, 'tooltip');
|
|
12
|
-
const value = series.data[identifier.dataIndex];
|
|
13
|
-
const formattedValue = series.valueFormatter(value, {
|
|
14
|
-
dataIndex: identifier.dataIndex
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
identifier,
|
|
18
|
-
color: getColor(identifier.dataIndex),
|
|
19
|
-
label,
|
|
20
|
-
value,
|
|
21
|
-
formattedValue,
|
|
22
|
-
markType: series.labelMarkType
|
|
23
|
-
};
|
|
24
|
-
};
|
|
1
|
+
import { getLineLikeTooltip } from "../../internals/getLineLikeTooltip.mjs";
|
|
2
|
+
const tooltipGetter = params => getLineLikeTooltip(params);
|
|
25
3
|
export default tooltipGetter;
|
|
@@ -2,6 +2,10 @@ import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier, type Sca
|
|
|
2
2
|
export interface ResolvedScatterItem {
|
|
3
3
|
cx: number;
|
|
4
4
|
cy: number;
|
|
5
|
+
/**
|
|
6
|
+
* The resolved marker size of the scatter point, accounting for any size axis.
|
|
7
|
+
*/
|
|
8
|
+
markerSize: number;
|
|
5
9
|
series: DefaultizedScatterSeriesType;
|
|
6
10
|
scatterPoint: ScatterValueType;
|
|
7
11
|
}
|
|
@@ -2,6 +2,10 @@ import { type DefaultizedScatterSeriesType, type ScatterItemIdentifier, type Sca
|
|
|
2
2
|
export interface ResolvedScatterItem {
|
|
3
3
|
cx: number;
|
|
4
4
|
cy: number;
|
|
5
|
+
/**
|
|
6
|
+
* The resolved marker size of the scatter point, accounting for any size axis.
|
|
7
|
+
*/
|
|
8
|
+
markerSize: number;
|
|
5
9
|
series: DefaultizedScatterSeriesType;
|
|
6
10
|
scatterPoint: ScatterValueType;
|
|
7
11
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.useScatterItemPosition = useScatterItemPosition;
|
|
7
8
|
var _hooks = require("../hooks");
|
|
9
|
+
var _useZAxis = require("../hooks/useZAxis");
|
|
10
|
+
var _getMarkerSize = _interopRequireDefault(require("./seriesConfig/getMarkerSize"));
|
|
8
11
|
/**
|
|
9
12
|
* Resolves a scatter item identifier to its on-screen position and the owning
|
|
10
13
|
* series. Shared by `FocusedScatterMark`, `HighlightedScatterMark`, and other
|
|
@@ -23,6 +26,10 @@ function useScatterItemPosition(item) {
|
|
|
23
26
|
yAxis,
|
|
24
27
|
yAxisIds
|
|
25
28
|
} = (0, _hooks.useYAxes)();
|
|
29
|
+
const {
|
|
30
|
+
zAxis,
|
|
31
|
+
zAxisIds
|
|
32
|
+
} = (0, _useZAxis.useZAxes)();
|
|
26
33
|
if (!item || !scatterSeries) {
|
|
27
34
|
return null;
|
|
28
35
|
}
|
|
@@ -38,9 +45,11 @@ function useScatterItemPosition(item) {
|
|
|
38
45
|
const yAxisId = series.yAxisId ?? yAxisIds[0];
|
|
39
46
|
const cx = (0, _hooks.getValueToPositionMapper)(xAxis[xAxisId].scale)(scatterPoint.x);
|
|
40
47
|
const cy = (0, _hooks.getValueToPositionMapper)(yAxis[yAxisId].scale)(scatterPoint.y);
|
|
48
|
+
const markerSize = (0, _getMarkerSize.default)(series, zAxis[series.sizeAxisId ?? zAxisIds[0]])(item.dataIndex);
|
|
41
49
|
return {
|
|
42
50
|
cx,
|
|
43
51
|
cy,
|
|
52
|
+
markerSize,
|
|
44
53
|
series,
|
|
45
54
|
scatterPoint
|
|
46
55
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { getValueToPositionMapper, useScatterSeriesContext, useXAxes, useYAxes } from "../hooks/index.mjs";
|
|
2
|
+
import { useZAxes } from "../hooks/useZAxis.mjs";
|
|
3
|
+
import getMarkerSize from "./seriesConfig/getMarkerSize.mjs";
|
|
2
4
|
/**
|
|
3
5
|
* Resolves a scatter item identifier to its on-screen position and the owning
|
|
4
6
|
* series. Shared by `FocusedScatterMark`, `HighlightedScatterMark`, and other
|
|
@@ -17,6 +19,10 @@ export function useScatterItemPosition(item) {
|
|
|
17
19
|
yAxis,
|
|
18
20
|
yAxisIds
|
|
19
21
|
} = useYAxes();
|
|
22
|
+
const {
|
|
23
|
+
zAxis,
|
|
24
|
+
zAxisIds
|
|
25
|
+
} = useZAxes();
|
|
20
26
|
if (!item || !scatterSeries) {
|
|
21
27
|
return null;
|
|
22
28
|
}
|
|
@@ -32,9 +38,11 @@ export function useScatterItemPosition(item) {
|
|
|
32
38
|
const yAxisId = series.yAxisId ?? yAxisIds[0];
|
|
33
39
|
const cx = getValueToPositionMapper(xAxis[xAxisId].scale)(scatterPoint.x);
|
|
34
40
|
const cy = getValueToPositionMapper(yAxis[yAxisId].scale)(scatterPoint.y);
|
|
41
|
+
const markerSize = getMarkerSize(series, zAxis[series.sizeAxisId ?? zAxisIds[0]])(item.dataIndex);
|
|
35
42
|
return {
|
|
36
43
|
cx,
|
|
37
44
|
cy,
|
|
45
|
+
markerSize,
|
|
38
46
|
series,
|
|
39
47
|
scatterPoint
|
|
40
48
|
};
|
|
@@ -292,15 +292,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
292
292
|
}), _propTypes.default.shape({
|
|
293
293
|
dataIndex: _propTypes.default.number,
|
|
294
294
|
seriesId: _propTypes.default.string.isRequired,
|
|
295
|
-
type: _propTypes.default.oneOf(['
|
|
295
|
+
type: _propTypes.default.oneOf(['pie']).isRequired
|
|
296
296
|
}), _propTypes.default.shape({
|
|
297
297
|
dataIndex: _propTypes.default.number,
|
|
298
298
|
seriesId: _propTypes.default.string.isRequired,
|
|
299
|
-
type: _propTypes.default.oneOf(['
|
|
299
|
+
type: _propTypes.default.oneOf(['radar']).isRequired
|
|
300
300
|
}), _propTypes.default.shape({
|
|
301
301
|
dataIndex: _propTypes.default.number,
|
|
302
302
|
seriesId: _propTypes.default.string.isRequired,
|
|
303
|
-
type: _propTypes.default.oneOf(['
|
|
303
|
+
type: _propTypes.default.oneOf(['scatter']).isRequired
|
|
304
304
|
}), _propTypes.default.shape({
|
|
305
305
|
dataIndex: _propTypes.default.number,
|
|
306
306
|
seriesId: _propTypes.default.string.isRequired,
|
|
@@ -312,15 +312,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
312
312
|
}), _propTypes.default.shape({
|
|
313
313
|
dataIndex: _propTypes.default.number,
|
|
314
314
|
seriesId: _propTypes.default.string.isRequired,
|
|
315
|
-
type: _propTypes.default.oneOf(['
|
|
315
|
+
type: _propTypes.default.oneOf(['pie'])
|
|
316
316
|
}), _propTypes.default.shape({
|
|
317
317
|
dataIndex: _propTypes.default.number,
|
|
318
318
|
seriesId: _propTypes.default.string.isRequired,
|
|
319
|
-
type: _propTypes.default.oneOf(['
|
|
319
|
+
type: _propTypes.default.oneOf(['radar'])
|
|
320
320
|
}), _propTypes.default.shape({
|
|
321
321
|
dataIndex: _propTypes.default.number,
|
|
322
322
|
seriesId: _propTypes.default.string.isRequired,
|
|
323
|
-
type: _propTypes.default.oneOf(['
|
|
323
|
+
type: _propTypes.default.oneOf(['scatter'])
|
|
324
324
|
})]).isRequired),
|
|
325
325
|
/**
|
|
326
326
|
* The controlled axis highlight.
|
|
@@ -335,20 +335,16 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
335
335
|
* Used when the highlight is controlled.
|
|
336
336
|
*/
|
|
337
337
|
highlightedItem: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
338
|
-
dataIndex: _propTypes.default.number,
|
|
339
|
-
seriesId: _propTypes.default.string.isRequired,
|
|
340
|
-
type: _propTypes.default.oneOf(['bar']).isRequired
|
|
341
|
-
}), _propTypes.default.shape({
|
|
342
338
|
dataIndex: _propTypes.default.number,
|
|
343
339
|
seriesId: _propTypes.default.string.isRequired
|
|
344
340
|
}), _propTypes.default.shape({
|
|
345
341
|
dataIndex: _propTypes.default.number,
|
|
346
342
|
seriesId: _propTypes.default.string.isRequired,
|
|
347
|
-
type: _propTypes.default.oneOf(['
|
|
343
|
+
type: _propTypes.default.oneOf(['bar']).isRequired
|
|
348
344
|
}), _propTypes.default.shape({
|
|
349
345
|
dataIndex: _propTypes.default.number,
|
|
350
346
|
seriesId: _propTypes.default.string.isRequired,
|
|
351
|
-
type: _propTypes.default.oneOf(['
|
|
347
|
+
type: _propTypes.default.oneOf(['line']).isRequired
|
|
352
348
|
}), _propTypes.default.shape({
|
|
353
349
|
dataIndex: _propTypes.default.number,
|
|
354
350
|
seriesId: _propTypes.default.string.isRequired,
|
|
@@ -357,6 +353,10 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
357
353
|
dataIndex: _propTypes.default.number,
|
|
358
354
|
seriesId: _propTypes.default.string.isRequired,
|
|
359
355
|
type: _propTypes.default.oneOf(['radar']).isRequired
|
|
356
|
+
}), _propTypes.default.shape({
|
|
357
|
+
dataIndex: _propTypes.default.number,
|
|
358
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
359
|
+
type: _propTypes.default.oneOf(['scatter']).isRequired
|
|
360
360
|
})]),
|
|
361
361
|
/**
|
|
362
362
|
* Defines the maximum distance between a scatter point and the pointer that triggers the interaction.
|
|
@@ -401,15 +401,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
401
401
|
}), _propTypes.default.shape({
|
|
402
402
|
dataIndex: _propTypes.default.number,
|
|
403
403
|
seriesId: _propTypes.default.string.isRequired,
|
|
404
|
-
type: _propTypes.default.oneOf(['
|
|
404
|
+
type: _propTypes.default.oneOf(['pie']).isRequired
|
|
405
405
|
}), _propTypes.default.shape({
|
|
406
406
|
dataIndex: _propTypes.default.number,
|
|
407
407
|
seriesId: _propTypes.default.string.isRequired,
|
|
408
|
-
type: _propTypes.default.oneOf(['
|
|
408
|
+
type: _propTypes.default.oneOf(['radar']).isRequired
|
|
409
409
|
}), _propTypes.default.shape({
|
|
410
410
|
dataIndex: _propTypes.default.number,
|
|
411
411
|
seriesId: _propTypes.default.string.isRequired,
|
|
412
|
-
type: _propTypes.default.oneOf(['
|
|
412
|
+
type: _propTypes.default.oneOf(['scatter']).isRequired
|
|
413
413
|
}), _propTypes.default.shape({
|
|
414
414
|
dataIndex: _propTypes.default.number,
|
|
415
415
|
seriesId: _propTypes.default.string.isRequired,
|
|
@@ -421,15 +421,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
421
421
|
}), _propTypes.default.shape({
|
|
422
422
|
dataIndex: _propTypes.default.number,
|
|
423
423
|
seriesId: _propTypes.default.string.isRequired,
|
|
424
|
-
type: _propTypes.default.oneOf(['
|
|
424
|
+
type: _propTypes.default.oneOf(['pie'])
|
|
425
425
|
}), _propTypes.default.shape({
|
|
426
426
|
dataIndex: _propTypes.default.number,
|
|
427
427
|
seriesId: _propTypes.default.string.isRequired,
|
|
428
|
-
type: _propTypes.default.oneOf(['
|
|
428
|
+
type: _propTypes.default.oneOf(['radar'])
|
|
429
429
|
}), _propTypes.default.shape({
|
|
430
430
|
dataIndex: _propTypes.default.number,
|
|
431
431
|
seriesId: _propTypes.default.string.isRequired,
|
|
432
|
-
type: _propTypes.default.oneOf(['
|
|
432
|
+
type: _propTypes.default.oneOf(['scatter'])
|
|
433
433
|
})]).isRequired),
|
|
434
434
|
/**
|
|
435
435
|
* Localized text for chart components.
|
|
@@ -547,27 +547,27 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
547
547
|
* Used when the tooltip is controlled.
|
|
548
548
|
*/
|
|
549
549
|
tooltipItem: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
550
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
551
|
+
seriesId: _propTypes.default.string.isRequired
|
|
552
|
+
}), _propTypes.default.shape({
|
|
550
553
|
dataIndex: _propTypes.default.number.isRequired,
|
|
551
554
|
seriesId: _propTypes.default.string.isRequired,
|
|
552
555
|
type: _propTypes.default.oneOf(['bar']).isRequired
|
|
553
556
|
}), _propTypes.default.shape({
|
|
554
557
|
dataIndex: _propTypes.default.number.isRequired,
|
|
555
|
-
seriesId: _propTypes.default.string.isRequired
|
|
556
|
-
}), _propTypes.default.shape({
|
|
557
|
-
dataIndex: _propTypes.default.number,
|
|
558
558
|
seriesId: _propTypes.default.string.isRequired,
|
|
559
|
-
type: _propTypes.default.oneOf(['
|
|
560
|
-
}), _propTypes.default.shape({
|
|
561
|
-
dataIndex: _propTypes.default.number,
|
|
562
|
-
seriesId: _propTypes.default.string.isRequired
|
|
559
|
+
type: _propTypes.default.oneOf(['pie']).isRequired
|
|
563
560
|
}), _propTypes.default.shape({
|
|
564
561
|
dataIndex: _propTypes.default.number.isRequired,
|
|
565
562
|
seriesId: _propTypes.default.string.isRequired,
|
|
566
563
|
type: _propTypes.default.oneOf(['scatter']).isRequired
|
|
567
564
|
}), _propTypes.default.shape({
|
|
568
|
-
dataIndex: _propTypes.default.number
|
|
565
|
+
dataIndex: _propTypes.default.number,
|
|
566
|
+
seriesId: _propTypes.default.string.isRequired
|
|
567
|
+
}), _propTypes.default.shape({
|
|
568
|
+
dataIndex: _propTypes.default.number,
|
|
569
569
|
seriesId: _propTypes.default.string.isRequired,
|
|
570
|
-
type: _propTypes.default.oneOf(['
|
|
570
|
+
type: _propTypes.default.oneOf(['line']).isRequired
|
|
571
571
|
}), _propTypes.default.shape({
|
|
572
572
|
dataIndex: _propTypes.default.number,
|
|
573
573
|
seriesId: _propTypes.default.string.isRequired,
|
|
@@ -285,15 +285,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
285
285
|
}), PropTypes.shape({
|
|
286
286
|
dataIndex: PropTypes.number,
|
|
287
287
|
seriesId: PropTypes.string.isRequired,
|
|
288
|
-
type: PropTypes.oneOf(['
|
|
288
|
+
type: PropTypes.oneOf(['pie']).isRequired
|
|
289
289
|
}), PropTypes.shape({
|
|
290
290
|
dataIndex: PropTypes.number,
|
|
291
291
|
seriesId: PropTypes.string.isRequired,
|
|
292
|
-
type: PropTypes.oneOf(['
|
|
292
|
+
type: PropTypes.oneOf(['radar']).isRequired
|
|
293
293
|
}), PropTypes.shape({
|
|
294
294
|
dataIndex: PropTypes.number,
|
|
295
295
|
seriesId: PropTypes.string.isRequired,
|
|
296
|
-
type: PropTypes.oneOf(['
|
|
296
|
+
type: PropTypes.oneOf(['scatter']).isRequired
|
|
297
297
|
}), PropTypes.shape({
|
|
298
298
|
dataIndex: PropTypes.number,
|
|
299
299
|
seriesId: PropTypes.string.isRequired,
|
|
@@ -305,15 +305,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
305
305
|
}), PropTypes.shape({
|
|
306
306
|
dataIndex: PropTypes.number,
|
|
307
307
|
seriesId: PropTypes.string.isRequired,
|
|
308
|
-
type: PropTypes.oneOf(['
|
|
308
|
+
type: PropTypes.oneOf(['pie'])
|
|
309
309
|
}), PropTypes.shape({
|
|
310
310
|
dataIndex: PropTypes.number,
|
|
311
311
|
seriesId: PropTypes.string.isRequired,
|
|
312
|
-
type: PropTypes.oneOf(['
|
|
312
|
+
type: PropTypes.oneOf(['radar'])
|
|
313
313
|
}), PropTypes.shape({
|
|
314
314
|
dataIndex: PropTypes.number,
|
|
315
315
|
seriesId: PropTypes.string.isRequired,
|
|
316
|
-
type: PropTypes.oneOf(['
|
|
316
|
+
type: PropTypes.oneOf(['scatter'])
|
|
317
317
|
})]).isRequired),
|
|
318
318
|
/**
|
|
319
319
|
* The controlled axis highlight.
|
|
@@ -328,20 +328,16 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
328
328
|
* Used when the highlight is controlled.
|
|
329
329
|
*/
|
|
330
330
|
highlightedItem: PropTypes.oneOfType([PropTypes.shape({
|
|
331
|
-
dataIndex: PropTypes.number,
|
|
332
|
-
seriesId: PropTypes.string.isRequired,
|
|
333
|
-
type: PropTypes.oneOf(['bar']).isRequired
|
|
334
|
-
}), PropTypes.shape({
|
|
335
331
|
dataIndex: PropTypes.number,
|
|
336
332
|
seriesId: PropTypes.string.isRequired
|
|
337
333
|
}), PropTypes.shape({
|
|
338
334
|
dataIndex: PropTypes.number,
|
|
339
335
|
seriesId: PropTypes.string.isRequired,
|
|
340
|
-
type: PropTypes.oneOf(['
|
|
336
|
+
type: PropTypes.oneOf(['bar']).isRequired
|
|
341
337
|
}), PropTypes.shape({
|
|
342
338
|
dataIndex: PropTypes.number,
|
|
343
339
|
seriesId: PropTypes.string.isRequired,
|
|
344
|
-
type: PropTypes.oneOf(['
|
|
340
|
+
type: PropTypes.oneOf(['line']).isRequired
|
|
345
341
|
}), PropTypes.shape({
|
|
346
342
|
dataIndex: PropTypes.number,
|
|
347
343
|
seriesId: PropTypes.string.isRequired,
|
|
@@ -350,6 +346,10 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
350
346
|
dataIndex: PropTypes.number,
|
|
351
347
|
seriesId: PropTypes.string.isRequired,
|
|
352
348
|
type: PropTypes.oneOf(['radar']).isRequired
|
|
349
|
+
}), PropTypes.shape({
|
|
350
|
+
dataIndex: PropTypes.number,
|
|
351
|
+
seriesId: PropTypes.string.isRequired,
|
|
352
|
+
type: PropTypes.oneOf(['scatter']).isRequired
|
|
353
353
|
})]),
|
|
354
354
|
/**
|
|
355
355
|
* Defines the maximum distance between a scatter point and the pointer that triggers the interaction.
|
|
@@ -394,15 +394,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
394
394
|
}), PropTypes.shape({
|
|
395
395
|
dataIndex: PropTypes.number,
|
|
396
396
|
seriesId: PropTypes.string.isRequired,
|
|
397
|
-
type: PropTypes.oneOf(['
|
|
397
|
+
type: PropTypes.oneOf(['pie']).isRequired
|
|
398
398
|
}), PropTypes.shape({
|
|
399
399
|
dataIndex: PropTypes.number,
|
|
400
400
|
seriesId: PropTypes.string.isRequired,
|
|
401
|
-
type: PropTypes.oneOf(['
|
|
401
|
+
type: PropTypes.oneOf(['radar']).isRequired
|
|
402
402
|
}), PropTypes.shape({
|
|
403
403
|
dataIndex: PropTypes.number,
|
|
404
404
|
seriesId: PropTypes.string.isRequired,
|
|
405
|
-
type: PropTypes.oneOf(['
|
|
405
|
+
type: PropTypes.oneOf(['scatter']).isRequired
|
|
406
406
|
}), PropTypes.shape({
|
|
407
407
|
dataIndex: PropTypes.number,
|
|
408
408
|
seriesId: PropTypes.string.isRequired,
|
|
@@ -414,15 +414,15 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
414
414
|
}), PropTypes.shape({
|
|
415
415
|
dataIndex: PropTypes.number,
|
|
416
416
|
seriesId: PropTypes.string.isRequired,
|
|
417
|
-
type: PropTypes.oneOf(['
|
|
417
|
+
type: PropTypes.oneOf(['pie'])
|
|
418
418
|
}), PropTypes.shape({
|
|
419
419
|
dataIndex: PropTypes.number,
|
|
420
420
|
seriesId: PropTypes.string.isRequired,
|
|
421
|
-
type: PropTypes.oneOf(['
|
|
421
|
+
type: PropTypes.oneOf(['radar'])
|
|
422
422
|
}), PropTypes.shape({
|
|
423
423
|
dataIndex: PropTypes.number,
|
|
424
424
|
seriesId: PropTypes.string.isRequired,
|
|
425
|
-
type: PropTypes.oneOf(['
|
|
425
|
+
type: PropTypes.oneOf(['scatter'])
|
|
426
426
|
})]).isRequired),
|
|
427
427
|
/**
|
|
428
428
|
* Localized text for chart components.
|
|
@@ -540,27 +540,27 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
540
540
|
* Used when the tooltip is controlled.
|
|
541
541
|
*/
|
|
542
542
|
tooltipItem: PropTypes.oneOfType([PropTypes.shape({
|
|
543
|
+
dataIndex: PropTypes.number.isRequired,
|
|
544
|
+
seriesId: PropTypes.string.isRequired
|
|
545
|
+
}), PropTypes.shape({
|
|
543
546
|
dataIndex: PropTypes.number.isRequired,
|
|
544
547
|
seriesId: PropTypes.string.isRequired,
|
|
545
548
|
type: PropTypes.oneOf(['bar']).isRequired
|
|
546
549
|
}), PropTypes.shape({
|
|
547
550
|
dataIndex: PropTypes.number.isRequired,
|
|
548
|
-
seriesId: PropTypes.string.isRequired
|
|
549
|
-
}), PropTypes.shape({
|
|
550
|
-
dataIndex: PropTypes.number,
|
|
551
551
|
seriesId: PropTypes.string.isRequired,
|
|
552
|
-
type: PropTypes.oneOf(['
|
|
553
|
-
}), PropTypes.shape({
|
|
554
|
-
dataIndex: PropTypes.number,
|
|
555
|
-
seriesId: PropTypes.string.isRequired
|
|
552
|
+
type: PropTypes.oneOf(['pie']).isRequired
|
|
556
553
|
}), PropTypes.shape({
|
|
557
554
|
dataIndex: PropTypes.number.isRequired,
|
|
558
555
|
seriesId: PropTypes.string.isRequired,
|
|
559
556
|
type: PropTypes.oneOf(['scatter']).isRequired
|
|
560
557
|
}), PropTypes.shape({
|
|
561
|
-
dataIndex: PropTypes.number
|
|
558
|
+
dataIndex: PropTypes.number,
|
|
559
|
+
seriesId: PropTypes.string.isRequired
|
|
560
|
+
}), PropTypes.shape({
|
|
561
|
+
dataIndex: PropTypes.number,
|
|
562
562
|
seriesId: PropTypes.string.isRequired,
|
|
563
|
-
type: PropTypes.oneOf(['
|
|
563
|
+
type: PropTypes.oneOf(['line']).isRequired
|
|
564
564
|
}), PropTypes.shape({
|
|
565
565
|
dataIndex: PropTypes.number,
|
|
566
566
|
seriesId: PropTypes.string.isRequired,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { ToolbarPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
2
3
|
export interface ChartsToolbarProps {}
|
|
3
4
|
export interface ChartsToolbarSlots {
|
|
4
5
|
/**
|
|
5
6
|
* Custom component for the toolbar.
|
|
6
7
|
* @default ChartsToolbar
|
|
7
8
|
*/
|
|
8
|
-
toolbar?: React.ElementType<ChartsToolbarProps>;
|
|
9
|
+
toolbar?: React.ElementType<ChartsToolbarProps & ToolbarPropsOverrides>;
|
|
9
10
|
}
|
|
10
11
|
export interface ChartsToolbarSlotProps {
|
|
11
12
|
/**
|
|
12
13
|
* Props for the toolbar component.
|
|
13
14
|
*/
|
|
14
|
-
toolbar?: Partial<ChartsToolbarProps
|
|
15
|
+
toolbar?: Partial<ChartsToolbarProps> & ToolbarPropsOverrides;
|
|
15
16
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { ToolbarPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
2
3
|
export interface ChartsToolbarProps {}
|
|
3
4
|
export interface ChartsToolbarSlots {
|
|
4
5
|
/**
|
|
5
6
|
* Custom component for the toolbar.
|
|
6
7
|
* @default ChartsToolbar
|
|
7
8
|
*/
|
|
8
|
-
toolbar?: React.ElementType<ChartsToolbarProps>;
|
|
9
|
+
toolbar?: React.ElementType<ChartsToolbarProps & ToolbarPropsOverrides>;
|
|
9
10
|
}
|
|
10
11
|
export interface ChartsToolbarSlotProps {
|
|
11
12
|
/**
|
|
12
13
|
* Props for the toolbar component.
|
|
13
14
|
*/
|
|
14
|
-
toolbar?: Partial<ChartsToolbarProps
|
|
15
|
+
toolbar?: Partial<ChartsToolbarProps> & ToolbarPropsOverrides;
|
|
15
16
|
}
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import BezierEasing from 'bezier-easing';
|
|
2
1
|
export declare const ANIMATION_DURATION_MS = 300;
|
|
3
2
|
export declare const ANIMATION_TIMING_FUNCTION = "cubic-bezier(0.66, 0, 0.34, 1)";
|
|
4
|
-
export declare const ANIMATION_TIMING_FUNCTION_JS:
|
|
3
|
+
export declare const ANIMATION_TIMING_FUNCTION_JS: import("bezier-easing").EasingFunction;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import BezierEasing from 'bezier-easing';
|
|
2
1
|
export declare const ANIMATION_DURATION_MS = 300;
|
|
3
2
|
export declare const ANIMATION_TIMING_FUNCTION = "cubic-bezier(0.66, 0, 0.34, 1)";
|
|
4
|
-
export declare const ANIMATION_TIMING_FUNCTION_JS:
|
|
3
|
+
export declare const ANIMATION_TIMING_FUNCTION_JS: import("bezier-easing").EasingFunction;
|
|
@@ -16,7 +16,11 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
16
16
|
/**
|
|
17
17
|
* If true, allows cycling from the last item to the first one.
|
|
18
18
|
*/
|
|
19
|
-
allowCycles?: boolean
|
|
19
|
+
allowCycles?: boolean,
|
|
20
|
+
/**
|
|
21
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
22
|
+
*/
|
|
23
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
20
24
|
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
21
25
|
/**
|
|
22
26
|
* The set of series types compatible with this navigation action.
|
|
@@ -25,7 +29,11 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
25
29
|
/**
|
|
26
30
|
* If true, allows cycling from the last item to the first one.
|
|
27
31
|
*/
|
|
28
|
-
allowCycles?: boolean
|
|
32
|
+
allowCycles?: boolean,
|
|
33
|
+
/**
|
|
34
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
35
|
+
*/
|
|
36
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
29
37
|
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
30
38
|
/**
|
|
31
39
|
* The set of series types compatible with this navigation action.
|
|
@@ -16,7 +16,11 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
16
16
|
/**
|
|
17
17
|
* If true, allows cycling from the last item to the first one.
|
|
18
18
|
*/
|
|
19
|
-
allowCycles?: boolean
|
|
19
|
+
allowCycles?: boolean,
|
|
20
|
+
/**
|
|
21
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
22
|
+
*/
|
|
23
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
20
24
|
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
21
25
|
/**
|
|
22
26
|
* The set of series types compatible with this navigation action.
|
|
@@ -25,7 +29,11 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
25
29
|
/**
|
|
26
30
|
* If true, allows cycling from the last item to the first one.
|
|
27
31
|
*/
|
|
28
|
-
allowCycles?: boolean
|
|
32
|
+
allowCycles?: boolean,
|
|
33
|
+
/**
|
|
34
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
35
|
+
*/
|
|
36
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
29
37
|
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
30
38
|
/**
|
|
31
39
|
* The set of series types compatible with this navigation action.
|
|
@@ -25,7 +25,11 @@ compatibleSeriesTypes,
|
|
|
25
25
|
/**
|
|
26
26
|
* If true, allows cycling from the last item to the first one.
|
|
27
27
|
*/
|
|
28
|
-
allowCycles = false
|
|
28
|
+
allowCycles = false,
|
|
29
|
+
/**
|
|
30
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
31
|
+
*/
|
|
32
|
+
useCurrentSeriesMaxLength = false) {
|
|
29
33
|
return function getNextIndexFocusedItem(currentItem, state) {
|
|
30
34
|
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
31
35
|
let seriesId = currentItem?.seriesId;
|
|
@@ -38,7 +42,7 @@ allowCycles = false) {
|
|
|
38
42
|
type = nextSeries.type;
|
|
39
43
|
seriesId = nextSeries.seriesId;
|
|
40
44
|
}
|
|
41
|
-
const maxLength = (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
45
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
42
46
|
let dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex + 1;
|
|
43
47
|
if (allowCycles) {
|
|
44
48
|
dataIndex = dataIndex % maxLength;
|
|
@@ -72,7 +76,11 @@ compatibleSeriesTypes,
|
|
|
72
76
|
/**
|
|
73
77
|
* If true, allows cycling from the last item to the first one.
|
|
74
78
|
*/
|
|
75
|
-
allowCycles = false
|
|
79
|
+
allowCycles = false,
|
|
80
|
+
/**
|
|
81
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
82
|
+
*/
|
|
83
|
+
useCurrentSeriesMaxLength = false) {
|
|
76
84
|
return function getPreviousIndexFocusedItem(currentItem, state) {
|
|
77
85
|
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
78
86
|
let seriesId = currentItem?.seriesId;
|
|
@@ -85,7 +93,7 @@ allowCycles = false) {
|
|
|
85
93
|
type = previousSeries.type;
|
|
86
94
|
seriesId = previousSeries.seriesId;
|
|
87
95
|
}
|
|
88
|
-
const maxLength = (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
96
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
89
97
|
let dataIndex = currentItem?.dataIndex == null ? maxLength - 1 : currentItem.dataIndex - 1;
|
|
90
98
|
if (allowCycles) {
|
|
91
99
|
dataIndex = (maxLength + dataIndex) % maxLength;
|
|
@@ -16,7 +16,11 @@ compatibleSeriesTypes,
|
|
|
16
16
|
/**
|
|
17
17
|
* If true, allows cycling from the last item to the first one.
|
|
18
18
|
*/
|
|
19
|
-
allowCycles = false
|
|
19
|
+
allowCycles = false,
|
|
20
|
+
/**
|
|
21
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
22
|
+
*/
|
|
23
|
+
useCurrentSeriesMaxLength = false) {
|
|
20
24
|
return function getNextIndexFocusedItem(currentItem, state) {
|
|
21
25
|
const processedSeries = selectorChartSeriesProcessed(state);
|
|
22
26
|
let seriesId = currentItem?.seriesId;
|
|
@@ -29,7 +33,7 @@ allowCycles = false) {
|
|
|
29
33
|
type = nextSeries.type;
|
|
30
34
|
seriesId = nextSeries.seriesId;
|
|
31
35
|
}
|
|
32
|
-
const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
36
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
33
37
|
let dataIndex = currentItem?.dataIndex == null ? 0 : currentItem.dataIndex + 1;
|
|
34
38
|
if (allowCycles) {
|
|
35
39
|
dataIndex = dataIndex % maxLength;
|
|
@@ -63,7 +67,11 @@ compatibleSeriesTypes,
|
|
|
63
67
|
/**
|
|
64
68
|
* If true, allows cycling from the last item to the first one.
|
|
65
69
|
*/
|
|
66
|
-
allowCycles = false
|
|
70
|
+
allowCycles = false,
|
|
71
|
+
/**
|
|
72
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
73
|
+
*/
|
|
74
|
+
useCurrentSeriesMaxLength = false) {
|
|
67
75
|
return function getPreviousIndexFocusedItem(currentItem, state) {
|
|
68
76
|
const processedSeries = selectorChartSeriesProcessed(state);
|
|
69
77
|
let seriesId = currentItem?.seriesId;
|
|
@@ -76,7 +84,7 @@ allowCycles = false) {
|
|
|
76
84
|
type = previousSeries.type;
|
|
77
85
|
seriesId = previousSeries.seriesId;
|
|
78
86
|
}
|
|
79
|
-
const maxLength = getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
87
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
80
88
|
let dataIndex = currentItem?.dataIndex == null ? maxLength - 1 : currentItem.dataIndex - 1;
|
|
81
89
|
if (allowCycles) {
|
|
82
90
|
dataIndex = (maxLength + dataIndex) % maxLength;
|