Graphs now use datetime instead of id for x-axis

This commit is contained in:
Patrick McDonagh
2016-02-01 21:43:57 -06:00
parent 27d1501cd5
commit 30a5e72453
2 changed files with 6 additions and 2 deletions

View File

@@ -371,6 +371,9 @@ tsCtrlrs.controller('tagValsCtrl', function($scope, $route, $http, $routeParams,
$scope.loading = false;
if (data.status == "OK"){
$scope.data = data;
$scope.data.vals = $scope.data.vals.map(function(x){
return {id: x.id, tagID: x.tagID, val: x.val, dateAdded: new Date(x.dateAdded)};
});
$scope.error = false;
$scope.options = {
@@ -387,8 +390,8 @@ tsCtrlrs.controller('tagValsCtrl', function($scope, $route, $http, $routeParams,
],
axes: {
x: {
key: "id",
// type: "date"
key: "dateAdded",
type: "date"
}
}
};

View File

@@ -65,3 +65,4 @@
</div>
</div>
</div>
<pre>{{data}}</pre>