mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-07 10:28:22 +00:00
Add rounding, so the number will be a float.
This commit is contained in:
@@ -24,13 +24,13 @@ class ChartJsBillChartGenerator implements BillChartGenerator
|
|||||||
bcscale(2);
|
bcscale(2);
|
||||||
$data = [
|
$data = [
|
||||||
[
|
[
|
||||||
'value' => $unpaid,
|
'value' => round($unpaid,2),
|
||||||
'color' => 'rgba(53, 124, 165,0.7)',
|
'color' => 'rgba(53, 124, 165,0.7)',
|
||||||
'highlight' => 'rgba(53, 124, 165,0.9)',
|
'highlight' => 'rgba(53, 124, 165,0.9)',
|
||||||
'label' => trans('firefly.unpaid'),
|
'label' => trans('firefly.unpaid'),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'value' => $paid * -1, // paid is negative, must be positive.
|
'value' => round($paid * -1,2), // paid is negative, must be positive.
|
||||||
'color' => 'rgba(0, 141, 76, 0.7)',
|
'color' => 'rgba(0, 141, 76, 0.7)',
|
||||||
'highlight' => 'rgba(0, 141, 76, 0.9)',
|
'highlight' => 'rgba(0, 141, 76, 0.9)',
|
||||||
'label' => trans('firefly.paid'),
|
'label' => trans('firefly.paid'),
|
||||||
|
|||||||
Reference in New Issue
Block a user