Python 在仪表板中加载带有预选值(如boxSelect)的plotly modebar
我正在Python 在仪表板中加载带有预选值(如boxSelect)的plotly modebar,python,plotly,plotly-dash,Python,Plotly,Plotly Dash,我正在dash中创建一个绘图仪,并尝试使用预选的动作值boxSelect创建模式栏。加载图形时,模式栏中没有预选值 这是我的密码: dcc.Graph( id='scatter', className="chart-graph", config={ "modeBarButtonsToRemove": ['toImage', 'zoom2d', 'zoomIn', 'zoomOut','autoScale2d','toggleSpikelines','hoverCompareC
dash
中创建一个绘图仪,并尝试使用预选的动作值boxSelect
创建模式栏。加载图形时,模式栏中没有预选值
这是我的密码:
dcc.Graph(
id='scatter',
className="chart-graph",
config={
"modeBarButtonsToRemove": ['toImage', 'zoom2d', 'zoomIn', 'zoomOut','autoScale2d','toggleSpikelines','hoverCompareCartesian', 'hoverClosestCartesian'],
# This is the line of code I'm hoping initializes things, but it does not work...
"select2d": True,
},
)
明白了!配置布局时,添加以下参数:
layout = go.Layout(
# ...
clickmode='event+select',
dragmode = 'lasso',
)