scroll event may prevent after use inside dataZoom
See original GitHub issueVersion
4.2.1-rc.3
Reproduction link
https://codepen.io/gfwer/pen/maJGNz
Steps to reproduce
- add an inside dataZoom(in this instance I set
zoomOnMouseWheel:'shift'
) - mouse hover in the chart grid and scroll the mouse
What is expected?
page scroll
What is actually happening?
scroll event may prevent , I can 't scroll page when I move mouse over the chart grid
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:33 (1 by maintainers)
Top Results From Across the Web
scroll event may prevent after use inside dataZoom #10079
The mouse events are captured by the graph, which causes the problem. The workaround is basically a bypass – subscribing to the mouse...
Read more >[GitHub] [echarts] Orangat commented on issue #10079: scroll e...
[GitHub] [echarts] Orangat commented on issue #10079: scroll event may prevent after use inside dataZoom · GitBox Fri, 05 Feb 2021 02:44:09 -0800....
Read more >How to scroll with mouse wheel and keyboard on vertical ...
I have tried the datazoom configurations moveOnMouseWheel and moveOnMouseWheel but that only zooms the chart. i don't want it to zoom. the ...
Read more >See How It Works
With Datazoom, you can add datapoints to existing JSON streams such as combining ad CPM with ad-event data. This can reduce the amount...
Read more >Event and Action - Concepts - Handbook - Apache ECharts
The following example shows how to highlight each sector one by one in the pie chart using dispatchAction . option = { tooltip:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This problem still seems to exist on 4.2.1 (but works fine on 4.1.0), I can’t scrll page when the mouse hover in grid, here is my DataZoom option:
A CodePen here
It seems event is stopped by
eventTool.stop(e.event)
I wanted to share my workaround for this issue.
zoomLock: true
window
forkeyup
andkeydown
zoomLock: false
while a specific key is pressedzoomLock: true
when the key is released againThis can be done with vanilla JS or any ui library.
Here you can see how it’s done in Angular: https://stackblitz.com/edit/angular-ngx-echarts-qd5up4?file=src/app/app.component.ts