如何将$ scope.ok.rate值添加到Angular Js中的myDataSource1对象?当数据是字符串时图表正常工作但是如果我设置值:$ scope.ok.rate,我得到错误:没有要显示的数据。
if (response.TotalPercent3) {
$scope.ok = {
"rate": response.TotalPercent3,
"total": response.Total3
};
console.log($scope.ok.rate); // Here I can see the output. It has a value.
$scope.myDataSource1 = {
chart: {caption: "Some week"},
data: [
{label: "Saturday", value: $scope.ok.rate},
{label: "Sunday", value: "300"},