Am trying to remove the ModeBar in a plotly plot that's generated in Python and displayed in HTML with JS. Per the documentation, you can specify a config such as:
config = dict({'displayModeBar': False})
fig.show(config=config)
But am exporting the fig to json with
graphJSON = json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder) (not using the .show() function)
And then displaying it with JS:
<script>
var graphs = {{graphJSON | safe}};
Plotly.newPlot('graph',graphs,{});
</script>
I tried specifying a config in the newPlot call but no luck, it seems to be ignored:
Plotly.newPlot('graph',graphs,{},{displayModeBar: false});
How can I specify config options when converting to json? Is there any other way to get rid of the ModeBar (the top bar that is displayed on mouseover)