I need to push the http url from the json i encoded using php into data.push in the following code. For now i have used a random math array. How do i push a json http url:
http://maricoih.e21designs.com/services/productionhourlyscopra
into the data.push() in the following code:
app.controller('MainCtrl', ['$scope',
function($scope) {
$scope.tasksRunData = [{
label:"ope",
data: []
},{
label:"lma",
data: []
},{
label:"lmb",
data: []
}];
$scope.tasksRunChartOptions = {
legend: {
show: true
},
lines: {
show: true
}
};
// some data
for (var i = 1; i < 100; i += 1) {
$scope.tasksRunData[0].data.push([i, Math.random(i) * 100]);
}
for (var i = 1; i < 100; i += 1) {
$scope.tasksRunData[1].data.push([i, Math.random(i) * 45]);
}
for (var i = 1; i < 100; i += 1) {
$scope.tasksRunData[2].data.push([i, Math.random(i) * 65]);
}
$scope.reportTasksRunRange = {
min: 1,
max: 100,
floor: 1,
ceil: 100,
step: 1
};
}
]);
Go to the plunkr link to follow the full code.