Make chart red/green

This commit is contained in:
James Cole
2018-08-13 18:09:47 +02:00
parent cb2c52cddb
commit 6941176519
2 changed files with 32 additions and 24 deletions

View File

@@ -81,10 +81,12 @@ class CategoryController extends Controller
[ [
'label' => (string)trans('firefly.spent'), 'label' => (string)trans('firefly.spent'),
'entries' => [], 'type' => 'bar', 'entries' => [], 'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
], ],
[ [
'label' => (string)trans('firefly.earned'), 'label' => (string)trans('firefly.earned'),
'entries' => [], 'type' => 'bar', 'entries' => [], 'type' => 'bar',
'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
], ],
[ [
'label' => (string)trans('firefly.sum'), 'label' => (string)trans('firefly.sum'),
@@ -187,11 +189,13 @@ class CategoryController extends Controller
'label' => (string)trans('firefly.spent'), 'label' => (string)trans('firefly.spent'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
], ],
[ [
'label' => (string)trans('firefly.earned'), 'label' => (string)trans('firefly.earned'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
], ],
[ [
'label' => (string)trans('firefly.sum'), 'label' => (string)trans('firefly.sum'),
@@ -248,11 +252,13 @@ class CategoryController extends Controller
'label' => (string)trans('firefly.spent'), 'label' => (string)trans('firefly.spent'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
], ],
[ [
'label' => (string)trans('firefly.earned'), 'label' => (string)trans('firefly.earned'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
], ],
[ [
'label' => (string)trans('firefly.sum'), 'label' => (string)trans('firefly.sum'),
@@ -331,11 +337,13 @@ class CategoryController extends Controller
'label' => (string)trans('firefly.spent'), 'label' => (string)trans('firefly.spent'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red
], ],
[ [
'label' => (string)trans('firefly.earned'), 'label' => (string)trans('firefly.earned'),
'entries' => [], 'entries' => [],
'type' => 'bar', 'type' => 'bar',
'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green
], ],
[ [
'label' => (string)trans('firefly.sum'), 'label' => (string)trans('firefly.sum'),

View File

@@ -23,7 +23,7 @@
$(function () { $(function () {
"use strict"; "use strict";
columnChart(everything, 'category-everything'); columnChartCustomColours(everything, 'category-everything');
columnChart(specific, 'specific-period'); columnChartCustomColours(specific, 'specific-period');
}); });