This is an automated email from the ASF dual-hosted git repository.
ovilia pushed a commit to branch fix-dataZoom
in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/fix-dataZoom by this push:
new f5c8bf64a fix(dataZoom): revert unnecessary changes
f5c8bf64a is described below
commit f5c8bf64a8ac9ac0457e6c93e5bd7211bf893e78
Author: Ovilia <[email protected]>
AuthorDate: Thu Jun 19 14:36:01 2025 +0800
fix(dataZoom): revert unnecessary changes
---
src/component/dataZoom/SliderZoomView.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/component/dataZoom/SliderZoomView.ts
b/src/component/dataZoom/SliderZoomView.ts
index 40e2522c4..b460ffee7 100644
--- a/src/component/dataZoom/SliderZoomView.ts
+++ b/src/component/dataZoom/SliderZoomView.ts
@@ -376,7 +376,7 @@ class SliderZoomView extends DataZoomView {
data !== this._shadowData || otherDim !== this._shadowDim
|| size[0] !== oldSize[0] || size[1] !== oldSize[1]
) {
- const thisScaleExtent = info.thisAxis.scale.getExtent();
+ const thisDataExtent = data.getDataExtent(info.thisDim);
let otherDataExtent = data.getDataExtent(otherDim);
// Nice extent.
const otherOffset = (otherDataExtent[1] - otherDataExtent[0]) *
0.3;
@@ -390,7 +390,7 @@ class SliderZoomView extends DataZoomView {
const areaPoints = [[size[0], 0], [0, 0]];
const linePoints: number[][] = [];
const step = thisShadowExtent[1] / (Math.max(1, data.count() - 1));
- const normalizationConstant = size[0] / (thisScaleExtent[1] -
thisScaleExtent[0]);
+ const normalizationConstant = size[0] / (thisDataExtent[1] -
thisDataExtent[0]);
const isTimeAxis = info.thisAxis.type === 'time';
let thisCoord = -step;
@@ -407,7 +407,7 @@ class SliderZoomView extends DataZoomView {
}
thisCoord = isTimeAxis
- ? (+thisValue - thisScaleExtent[0]) * normalizationConstant
+ ? (+thisValue - thisDataExtent[0]) * normalizationConstant
: thisCoord + step;
// FIXME
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]