From 8941aab2c6601f5955a151f557bc5a32d64649f4 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 23 Jul 2014 02:04:28 +0200 Subject: [PATCH] Preserve categories's color in chart --- inc/myco.js | 2 +- inc/myco_objects.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/myco.js b/inc/myco.js index e13d760..f8890af 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -217,7 +217,7 @@ refresh_group_categories=function(group) { 'hoverable': true }, 'legend': { - 'show': true, + 'show': false, }, 'series': { 'pie': { diff --git a/inc/myco_objects.js b/inc/myco_objects.js index aef11e0..39994a4 100644 --- a/inc/myco_objects.js +++ b/inc/myco_objects.js @@ -417,7 +417,8 @@ function Group(uuid,name,data) { if (jQuery.type(this.categories[cid])!='undefined') { data.push({ 'label': this.categories[cid].name, - 'data': cats[cid] + 'data': cats[cid], + 'color': this.categories[cid].color }); } }