Graphs now use datetime instead of id for x-axis
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -65,3 +65,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pre>{{data}}</pre>
|
||||
|
||||
Reference in New Issue
Block a user