From 3a81baa3a191cd3ff14a8249bf86e388bc650640 Mon Sep 17 00:00:00 2001 From: jelhan Date: Thu, 17 Mar 2016 13:14:00 +0100 Subject: [PATCH] Fix update issue This special code for update breaks update. Reduced to update function of Chart.Bar.js (https://github.com/nnnick/Chart.js/blob/6507f5c0872705c7853dd5a0a6d112ea9d843e7e/src/Chart.Bar.js#L144-L155) and everything works fine. --- src/Chart.StackedBar.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/Chart.StackedBar.js b/src/Chart.StackedBar.js index a452f04..0d51eeb 100644 --- a/src/Chart.StackedBar.js +++ b/src/Chart.StackedBar.js @@ -358,31 +358,6 @@ return this; }, update : function(){ - - //Iterate through each of the datasets, and build this into a property of the chart - helpers.each(this.datasets,function(dataset,datasetIndex){ - - helpers.extend(this.datasets[datasetIndex], { - label : dataset.label || null, - fillColor : dataset.fillColor, - strokeColor : dataset.strokeColor, - }); - - helpers.each(dataset.data,function(dataPoint,index){ - helpers.extend(this.datasets[datasetIndex].bars[index], { - value : dataPoint, - label : this.data.labels[index], - datasetLabel: dataset.label, - strokeColor : dataset.strokeColor, - fillColor : dataset.fillColor, - highlightFill : dataset.highlightFill || dataset.fillColor, - highlightStroke : dataset.highlightStroke || dataset.strokeColor - }); - },this); - - },this); - - this.scale.update(); // Reset any highlight colours before updating. helpers.each(this.activeElements, function(activeElement){