diff --git a/public/app/js/controllers/DashboardCtrl.js b/public/app/js/controllers/DashboardCtrl.js index 93412554..a2db97f0 100644 --- a/public/app/js/controllers/DashboardCtrl.js +++ b/public/app/js/controllers/DashboardCtrl.js @@ -221,10 +221,14 @@ app.controller( 'DashboardCtrl', return '

' + key + ' during ' + x + '

' + y + ' €

'; }; }; + $scope.graphed_accounts = [ 'Expenses', 'Income' ]; retrieve_accounts(); retrieve_dates_salaries(); - retrieve_graph_values( { period: '', - categories: 'Expenses Income'} ); + $scope.$watch( 'graphed_accounts', function () { + retrieve_graph_values( { period: '', + categories: $scope.graphed_accounts.join(' ') } ); + } ); + } ] ); diff --git a/public/app/js/templates/dashboard.html b/public/app/js/templates/dashboard.html index 8597b74e..f6f1a2e4 100644 --- a/public/app/js/templates/dashboard.html +++ b/public/app/js/templates/dashboard.html @@ -1,25 +1,37 @@

- - {{period}} - + + + {{period}} + +

- - - - + + + + + {{account}} + + + + + + + +