diff options
| author | ARC <arjunrc@gmail.com> | 2015-05-13 16:34:57 -0400 |
|---|---|---|
| committer | ARC <arjunrc@gmail.com> | 2015-05-13 16:34:57 -0400 |
| commit | 1fbc5075605f6fdb47468e2e2a9f467ff78299ea (patch) | |
| tree | 5a4c43cfd6dedfd092a90558fd453ac046f5078d /www/js/EventsGraphsCtrl.js | |
| parent | 73968ba1b3c3b5efeb92f70969e40d143eebf3d8 (diff) | |
cleaned up graphs a bit
Diffstat (limited to 'www/js/EventsGraphsCtrl.js')
| -rw-r--r-- | www/js/EventsGraphsCtrl.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js index 94452bc1..5ba89205 100644 --- a/www/js/EventsGraphsCtrl.js +++ b/www/js/EventsGraphsCtrl.js @@ -8,7 +8,7 @@ // from the template file // FIXME: I need to clean this up, the animation is stupid because the data loads -// dynamically +// dynamically. I think I should really be using $q.all to animate after we get everything angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ionicPlatform', '$scope', 'ZMDataModel', '$ionicSideMenuDelegate', '$rootScope', '$http', function ($ionicPlatform, $scope, ZMDataModel, $ionicSideMenuDelegate, $rootScope, $http) { console.log("Inside Graphs controller"); @@ -77,12 +77,22 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni height: $rootScope.devHeight, // # of bars legend: 'none', + bar: { + groupWidth:"90%", + }, animation: { duration: 700, - easing: 'out', - startup: 'false', + easing: 'linear', + startup: 'true', }, + hAxis: { + gridlines: { + color: 'transparent', + }, + textPosition:'none' + } + }; @@ -119,7 +129,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni " AND " + data.pagination.count); $scope.chartObject.data.push([monitors[j].Monitor.Name, data.pagination.count, - 'opacity: 0.4', data.pagination.count]); + 'color: #76A7FA', data.pagination.count]); }) .error(function (data) { @@ -129,7 +139,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni console.log("**** EVENT COUNT FOR MONITOR " + monitors[i].Monitor.Id + " IS ERROR "); $scope.chartObject.data.push([monitors[j].Monitor.Name, - 0, 'opacity: 0.4', 0]); + 0, 'color: #76A7FA', 0]); }); } // is not simulated @@ -137,7 +147,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni { var rndEventCount = Math.floor(Math.random() * (100 - 20 + 1)) + 20; $scope.chartObject.data.push([monitors[j].Monitor.Name, rndEventCount, - 'opacity: 0.4', rndEventCount]); + 'color: #76A7FA', rndEventCount]); } })(i); // j |
