Skip to content

Commit

Permalink
plot_api: make Plotly.redraw go through a round of clean data/layout
Browse files Browse the repository at this point in the history
- to bring it on-par with Plotly.plot
- fixes #942 by properly supplying uid to new traces
  which are now required by the Scatter.plot method.
  • Loading branch information
etpinard committed Sep 15, 2016
1 parent 920a333 commit 35e4d32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ Plotly.redraw = function(gd) {
throw new Error('This element is not a Plotly plot: ' + gd);
}

helpers.cleanData(gd.data, gd.data);
helpers.cleanLayout(gd.layout);

gd.calcdata = undefined;
return Plotly.plot(gd).then(function() {
gd.emit('plotly_redraw');
Expand Down

0 comments on commit 35e4d32

Please sign in to comment.