From 2e6bc006f5daf34614c9de6da30fef92054049a8 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Tue, 4 Jul 2017 20:37:03 +0200 Subject: [PATCH] Add regions to separate past and future operations. --- src/operations/balance-chart.component.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/operations/balance-chart.component.js b/src/operations/balance-chart.component.js index 05ab0ba..8057659 100644 --- a/src/operations/balance-chart.component.js +++ b/src/operations/balance-chart.component.js @@ -67,6 +67,8 @@ var balanceChartModule = angular.module('balanceChartModule', [ }; vm.$onInit = function() { + var tomorrow = moment().endOf('day').valueOf(); + vm.chart = c3.generate({ bindto: $element[0].children[0], size: { @@ -85,8 +87,20 @@ var balanceChartModule = angular.module('balanceChartModule', [ }, groups: [ ['expenses', 'revenues'] - ] + ], + // Disable for the moment because there is an issue when + // using subchart line is not refreshed after subset + // selection. + //regions: { + // balances: [{ + // start: tomorrow, + // style: 'dashed' + // }] + //} }, + regions: [{ + start: tomorrow, + }], axis: { x: { type: 'timeseries',