You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "RyanHuang-cloud (via GitHub)" <gi...@apache.org> on 2026/06/23 01:39:34 UTC

[I] [Bug] Zoom Reset Count Incorrect After Multiple Grids Zoom [echarts]

RyanHuang-cloud opened a new issue, #21660:
URL: https://github.com/apache/echarts/issues/21660

   ### Version
   
   6.1.0
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/en/editor.html?c=grid-multiple
   
   ### Steps to Reproduce
   
   1. Zoom in once on the upper trend chart.
   2. Zoom in once on the lower trend chart.
   3. You have now performed 2 zoom operations in total.
   4. Click Zoom Reset. It can be triggered 3 times, which is incorrect.
   
   ### Current Behavior
   
   Zoom Reset can be triggered 3 times, which indicates an error in how zoom history is tracked across multiple grids.
   
   ### Expected Behavior
   
   Zoom Reset should only be available as many times as actual zoom operations were performed.
   In this case, after 2 zooms, Zoom Reset should only be possible 2 times.
   
   ### Environment
   
   ```markdown
   - OS:N/A
   - Browser: N/A
   - Framework: N/A
   
   This issue can be reduced with Echarts Demo Examples. The issue is independent of my development environment or the browser used in testing.
   ```
   
   ### Any additional comments?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Bug] Zoom Reset Count Incorrect After Multiple Grids Zoom [echarts]

Posted by "aloktomarr (via GitHub)" <gi...@apache.org>.
aloktomarr commented on issue #21660:
URL: https://github.com/apache/echarts/issues/21660#issuecomment-5003092404

   I can reproduce this on master. Root cause is in src/component/dataZoom/history.ts
   pop() doesn't stop when only the origin snapshot remains it returns the origin as a restorable snapshot, so the toolbox "back"/zoom-reset dispatches one extra redundant dataZoom action(reset fires 3× after 2 zooms instead of 2×)
   
   Proposed fix
   pop() returns an empty snapshot when only the origin remains (its took caller, the toolbox back handler, already guards on batch.length)
   
   I've written a unit test covering it and would be happy to open a PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org