Here is my code:
fig = px.choropleth_mapbox(district_df[['District','Confirmed','Deaths','id','province']], geojson = geo_df, locations='id', color='Confirmed',
color_continuous_scale="Viridis",
mapbox_style="carto-positron",
zoom=5.9, hover_name = 'District',hover_data = {'District':False, 'Confirmed':True,'Deaths':True,'province':False,'id':False},
opacity=0.5, center = {"lat": 28.3949, "lon": 84.1240})
I would like to disable the zooming option. Is there a way?
Yes, update_layout will do if you set dragmode=False.
https://community.plotly.com/t/map-graph-disable-scrollzoom-drag/9664
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With