Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/angular-plotly.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
subscribeToEvents(graph);
}
}
graph.layout = scope.plotlyLayout;
// Copy the layout so that internal updates by plotly don't trigger the watcher, otherwise
// we can end up in infinite watcher recursion -- this can happen when plotting time series data
graph.layout = angular.copy(scope.plotlyLayout);
graph.data = scope.plotlyData;
Plotly.redraw(graph);
Plotly.Plots.resize(graph);
Expand Down