Add regions to separate past and future operations.

This commit is contained in:
Alexis Lahouze 2017-07-04 20:37:03 +02:00
parent 003ad498db
commit 2e6bc006f5
1 changed files with 15 additions and 1 deletions

View File

@ -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',