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

View File

@ -61,21 +61,24 @@ export class BalanceChartComponent implements OnChanges {
}; };
public seriesGroups: any = [{ public seriesGroups: any = [{
// type: 'column', type: 'stackedcolumn',
// series: [{ series: [{
// dataField: 'revenues' dataField: 'expenses',
// }, { fillColor: 'red'
// dataField: 'expenses' }, {
// }] dataField: 'revenues',
//}, { fillColor: 'green'
}]
}, {
type: 'line', type: 'line',
series: [{ series: [{
dataField: 'balance' dataField: 'balance',
fillColor: 'blue'
}], }],
bands: [{ 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) { setLines(account: Account) {
if (account) { if (account) {
this.seriesGroups[0].bands[1].minValue = account.authorized_overdraft; this.seriesGroups[1].bands[1].minValue = account.authorized_overdraft;
this.seriesGroups[0].bands[1].maxValue = account.authorized_overdraft; this.seriesGroups[1].bands[1].maxValue = account.authorized_overdraft;
} }
} }