From 9aaedea764701d9491fd64c552d4d356eedc5913 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 15 Sep 2014 17:53:32 +0300 Subject: [PATCH] fix dashlet --- .../modules/crm/src/views/dashlets/sales-pipeline.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/client/modules/crm/src/views/dashlets/sales-pipeline.js b/frontend/client/modules/crm/src/views/dashlets/sales-pipeline.js index 98cab4f100..1360f38a05 100644 --- a/frontend/client/modules/crm/src/views/dashlets/sales-pipeline.js +++ b/frontend/client/modules/crm/src/views/dashlets/sales-pipeline.js @@ -143,7 +143,16 @@ Espo.define('Crm:Views.Dashlets.SalesPipeline', 'Crm:Views.Dashlets.Abstract.Cha var self = this; var colors = Espo.Utils.clone(this.colors); - colors[colors.length - 1] = this.successColor; + + this.chartData.forEach(function (item, i) { + if (i + 1 > colors.length) { + colors.push('#164'); + } + if (this.chartData.length == i + 1) { + colors[i] = this.successColor; + } + }, this); + this.flotr.draw(this.$container.get(0), this.chartData, { colors: colors,