Angular-chart.js with android disappear after loaded


#1

Hi everyone, i have problem with the library angular-chart.js. In the browser this it works well. But the problem occurs when i build app for android 4.1, after loading the graphic disappears. Researching say it can be a browser issue and render, but I do not know. Any idea?.

Thanks!


#2

I faced the same recently and it looks like angular-chart is not at fault. It cannot retrieve the window dimensions for some reason. So the solution, that I found from one of the forums, is to simulate a resize event. Somewhere in your controller add this code:

$scope.$on("$ionicView.afterEnter", function(event, data) {
window.dispatchEvent(new Event(‘resize’));
});

Hope this helps.