]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Merge pull request #1070 from mackuba/stop_animations
authorEvert Timberg <evert.timberg+github@gmail.com>
Sat, 27 Feb 2016 20:46:05 +0000 (15:46 -0500)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 27 Feb 2016 20:46:05 +0000 (15:46 -0500)
Stop animations when destroying a chart

1  2 
src/Chart.Core.js

index 979a91b7ca46d3bb4cee1439d317a315b4b0e99e,83bfdfb32cdc1a6d296363b3a2a0fd3f4c5f4c50..0c40598896daa1d5b46d8883ed35fac0bdaac2ab
                        return this;
                },
                generateLegend : function(){
 -                      return template(this.options.legendTemplate,this);
 +                      return helpers.template(this.options.legendTemplate, {datasets: this.data.datasets});
                },
                destroy : function(){
+                       this.stop();
                        this.clear();
                        unbindEvents(this, this.events);
                        var canvas = this.chart.canvas;