diff --git a/client/app/visualizations/chart/plotly/index.js b/client/app/visualizations/chart/plotly/index.js index a2f5008121..2305d96ea3 100644 --- a/client/app/visualizations/chart/plotly/index.js +++ b/client/app/visualizations/chart/plotly/index.js @@ -46,7 +46,9 @@ const PlotlyChart = () => ({ layout = prepareLayout(plotlyElement, scope.series, scope.options, data); // It will auto-purge previous graph - Plotly.newPlot(plotlyElement, data, layout, plotlyOptions); + Plotly.newPlot(plotlyElement, data, layout, plotlyOptions).then(() => { + updateLayout(plotlyElement, layout, (e, u) => Plotly.relayout(e, u)); + }); plotlyElement.on('plotly_restyle', (updates) => { // This event is triggered if some plotly data/layout has changed.