Make chart pretty

This commit is contained in:
James Cole 2016-04-10 17:03:36 +02:00
parent b062222c45
commit ab523b6102
2 changed files with 8 additions and 1 deletions

View File

@ -74,14 +74,17 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
}
$data['datasets'][] = [
'type' => 'bar',
'label' => trans('firefly.minAmount'),
'data' => $minAmount,
];
$data['datasets'][] = [
'type' => 'line',
'label' => trans('firefly.billEntry'),
'data' => $actualAmount,
];
$data['datasets'][] = [
'type' => 'bar',
'label' => trans('firefly.maxAmount'),
'data' => $maxAmount,
];

View File

@ -160,6 +160,11 @@ var defaultColumnOptions = {
}
}]
},
elements: {
line: {
fill: false
}
},
tooltips: {
mode: 'label',
callbacks: {
@ -302,7 +307,6 @@ function columnChart(URL, container, options) {
dataset.backgroundColor = fillColors[i];
newData.datasets.push(dataset);
}
//new Chart(ctx).Bar(newData, defaultColumnOptions);
new Chart(ctx, {
type: 'bar',
data: data,