I am trying to push some data into Angular Stacked Bar chart array. Anyone who could advice me with this?
I have a function
myService.getWorkload().then(function(res) {
json = res.data;
});
Then I have a Stacked Bar chart:
$scope.chart = {
"series": []
"data": [[],[]],
}
And JSON:
[
{
"label1": 2,
"label2": 3,
"label3": 4,
"label4": 5
},
{
"label1": 0,
"label2": 2,
"laber3": 4,
"label4": 6
}
]
How do I get the JSON key and the value into the series[key] and data[value]?