是否可以禁用散点图框的scrollZoom。我已经尝试了config属性,如下所示。
dcc.Graph(
id = "mapbox",
figure= go.Figure(
data=[
dict(
type = "scattermapbox",
lat = lats,
lon = lons,
mode = "markers",
marker = dict(size=200,color='rgb(242, 177, 172)',opacity=0.3),
text = text
)
],
layout= dict(
autosize = True,
hovermode = "closest",
margin = dict(l = 0, r = 0, t = 0, b = 0),
showlegend = False,
xaxis=dict(
fixedrange=True
),
yaxis=dict(
autorange='reversed',
fixedrange=True
),
mapbox = dict(
accesstoken = mapbox_access_token,
bearing =0,
center = dict(lat = 25.2489, lon = 55.3061),
style = "dark",
pitch = 0,
zoom = 2.5,
layers = [],
)
)
),
style = {"height": "100%"},
config={'scrollZoom': False,'displayModeBar': False}
)
但是不幸的是,它不起作用。我尝试使用列表中的多个其他选项,所有其他选项似乎都可以正常工作,例如上例中的显示模式栏。它只是scattermapbox上的scrollZoom。有帮助吗?
找到了config属性选项