mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-13 19:12:49 +00:00
fixed month order
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
\.DS_Store
|
\.DS_Store
|
||||||
config.json
|
config.json
|
||||||
|
mywebsite
|
||||||
|
mywebsite.exe
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ app.controller('SensorInfoController', function($scope, $http, $routeParams) {
|
|||||||
|
|
||||||
if ($scope.list.length > 0) {
|
if ($scope.list.length > 0) {
|
||||||
$scope.selectedObject = $scope.list[0];
|
$scope.selectedObject = $scope.list[0];
|
||||||
$scope.selectedMonth = $scope.list[0].months[$scope.list.months.length];
|
$scope.selectedMonth = $scope.list[0].months[$scope.list[0].months.length - 1];
|
||||||
|
|
||||||
$scope.loadingMonth = true;
|
$scope.loadingMonth = true;
|
||||||
$scope.loadingYear = true;
|
$scope.loadingYear = true;
|
||||||
@@ -20,7 +20,7 @@ app.controller('SensorInfoController', function($scope, $http, $routeParams) {
|
|||||||
$scope.loadingYear = false;
|
$scope.loadingYear = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
displayChart("info-chart-month", "legend-month", $scope.location, $scope.list[0].year, $scope.list[0].months[0], function() {
|
displayChart("info-chart-month", "legend-month", $scope.location, $scope.list[0].year, $scope.selectedMonth, function() {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
$scope.loadingMonth = false;
|
$scope.loadingMonth = false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user