Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

modeBarButtonsToAdd doesn't appear to be working as intended

$
0
0

@Krichardson wrote:

Hello, It appears that when I attempt to add the ‘select2d’ button to the modebar on a ScatterMapBox I get an error stating “must provide button ‘name’ in button config”. Not sure where this issue is coming from to be honest. Can anyone point out what I’m missing here?

Here is the Code

app.layout = html.Div(
    [
        html.Div(
            [
                dcc.Graph(id='map',
                          figure=
                          {
                            'data': [go.Scattermapbox()],
                            'layout': go.Layout(
                                paper_bgcolor='#f9f9f9',
                                plot_bgcolor='#f9f9f9',
                                dragmode='select',
                                mapbox=dict(bearing=0, 
                                            center=dict([redacted]),
                                            zoom=14,
                                            style='satellite',
                                            accesstoken=[redacted])
                                    )
                          },
                          config={'modeBarButtonsToAdd': ["select2d"]}
                )
            ], className="pretty_container"
        ),
    ]
)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles