Add rounding, so the number will be a float.

This commit is contained in:
James Cole 2015-12-27 17:34:31 +01:00
parent 3e80ffc52b
commit e7d677bfb6

View File

@ -24,13 +24,13 @@ class ChartJsBillChartGenerator implements BillChartGenerator
bcscale(2);
$data = [
[
'value' => $unpaid,
'value' => round($unpaid,2),
'color' => 'rgba(53, 124, 165,0.7)',
'highlight' => 'rgba(53, 124, 165,0.9)',
'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)',
'highlight' => 'rgba(0, 141, 76, 0.9)',
'label' => trans('firefly.paid'),