@gravity-ui/charts 1.17.0 → 1.18.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/dist/cjs/components/AxisY/prepare-axis-data.d.ts +2 -1
- package/dist/cjs/components/AxisY/prepare-axis-data.js +7 -6
- package/dist/cjs/components/AxisY/utils.js +1 -10
- package/dist/cjs/components/ChartInner/index.js +10 -5
- package/dist/cjs/components/ChartInner/useChartInnerProps.d.ts +1 -1
- package/dist/cjs/components/ChartInner/useChartInnerProps.js +2 -0
- package/dist/cjs/components/Tooltip/ChartTooltipContent.d.ts +1 -0
- package/dist/cjs/components/Tooltip/ChartTooltipContent.js +2 -2
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/index.d.ts +2 -1
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/index.js +3 -3
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/utils.d.ts +4 -3
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/utils.js +6 -9
- package/dist/cjs/components/Tooltip/index.js +1 -1
- package/dist/cjs/hooks/useAxisScales/index.d.ts +3 -3
- package/dist/cjs/hooks/useAxisScales/index.js +40 -7
- package/dist/cjs/hooks/useChartOptions/index.d.ts +3 -1
- package/dist/cjs/hooks/useChartOptions/index.js +3 -3
- package/dist/cjs/hooks/useChartOptions/tooltip.d.ts +4 -1
- package/dist/cjs/hooks/useChartOptions/tooltip.js +18 -3
- package/dist/cjs/hooks/useChartOptions/x-axis.js +21 -9
- package/dist/cjs/hooks/useChartOptions/y-axis.js +20 -7
- package/dist/cjs/hooks/useCrosshair/index.d.ts +1 -1
- package/dist/cjs/hooks/useCrosshair/index.js +2 -1
- package/dist/cjs/hooks/useShapes/area/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/area/prepare-data.js +3 -0
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.js +3 -0
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.js +8 -1
- package/dist/cjs/hooks/useShapes/index.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/line/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/line/prepare-data.js +3 -0
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.js +6 -0
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.js +6 -3
- package/dist/cjs/hooks/useZoom/index.d.ts +1 -1
- package/dist/cjs/hooks/useZoom/types.d.ts +1 -1
- package/dist/cjs/hooks/useZoom/utils.d.ts +1 -1
- package/dist/cjs/hooks/useZoom/utils.js +22 -10
- package/dist/cjs/types/chart/tooltip.d.ts +3 -0
- package/dist/cjs/utils/chart/array.d.ts +1 -0
- package/dist/cjs/utils/chart/array.js +9 -0
- package/dist/cjs/utils/chart/index.d.ts +1 -0
- package/dist/cjs/utils/chart/index.js +1 -0
- package/dist/cjs/utils/chart/zoom.js +14 -8
- package/dist/esm/components/AxisY/prepare-axis-data.d.ts +2 -1
- package/dist/esm/components/AxisY/prepare-axis-data.js +7 -6
- package/dist/esm/components/AxisY/utils.js +1 -10
- package/dist/esm/components/ChartInner/index.js +10 -5
- package/dist/esm/components/ChartInner/useChartInnerProps.d.ts +1 -1
- package/dist/esm/components/ChartInner/useChartInnerProps.js +2 -0
- package/dist/esm/components/Tooltip/ChartTooltipContent.d.ts +1 -0
- package/dist/esm/components/Tooltip/ChartTooltipContent.js +2 -2
- package/dist/esm/components/Tooltip/DefaultTooltipContent/index.d.ts +2 -1
- package/dist/esm/components/Tooltip/DefaultTooltipContent/index.js +3 -3
- package/dist/esm/components/Tooltip/DefaultTooltipContent/utils.d.ts +4 -3
- package/dist/esm/components/Tooltip/DefaultTooltipContent/utils.js +6 -9
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/hooks/useAxisScales/index.d.ts +3 -3
- package/dist/esm/hooks/useAxisScales/index.js +40 -7
- package/dist/esm/hooks/useChartOptions/index.d.ts +3 -1
- package/dist/esm/hooks/useChartOptions/index.js +3 -3
- package/dist/esm/hooks/useChartOptions/tooltip.d.ts +4 -1
- package/dist/esm/hooks/useChartOptions/tooltip.js +18 -3
- package/dist/esm/hooks/useChartOptions/x-axis.js +21 -9
- package/dist/esm/hooks/useChartOptions/y-axis.js +20 -7
- package/dist/esm/hooks/useCrosshair/index.d.ts +1 -1
- package/dist/esm/hooks/useCrosshair/index.js +2 -1
- package/dist/esm/hooks/useShapes/area/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/area/prepare-data.js +3 -0
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.js +3 -0
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.js +8 -1
- package/dist/esm/hooks/useShapes/index.d.ts +1 -1
- package/dist/esm/hooks/useShapes/line/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/line/prepare-data.js +3 -0
- package/dist/esm/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/scatter/prepare-data.js +6 -0
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.js +6 -3
- package/dist/esm/hooks/useZoom/index.d.ts +1 -1
- package/dist/esm/hooks/useZoom/types.d.ts +1 -1
- package/dist/esm/hooks/useZoom/utils.d.ts +1 -1
- package/dist/esm/hooks/useZoom/utils.js +22 -10
- package/dist/esm/types/chart/tooltip.d.ts +3 -0
- package/dist/esm/utils/chart/array.d.ts +1 -0
- package/dist/esm/utils/chart/array.js +9 -0
- package/dist/esm/utils/chart/index.d.ts +1 -0
- package/dist/esm/utils/chart/index.js +1 -0
- package/dist/esm/utils/chart/zoom.js +14 -8
- package/package.json +1 -1
|
@@ -76,14 +76,20 @@ export function getZoomedSeriesData(args) {
|
|
|
76
76
|
const yAxisIndex = 'yAxis' in seriesItem && typeof seriesItem.yAxis === 'number'
|
|
77
77
|
? seriesItem.yAxis
|
|
78
78
|
: 0;
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
const zoomStateY = zoomState.y[yAxisIndex];
|
|
80
|
+
if (zoomStateY) {
|
|
81
|
+
const [yMin, yMax] = zoomStateY;
|
|
82
|
+
const y = 'y' in point ? point.y : undefined;
|
|
83
|
+
inYRange = isValueInRange({
|
|
84
|
+
axis: yAxes === null || yAxes === void 0 ? void 0 : yAxes[yAxisIndex],
|
|
85
|
+
value: y,
|
|
86
|
+
min: yMin,
|
|
87
|
+
max: yMax,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
inYRange = false;
|
|
92
|
+
}
|
|
87
93
|
}
|
|
88
94
|
currentPointInRange = inXRange && inYRange;
|
|
89
95
|
if (currentPointInRange) {
|