mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make chart pretty
This commit is contained in:
parent
b062222c45
commit
ab523b6102
@ -74,14 +74,17 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['datasets'][] = [
|
$data['datasets'][] = [
|
||||||
|
'type' => 'bar',
|
||||||
'label' => trans('firefly.minAmount'),
|
'label' => trans('firefly.minAmount'),
|
||||||
'data' => $minAmount,
|
'data' => $minAmount,
|
||||||
];
|
];
|
||||||
$data['datasets'][] = [
|
$data['datasets'][] = [
|
||||||
|
'type' => 'line',
|
||||||
'label' => trans('firefly.billEntry'),
|
'label' => trans('firefly.billEntry'),
|
||||||
'data' => $actualAmount,
|
'data' => $actualAmount,
|
||||||
];
|
];
|
||||||
$data['datasets'][] = [
|
$data['datasets'][] = [
|
||||||
|
'type' => 'bar',
|
||||||
'label' => trans('firefly.maxAmount'),
|
'label' => trans('firefly.maxAmount'),
|
||||||
'data' => $maxAmount,
|
'data' => $maxAmount,
|
||||||
];
|
];
|
||||||
|
@ -160,6 +160,11 @@ var defaultColumnOptions = {
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
elements: {
|
||||||
|
line: {
|
||||||
|
fill: false
|
||||||
|
}
|
||||||
|
},
|
||||||
tooltips: {
|
tooltips: {
|
||||||
mode: 'label',
|
mode: 'label',
|
||||||
callbacks: {
|
callbacks: {
|
||||||
@ -302,7 +307,6 @@ function columnChart(URL, container, options) {
|
|||||||
dataset.backgroundColor = fillColors[i];
|
dataset.backgroundColor = fillColors[i];
|
||||||
newData.datasets.push(dataset);
|
newData.datasets.push(dataset);
|
||||||
}
|
}
|
||||||
//new Chart(ctx).Bar(newData, defaultColumnOptions);
|
|
||||||
new Chart(ctx, {
|
new Chart(ctx, {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: data,
|
data: data,
|
||||||
|
Loading…
Reference in New Issue
Block a user