Setting displayModeBar to True not working in update_layout

I am using graph_plots and want to always enable mode bar. Currently I trying to pass the config in the update_layout but it is not working

fig.update_layout(width=1200,
                          height=800,
                          legend={'x': 0, 'y': 1, 'bgcolor': 'rgba(0,0,0,0)'},
                          config={
                              'displayModeBar': True,
                          })

Fyi I am using fig.to_json() later so config in fig.show() is not used.

Hi tbhaxor.

How are thing going? If you want to always display the modebar, set the config dictionary in the component you are trying update. Here is an example that I recently used in one of my apps.

dcc.Graph(id=“map-graph”, config={‘displayModeBar’: True})

Hope this helps, and let us know either way.

/Michael Biel