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
Hello, I'm feeding $scope.chart.data (see example) with arrays multiple times during app runtime. Everything works fine and it redraws well. But sometimes I get empty arrays from the server which is normal, thats when the api starts complaining about empty columns and leaves me with an error.
Is there any way to clear the chart when I dont have any data to feed it with and really dont want to leave the old data visible as well as any irrelevant errors?
Thanks
The text was updated successfully, but these errors were encountered:
Thanks, real neat, somehow I overlooked such a simple solution. Though in production it would flash an error message when data comes back.
I was thinking of adding an event listener to 'link' function,like 'clearChartData' right next to 'resizeMsg' listener, and then call the $scope.chartWrapper.clear() inside it. To my surprise it works only after the listener gets this message second time when its being $rootScope.$emit('clearChartData'). Calling $scope.chartWrapper.clear() twice doesn't help. Hope I will have more time to pin that weird thing.
Hello, I'm feeding $scope.chart.data (see example) with arrays multiple times during app runtime. Everything works fine and it redraws well. But sometimes I get empty arrays from the server which is normal, thats when the api starts complaining about empty columns and leaves me with an error.
Is there any way to clear the chart when I dont have any data to feed it with and really dont want to leave the old data visible as well as any irrelevant errors?
Thanks
The text was updated successfully, but these errors were encountered: