I need to generate a number of pie charts dynamically based on data from a database. So I don't know how many pie charts I need to create so I need the data attribute to be string that is generated via string interpolation.
This way gives a syntax error:
I tried to modify the custom pie directive to something like this in the link function:
$parse(attrs.data)($scope.$parent);
But I get the following error:
TypeError: u.map is not a function
at Object.n as pie
at Object.updatePaths (pie-chart.js:100)
at draw (pie-chart.js:44)
at hard_update (pie-chart.js:30)
at Object.fn (pie-chart.js:56)
at n.$get.n.$digest (angular.js:14308)
at n.$get.n.$apply (angular.js:14571)
at l (angular.js:9698)
at M (angular.js:9888)
at XMLHttpRequest.F.onload (angular.js:9829)
Am I overlooking something simple or does the pie-chart directive not support this use case?
I need to generate a number of pie charts dynamically based on data from a database. So I don't know how many pie charts I need to create so I need the data attribute to be string that is generated via string interpolation.
This way gives a syntax error:
I tried to modify the custom pie directive to something like this in the link function:
$parse(attrs.data)($scope.$parent);
But I get the following error: TypeError: u.map is not a function at Object.n as pie at Object.updatePaths (pie-chart.js:100) at draw (pie-chart.js:44) at hard_update (pie-chart.js:30) at Object.fn (pie-chart.js:56) at n.$get.n.$digest (angular.js:14308) at n.$get.n.$apply (angular.js:14571) at l (angular.js:9698) at M (angular.js:9888) at XMLHttpRequest.F.onload (angular.js:9829)
Am I overlooking something simple or does the pie-chart directive not support this use case?
Anyways thanks for the help!