In case of huge set of data provided in 'plotly-data' attribute value, using scope deep watcher becomes not really efficient, so my attempt to improve performance a bit was using new 'plotly-manual-data-update' directive attribute, which when set to 'true' causes not using scope watcher for chart data, but update only, when 'tracesUpdated' event is broadcasted from parent scope. So when we update chart data in controller, we can broadcast this event with:
$scope.$broadcast('tracesUpdated');
Where $scope is some custom controller scope. And 'plotly' directive will execute:
scope.$on('tracesUpdated', function () {
onUpdate();
});
In case of huge set of data provided in 'plotly-data' attribute value, using scope deep watcher becomes not really efficient, so my attempt to improve performance a bit was using new 'plotly-manual-data-update' directive attribute, which when set to 'true' causes not using scope watcher for chart data, but update only, when 'tracesUpdated' event is broadcasted from parent scope. So when we update chart data in controller, we can broadcast this event with:
$scope.$broadcast('tracesUpdated');
Where $scope is some custom controller scope. And 'plotly' directive will execute:on this call.