Disable scroll zoom for Scatter Mapbox in Python Dash

Hi,

Running into trouble to disable scroll zoom for our responsive mobile web dashboard. We want to fix the scroll of the map.

We have tried using dcc.Graph(config={'staticPlot': True}) but this disables the hoverover component completely.

We also tried to change fig.layout.update(dragmode=False) but we can still pan around.

We also tried to change fix.layout.XAxis(fixedrange=True) but it kept on throwing errors.

How can we achieve the effect similar to dragmode=False in plotly.js and have the hoverover data working?

Best,

Use "scrollZoom": False in the config dict. See the property section in https://dash.plot.ly/dash-core-components/graph for all available keys.

Thank you @Batalex.

As a more concrete example, for mobile webpage, if a user tap on the map area and try to swipe up/down, it will move map instead of scrolling up/down the webpage.

So we are trying to disable that specific part of the interactivity while preserve the hover-over functionalities.

3 Likes

@vitaminc Did you ever find fix for this?

Just asked the same question here

Have you got the answer coz i have same issue and not find yet.

Also having the same problem with choropleth_mapbox. Can’t disable drag and zoom no matter what I try.