gudh / ngecharts

Light weight angular.js directive for ECharts
8 stars 6 forks source link

Not able to see data on any event #3

Open antoniomtz opened 7 years ago

antoniomtz commented 7 years ago

Hey, I'm using AngularFire js to load some data from Firebase. Once I get the $loaded event, I populate an array with some data. The chart doesn't get updated with the data, even if I do $scope.$apply();

Any thoughts?

antoniomtz commented 7 years ago

I read that I need to use the addData function. How can I use it with this directive?

mozaffar commented 6 years ago

You can simply use "ng-if" directive. It means that you can set a variable to "true" before you start the new data generation (e.g. processing = true) and remove the chart tag from DOM until it becomes false. Finally you must set the variable to "false" when your generating becomes completed.