Commit 75f6bbe651b88892986dd0ce5b057626d6670db5
1 parent
dd09e18d7d
Exists in
master
nuevos colores
Showing
1 changed file
with
1 additions
and
1 deletions
 
Show diff stats
src/js/controller.js
| 1 | angular.module('focaModalGraficoCisternas') | 1 | angular.module('focaModalGraficoCisternas') | 
| 2 | .controller('focaModalGraficoCisternasController', [ | 2 | .controller('focaModalGraficoCisternasController', [ | 
| 3 | '$scope', | 3 | '$scope', | 
| 4 | '$uibModalInstance', | 4 | '$uibModalInstance', | 
| 5 | 'filters', | 5 | 'filters', | 
| 6 | function($scope, $uibModalInstance, filters) { | 6 | function($scope, $uibModalInstance, filters) { | 
| 7 | $scope.labels = []; | 7 | $scope.labels = []; | 
| 8 | $scope.series = ['Disponible', 'Cargado']; | 8 | $scope.series = ['Disponible', 'Cargado']; | 
| 9 | $scope.colores = ['#949fb1', '#e09125'] | 9 | $scope.colores = ['#dcdcdc', '#007bff'] | 
| 10 | $scope.data = [[],[]]; | 10 | $scope.data = [[],[]]; | 
| 11 | $scope.options = { | 11 | $scope.options = { | 
| 12 | scales: { | 12 | scales: { | 
| 13 | xAxes: [{ | 13 | xAxes: [{ | 
| 14 | stacked: true, | 14 | stacked: true, | 
| 15 | }], | 15 | }], | 
| 16 | yAxes: [{ | 16 | yAxes: [{ | 
| 17 | stacked: true | 17 | stacked: true | 
| 18 | }] | 18 | }] | 
| 19 | }, | 19 | }, | 
| 20 | legend: { | 20 | legend: { | 
| 21 | display: true, | 21 | display: true, | 
| 22 | labels: { | 22 | labels: { | 
| 23 | fontColor: 'rgb(255, 99, 132)' | 23 | fontColor: 'rgb(255, 99, 132)' | 
| 24 | } | 24 | } | 
| 25 | } | 25 | } | 
| 26 | }; | 26 | }; | 
| 27 | 27 | ||
| 28 | $scope.cerrar = function() { | 28 | $scope.cerrar = function() { | 
| 29 | $uibModalInstance.dismiss('cancel'); | 29 | $uibModalInstance.dismiss('cancel'); | 
| 30 | }; | 30 | }; | 
| 31 | 31 | ||
| 32 | filters.cisternas.forEach(function(cisterna) { | 32 | filters.cisternas.forEach(function(cisterna) { | 
| 33 | $scope.labels.push(cisterna.codigo); | 33 | $scope.labels.push(cisterna.codigo); | 
| 34 | $scope.data[0].push(cisterna.capacidad - cisterna.estado.cantidad); | 34 | $scope.data[0].push(cisterna.capacidad - cisterna.estado.cantidad); | 
| 35 | $scope.data[1].push(cisterna.estado.cantidad); | 35 | $scope.data[1].push(cisterna.estado.cantidad); | 
| 36 | }); | 36 | }); | 
| 37 | }] | 37 | }] | 
| 38 | ); | 38 | ); | 
| 39 | 39 |