From 38472cb670c45cab8e63ae4634b1545f23d1d1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Fri, 14 Sep 2018 11:54:57 +0200 Subject: [PATCH] Fixed colours in the progress graphic progress graph will be shown in blue successful graph will be shown in orange --- app/assets/javascripts/dashboard_graphs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/dashboard_graphs.js b/app/assets/javascripts/dashboard_graphs.js index df6a8924c..f878e3b15 100644 --- a/app/assets/javascripts/dashboard_graphs.js +++ b/app/assets/javascripts/dashboard_graphs.js @@ -140,8 +140,13 @@ }; ProposalGraph.prototype.draw = function() { + var colors = {}; + this.formatXColumnValues(); + colors[this.progressColumnValues[0]] = '#004a83'; + colors[this.successfulColumnValues[0]] = '#ff7f0e'; + c3.generate({ bindto: '#' + this.targetId, data: { @@ -150,7 +155,8 @@ this.xColumnValues, this.progressColumnValues, this.successfulColumnValues - ] + ], + colors: colors }, axis: { y: {