interactive monthly graph
This commit is contained in:
parent
14dedcf779
commit
2474f8c570
2 changed files with 35 additions and 19 deletions
|
@ -221,10 +221,14 @@ app.controller( 'DashboardCtrl',
|
||||||
return '<md-content><h3><em>' + key + '</em> during ' + x + '</h3><h2>' + y + ' €</h2></md-content>';
|
return '<md-content><h3><em>' + key + '</em> during ' + x + '</h3><h2>' + y + ' €</h2></md-content>';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
$scope.graphed_accounts = [ 'Expenses', 'Income' ];
|
||||||
|
|
||||||
retrieve_accounts();
|
retrieve_accounts();
|
||||||
retrieve_dates_salaries();
|
retrieve_dates_salaries();
|
||||||
retrieve_graph_values( { period: '',
|
$scope.$watch( 'graphed_accounts', function () {
|
||||||
categories: 'Expenses Income'} );
|
retrieve_graph_values( { period: '',
|
||||||
|
categories: $scope.graphed_accounts.join(' ') } );
|
||||||
|
} );
|
||||||
|
|
||||||
}
|
}
|
||||||
] );
|
] );
|
||||||
|
|
|
@ -1,25 +1,37 @@
|
||||||
<md-toolbar flex="100" layout="column" layout-gt-md="row" layout-align="center center">
|
<md-toolbar flex="100" layout="column" layout-gt-md="row" layout-align="center center">
|
||||||
<h2>
|
<h2>
|
||||||
<md-select data-ng-model="period">
|
<md-input-container>
|
||||||
<md-option data-ng-repeat="period in periods">{{period}}</md-option>
|
<md-select data-ng-model="period">
|
||||||
</md-select>
|
<md-option data-ng-repeat="period in periods">{{period}}</md-option>
|
||||||
|
</md-select>
|
||||||
|
</md-input-container>
|
||||||
</h2>
|
</h2>
|
||||||
</md-toolbar>
|
</md-toolbar>
|
||||||
|
|
||||||
<md-content flex="100">
|
<md-content flex="100" layout="column" layout-gt-md="row">
|
||||||
<nvd3-multi-bar-chart
|
<md-card flex="20">
|
||||||
data="monthly_values"
|
<md-input-container>
|
||||||
id="monthlyValues"
|
<md-select multiple="true" data-ng-model="graphed_accounts">
|
||||||
height="350"
|
<md-option data-ng-repeat="account in accounts">{{account}}</md-option>
|
||||||
showXAxis="true"
|
</md-select>
|
||||||
showYAxis="true"
|
</md-input-container>
|
||||||
showLegend="true"
|
</md-card>
|
||||||
interactive="true"
|
<md-card flex="75">
|
||||||
tooltips="true"
|
<nvd3-multi-bar-chart
|
||||||
tooltipContent="barGraphToolTipContentFunction()"
|
data="monthly_values"
|
||||||
rotateLabels="67">
|
id="monthlyValues"
|
||||||
<svg></svg>
|
height="350"
|
||||||
</nvd3-multi-bar-chart>
|
showXAxis="true"
|
||||||
|
showYAxis="true"
|
||||||
|
showLegend="true"
|
||||||
|
interactive="true"
|
||||||
|
tooltips="true"
|
||||||
|
tooltipContent="barGraphToolTipContentFunction()"
|
||||||
|
rotateLabels="67"
|
||||||
|
margin="{left:70,top:70,bottom:70,right:125}" >
|
||||||
|
<svg></svg>
|
||||||
|
</nvd3-multi-bar-chart>
|
||||||
|
</md-card>
|
||||||
</md-content>
|
</md-content>
|
||||||
|
|
||||||
<md-content flex="100" layout="column" layout-gt-md="row">
|
<md-content flex="100" layout="column" layout-gt-md="row">
|
||||||
|
|
Loading…
Add table
Reference in a new issue