diff --git a/src/operations/balanceChart.component.ts b/src/operations/balanceChart.component.ts index 2d80b0a..f73ae89 100644 --- a/src/operations/balanceChart.component.ts +++ b/src/operations/balanceChart.component.ts @@ -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; } }