You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Zooming Y Axes controlled by one dataZoom component when using DataZoom Toolbox feature #20120
The zoom not correspond the area selected. It happens only when multiple Y Axis is configured to be controlled by one DataZoom Component and when it's using the Toolbox DataZoom feature.
If the zoom is done using the DataZoom Component or the mouse scroll the behavior is as expected.
Expected Behavior
The zoom should correspond the area selected considering that the chart has multiple Y Axis and one DataZoom Component controls both y axes.
The behavior expected is equal to using the DataZoom Component to zoom or the mouse scroll. Both cases the zoom works on both y axes.
seems to work fine when last two dataZoom are set as yAxisIndex:0 instead of yAxisIndex:[0,1] 📌 please close issue if problem solved.
When the last two dataZoom are set as yAxisIndex: 0 the dataZoom component doesn't work fine. The bug is replaced.
Note that the green and the pink series are set yAxisIndex: 0 (Left Axis) and the red one is yAxisIndex: 1 (Right Axis).
My dataZoom component is set to control both y axes as yAxisIndex: [0, 1] (ref). And the axes have different max value.
So when the zoom is done, both y axes should change.
Compare the gifs bellow for futher information.
Zoom by Toolbox DataZoom feature (unexpected behavior - bug). Note that before the zoom the datazoom component max correspond the max of Left Axis (yAxisIndex: 0) and after the zoom both axes and the datazoom max are equals:
Zoom by DataZoom commponent and by mouse scroll (expected behavior). Note that before and after the zoom the datazoom component max and the Left Axis max are equals and the zoom works fine.
Additional comment: if the last two dataZoom are set as suggested the behavior between the zoom modes changes. That is, the zoom by Toolbox DataZoom feature becomes expected behavior but the zoom by DataZoom component or by mouse scroll becomes unexpected behavior.
I have an example, related to the context of the issue I created, where I have multiple axes and all behave inconsistently. I saw that you added this bug to your collection issue. I will have vacation soon, I will try to come up with a PR for this then.
Activity
helgasoft commentedon Jul 6, 2024
seems to work fine when last two dataZoom are set as
yAxisIndex:0instead ofyAxisIndex:[0,1]📌 please close issue if problem solved.
erickmp07 commentedon Jul 6, 2024
When the last two dataZoom are set as
yAxisIndex: 0the dataZoom component doesn't work fine. The bug is replaced.Note that the green and the pink series are set
yAxisIndex: 0(Left Axis) and the red one isyAxisIndex: 1(Right Axis).My dataZoom component is set to control both y axes as
yAxisIndex: [0, 1](ref). And the axes have different max value.So when the zoom is done, both y axes should change.
Compare the gifs bellow for futher information.
Zoom by Toolbox DataZoom feature (unexpected behavior - bug). Note that before the zoom the datazoom component max correspond the max of Left Axis (

yAxisIndex: 0) and after the zoom both axes and the datazoom max are equals:Zoom by DataZoom commponent and by mouse scroll (expected behavior). Note that before and after the zoom the datazoom component max and the Left Axis max are equals and the zoom works fine.

Additional comment: if the last two dataZoom are set as suggested the behavior between the zoom modes changes. That is, the zoom by Toolbox DataZoom feature becomes expected behavior but the zoom by DataZoom component or by mouse scroll becomes unexpected behavior.
helgasoft commentedon Jul 6, 2024
let see if you can find "unexpected behavior" with this example
erickmp07 commentedon Jul 6, 2024
Yes. I found some. Compare the gifs:
Here the datazoom move affects only the axis controlled by it (note the axis min-max). That's correct - expected.

Here the datazoom move affects both axes (axes min-max) but the component was set to control only the left axis. That's unexpected.

helgasoft commentedon Jul 6, 2024
ok, good examples, agree. Left zoom should act like right zoom - freezing one Y-axis and only zooming the other, but it doesn't.
djaszak commentedon Apr 15, 2025
I reported a similar issue here #20576. @helgasoft is there any plan on fixing the toolbox dataZoom?
helgasoft commentedon Apr 15, 2025
I comment (too) often here as an experienced user and am not involved in maintenance or development plans.
A workaround Demo for the zoom bug, see if it works for you. Since only the first Y-axis is misbehaving, I make it invisible and use the next ones.
djaszak commentedon Apr 28, 2025
I have an example, related to the context of the issue I created, where I have multiple axes and all behave inconsistently. I saw that you added this bug to your collection issue. I will have vacation soon, I will try to come up with a PR for this then.