Add expenses and revenues graphs, change graph colors.

This commit is contained in:
Alexis Lahouze 2018-06-10 11:06:26 +02:00
parent ebcddbbfa5
commit 4d9faf7406
1 changed files with 15 additions and 12 deletions

View File

@ -61,21 +61,24 @@ export class BalanceChartComponent implements OnChanges {
};
public seriesGroups: any = [{
// type: 'column',
// series: [{
// dataField: 'revenues'
// }, {
// dataField: 'expenses'
// }]
//}, {
type: 'stackedcolumn',
series: [{
dataField: 'expenses',
fillColor: 'red'
}, {
dataField: 'revenues',
fillColor: 'green'
}]
}, {
type: 'line',
series: [{
dataField: 'balance'
dataField: 'balance',
fillColor: 'blue'
}],
bands: [{
minValue: 0, maxValue: 0, fillColor: 'orange', lineWidth: 2
minValue: 0, maxValue: 0, fillColor: 'orange', lineWidth: 1
}, {
minValue: 0, maxValue: 0, fillColor: 'red', lineWidth: 2
minValue: 0, maxValue: 0, fillColor: 'red', lineWidth: 1
}]
}];
@ -100,8 +103,8 @@ export class BalanceChartComponent implements OnChanges {
setLines(account: Account) {
if (account) {
this.seriesGroups[0].bands[1].minValue = account.authorized_overdraft;
this.seriesGroups[0].bands[1].maxValue = account.authorized_overdraft;
this.seriesGroups[1].bands[1].minValue = account.authorized_overdraft;
this.seriesGroups[1].bands[1].maxValue = account.authorized_overdraft;
}
}