My challenge is to dynamically generate empty objects with a value of 0 for each country in relation to all months. Check out my plunker example: http://plnkr.co/edit/6ZsMpdFXMvGHZR5Qbs0m?p=preview
Currently, I only have data available for 2 months per country, but I want to display it for every month with empty data as blank (value 0). I have tried to achieve this but need to add a filter for each country.
for(var i = 1; i<=12; i++){
if(typeof checkArray[i] == 'undefined'){
if(i<10) i='0'+i;
$scope.year.push({
'month':'2015-'+i,
'val':'0'
});
}
}