From: coolbombom Date: Mon, 11 Jan 2016 11:02:32 +0000 (+0100) Subject: having differnt colors in one dataset X-Git-Tag: v1.1.0~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ac54b87900a951d7b97ba2b8bcf5e975797e49e;p=thirdparty%2FChart.js.git having differnt colors in one dataset Hi updated the bar chart so the bars can have different colors in one dataset! cheers c_bb --- diff --git a/src/Chart.Bar.js b/src/Chart.Bar.js index 81532b4fd..dccf094b3 100644 --- a/src/Chart.Bar.js +++ b/src/Chart.Bar.js @@ -115,10 +115,10 @@ value : dataPoint, label : data.labels[index], datasetLabel: dataset.label, - strokeColor : dataset.strokeColor, - fillColor : dataset.fillColor, - highlightFill : dataset.highlightFill || dataset.fillColor, - highlightStroke : dataset.highlightStroke || dataset.strokeColor + strokeColor : dataset.strokeColor[index] || dataset.strokeColor, + fillColor : dataset.fillColor[index] || dataset.fillColor, + highlightFill : dataset.highlightFill[index] || dataset.highlightFill || dataset.fillColor[index] || dataset.fillColor, + highlightStroke : dataset.highlightStroke[index] || dataset.highlightStroke || dataset.strokeColor[index] || dataset.strokeColor })); },this);