From: Kuba Suder Date: Thu, 16 Apr 2015 20:40:34 +0000 (+0200) Subject: stop animations when destroying a chart X-Git-Tag: v1.1.0~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66f7f96d4b0f8a03b67a45c43f20c1155935f792;p=thirdparty%2FChart.js.git stop animations when destroying a chart otherwise the animation keeps updating the chart for some time after it was supposed to be destroyed, and when the canvas might have been already reused for a new chart --- diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 296844ea2..83bfdfb32 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -952,6 +952,7 @@ return template(this.options.legendTemplate,this); }, destroy : function(){ + this.stop(); this.clear(); unbindEvents(this, this.events); var canvas = this.chart.canvas;