OK, so the data it seems already contains the config info so what you do in JavaScript is something like this:
d = {{ graphJSON | safe }};
d.config={staticPlot: true};
Plotly.newPlot('chart', d, {});
i.e. add the config to the data before plotting it
I imagine you can do this at the server end too but not quite sure how, yet