Repository navigation
No way to disable mouse-scroll zoom for geo subplots #143
Description
Activity
We need to better define what
layout.dragmodeandconfig.scrollZoomdo and how they play together.As
config.scrollZoomis set tofalseby default and geo scrolling is enable by default, we can't makeconfig.scrollZooma geo object option.I think the solution here would to add an attribute, possibly
layout.geo.scrollmode/layout.scene.scrollmodeand later moveconfig.scrollZoomtolayout.scrollmodefor cartesian plots.Just wondering if this has been addressed yet. Thanks!
@mattfarkas No.
It would be nice if scroll zoom was a layout attribute such as dragmode and hovermode. Likewise it would be nice to have an 'after click' event.
My use case is that I have a page with a bunch of plots where I by and large want scroll zoom but only when the user is actually trying ot interact with the chart. I want them to indicate this roughly by clicking on the chart (ie to pan). When this happens, i'd want to toggle scroll zoom on. If i don't do this, the first chart the user wheels over will snipe the events.
Seems this has been open for almost a year now without any progress having been made on it. I'm just wondering if anyone has started work on it... or - if not - has anyone at least given it some thought to the point where they have an idea what needs to be done?
I may be able to put in some work on this but being new to plotly, i'm not sure what needs to be done. On my initial read-through I thought i new what needed to be done but once I attempted a fix it didn't actually work as expected.
any guidance would be appreciated...
@avnerkantor Thanks so much! I actually never came across that. That does resolve my needs.
@bpostlethwaite I wonder if https://plot.ly/javascript/disable-zoom/ is sufficient to close this issue. It allows for the disabling of scroll & zoom on an axis by using the
fixedrangeattribute of the[xy]axislayout parameter, as can be seen in this example: http://codepen.io/plotly/pen/PZPPPjIt does seem like the
fixedrangeattribute needs to be documented a bit better though... since i didn't come initially come across it in my search.never mind on the documentation... its actually there. don't understand why i personally didn't see it the first time! doh! Thanx again @avnerkantor
@etpinard's call on that one
A minor point: setting
fixedrange: falsestill captures the mouse event, and the overall document isn't scrolling when wheeling over a plot, though that's a user expectation with mostly static content.- changed the title
[-]No way to disable mouse-scroll zoom[/-][+]No way to disable mouse-scroll zoom for geo subplots[/+]on Sep 22, 2017 This still seems to be an issue, there is no way to disable zoom & pan on geo maps :(
@dancrisan, try using staticPlot: true, this worked for my situation.
https://plot.ly/javascript/configuration-options/#making-a-static-chart
@heisler3030 That unfortunately disables hovering, so you won't be able to see the city names and their value, so not really a working solution =[
Reacted by JT, Mischa Lisovyi and Ashutosh MishraI'm also interested in a way to disable zoom and pan on chloropleth maps without disabling hover. Right now setting fixedrange to true for both axes doesn't seem to work.
Static Plot works, but I'd like to be able to keep the hover text. If I paste my layout into the the disable zoom codepen, it works. And if I change my plot type to scatter it works. Seems like it's something to do with the geoLayer.
Is there possibly a way to require a ctrl + mouse event to zoom/pan? That may work.
- added 2 commits that reference this issue
on Jan 8, 2019 done in #3422
Reacted by Daniel Darabos, asitang and yoan13Is this feature now available for choropleth maps in the latest plotly.js version?
I have heard a few reports of folks struggling to disable mouse-zoom. First stage could be updating our docs to assert that this is currently not supported. Second stage is to support it.