Use new graphs api response

This commit is contained in:
Johannes Zellner
2022-10-14 11:28:00 +02:00
parent 0f52db5dfe
commit aae3208e5f
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -730,7 +730,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
// fill holes with previous value
var cur = 0;
content.data.datapoints.forEach(function (d) {
content.data.forEach(function (d) {
if (d[0] === null) d[0] = cur;
else cur = d[0];
});
@@ -738,7 +738,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
var datapoints = Array(steps).map(function () { return '0'; });
// walk backwards and fill up the datapoints
content.data.datapoints.reverse().forEach(function (d, index) {
content.data.reverse().forEach(function (d, index) {
datapoints[datapoints.length-1-index] = (d[0] / divisor).toFixed(2);
// return parseInt((d[0] / divisor).toFixed(2));
});