You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using ng-view in our application. Navigating to and from a view with a chart and a view without a chart I found two things happening:
When moving from chart to non-chart, the non-chart view throws rendering errors when the browser window resizes (Chart js registers an event handler for window resize, and loops through instances to redraw them).
The number of instances in Chart.instances increases each time the user navigates to the view containing a chart, it never decreases when user navigates away from the chart view.
The following is needed in the link function:
$scope.$on("$destroy", function(){
if (chartCreated){
chartCreated.destroy();
}
});
The text was updated successfully, but these errors were encountered:
We're using ng-view in our application. Navigating to and from a view with a chart and a view without a chart I found two things happening:
The following is needed in the link function:
The text was updated successfully, but these errors were encountered: