I am currently working on implementing chart representation in AngularJS.
While I have successfully implemented simple charts, I now need assistance with converting the below JSON data into arrays for chart representation:
[{"value": {"DE":2,"NP":20,"BD":28,"TW":1},
"end_time":"2016-07-05T07:00:00+0000"},
{"value":{"DE":5,"NP":11,"BD":22,"BE":2,"FJ":2},
"end_time":"2016-07-06T07:00:00+0000"},
{"value":{"DE":5,"NP":24,"BD":29},
"end_time":"2016-07-07T07:00:00+0000"}]
I aim to convert this JSON data into the following format:
$scope.labels = ["January", "February", "March", "April", "May", "June","July"];
$scope.series = ['Series A', 'Series B'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
My main challenge lies in dealing with different labels in each JSON object while maintaining count order. Any recommendations on how I can achieve this effectively using other libraries or chart options in AngularJS would be greatly appreciated.