From 435b392e9204a73e2ae9568b983e0ab65a23a1fb Mon Sep 17 00:00:00 2001 From: Denny Biasiolli Date: Fri, 3 Jun 2016 10:49:06 +0200 Subject: [PATCH] legend: fix rendering in browsers other than Chrome when dataset.backgroundColor is Array --- src/core/core.legend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.legend.js b/src/core/core.legend.js index f625bb881..6b18c0a70 100644 --- a/src/core/core.legend.js +++ b/src/core/core.legend.js @@ -44,7 +44,7 @@ module.exports = function(Chart) { return helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) { return { text: dataset.label, - fillStyle: dataset.backgroundColor, + fillStyle: (!helpers.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]), hidden: !chart.isDatasetVisible(i), lineCap: dataset.borderCapStyle, lineDash: dataset.borderDash, -- 2.47.2