diff --git a/src/component/dataZoom/AxisProxy.ts b/src/component/dataZoom/AxisProxy.ts index 8c05f8cea7..9fd48044f4 100644 --- a/src/component/dataZoom/AxisProxy.ts +++ b/src/component/dataZoom/AxisProxy.ts @@ -315,8 +315,16 @@ class AxisProxy { for (let i = 0; i < dataDims.length; i++) { const value = store.get(dataDimIndices[i], dataIndex) as number; const thisHasValue = !isNaN(value); - const thisLeftOut = value < valueWindow[0]; - const thisRightOut = value > valueWindow[1]; + let thisRightOut = value > valueWindow[1]; + let thisLeftOut = value < valueWindow[0]; + if (seriesModel.subType !== 'bar') { + const parsedRightValue = seriesData.get(dataDims[i], dataIndex + 1); + const parsedLeftValue = seriesData.get(dataDims[i], dataIndex - 1); + const leftValue = (typeof parsedLeftValue === 'number') ? parsedLeftValue : NaN; + const rightValue = (typeof parsedRightValue === 'number') ? parsedRightValue : NaN; + thisLeftOut = thisLeftOut && leftValue < valueWindow[0]; + thisRightOut = thisRightOut && rightValue > valueWindow[1]; + } if (thisHasValue && !thisLeftOut && !thisRightOut) { return true; } diff --git a/test/axis-weak-filter.html b/test/axis-weak-filter.html new file mode 100644 index 0000000000..33c2d9dbd4 --- /dev/null +++ b/test/axis-weak-filter.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + +
+
+ + + + + + +