-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch events are surpressed to charts that does not have zoom added as plugin #311
Comments
@AllanOricil It's quite difficult to reproduce your issue. It would be so great if you could provide a minimal example in a codepen or jsfiddle... If you can't, I'll set up myself a project with Vue, vue-chartjs and your code but it will take more time. |
There are two problems. http://jsfiddle.net/jyougo/sv2n4zdh/2/ Click on Enable zoom. Reduce the size of the window until the chart is covering the entire Width of the available space. After that, try to scroll down the page placing the mouse anywhere inside the Canvas. It will not let you scroll down because the scroll is being captured by the canvas. Now imagine that I have this chart expanded in the entire area of a phone. How would the user scroll down to check info that is bellow the chart canvas? He would not, because he can't scroll down. This is what is happening. Another problem is that somehow when I apply zoom for one Chart, I cant scroll down in any other chart. Can we make a call so I can show it to you? I'm not good with jsfiddle. |
@AllanOricil your jsfiddle is using older versions of chart.js and the zoom plugin. I made the same mistake with my codepen on #289. Even with the latest versions of both, I am still seeing the issue you describe. |
Yes. I can confirm that I'm also using the latest versions on my project. The fiddle was just to evidence the problems. I think its related to the way you implemented the hammer js. |
I will test the modifier key |
I have the same problem. I noticed chartjs-plugin-zoom adds "touch-action: none;" to the style attribute of all canvas even for charts that don't implement zoom plugin. |
I have 3 charts on my web app. After adding the plugin to a Line chart I noticed the other 2 charts started to supress any touch event. The result is that I cant scrooll down or up when I touch any area of those other two charts. I can only scroll if I touch a area that is not on the canvas of the other two charts. The code bellow is how I added the plugin. The plugin is only in the last chart component (line).
The text was updated successfully, but these errors were encountered: