0👍
The reason getChart()
is not being called is because it’s not present on the $scope
element. Use $scope.getChart = function() { ... }
instead. I recommend reading this documentation page, specifically the part "Scope as Data-Model".
- Chartjs-ChartJS passing data dynamically, then passing data into variables
- Chartjs-Charting with chartjs, can't get it working correctly
Source:stackexchange.com