Skip to content

Commit 2efa9d7

Browse files
committed
set data/layout to undefined before plotting. fixes #906
1 parent 16d3228 commit 2efa9d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ HTMLWidgets.widget({
149149
// TODO: restore crosstalk selections?
150150
Plotly.purge(graphDiv);
151151
// TODO: why is this necessary to get crosstalk working?
152-
graphDiv.data = x.data;
152+
graphDiv.data = undefined;
153+
graphDiv.layout = undefined;
153154
var plot = Plotly.plot(graphDiv, x);
154155

155156
}

0 commit comments

Comments
 (0)