Do something fancy with colours.

This commit is contained in:
James Cole
2016-11-11 20:52:48 +01:00
parent 5d4f1bc76d
commit 727717931a
2 changed files with 58 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ namespace FireflyIII\Generator\Chart\Bill;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Transaction;
use FireflyIII\Support\ChartColour;
use Illuminate\Support\Collection;
/**
@@ -37,7 +38,7 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
'datasets' => [
[
'data' => [round($unpaid, 2), round(bcmul($paid, '-1'), 2)],
'backgroundColor' => ['rgba(53, 124, 165,0.7)', 'rgba(0, 141, 76, 0.7)',],
'backgroundColor' => [ChartColour::getColour(0), ChartColour::getColour(1)],
],
],