diff --git a/src/views/app.js b/src/views/app.js index 79fbdfc5b..17d1a2ace 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -629,7 +629,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' return ('0' + dateTime.getHours()).slice(-2) + ':' + ('0' + dateTime.getMinutes()).slice(-2); }); - var data = { + var graphData = { labels: labels, datasets: [{ label: label, @@ -664,7 +664,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' var ctx = $(canvasId).get(0).getContext('2d'); if ($scope.graphs[chartPropertyName]) $scope.graphs[chartPropertyName].destroy(); - $scope.graphs[chartPropertyName] = new Chart(ctx, { type: 'line', data: data, options: options }); + $scope.graphs[chartPropertyName] = new Chart(ctx, { type: 'line', data: graphData, options: options }); } var memoryQuery = 'summarize(sum(collectd.localhost.table-' + appId + '-memory.gauge-rss, collectd.localhost.table-' + appId + '-memory.gauge-swap), "' + timeBucketSize + 'min", "avg")';