]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Make sure we always have a valid end angle when reseting the model. Previously this...
authorEvert Timberg <evert.timberg@gmail.com>
Sat, 5 Dec 2015 14:39:25 +0000 (09:39 -0500)
committerEvert Timberg <evert.timberg@gmail.com>
Sat, 5 Dec 2015 14:39:25 +0000 (09:39 -0500)
src/controllers/controller.doughnut.js

index e6992814dab7a162487433849c4d6032b87b53f2..9a7cea9af735f0c347d1561b445e903a681804ee 100644 (file)
                        var resetModel = {
                                x: this.chart.chart.width / 2,
                                y: this.chart.chart.height / 2,
-                               startAngle: Math.PI * -0.5, // use - PI / 2 instead of 3PI / 2 to make animations better. It means that we never deal with overflow during the transition function
+                               startAngle: Math.PI * -0.5, // use - PI / 2 instead of 3PI / 2 to make animations better. It means that we never deal with overflow during the transition function,
+                               endAngle: Math.PI * -0.5,
                                circumference: (this.chart.options.animation.animateRotate) ? 0 : this.calculateCircumference(this.getDataset().data[index]),
                                outerRadius: (this.chart.options.animation.animateScale) ? 0 : this.outerRadius,
-                               innerRadius: (this.chart.options.animation.animateScale) ? 0 : this.innerRadius,
+                               innerRadius: (this.chart.options.animation.animateScale) ? 0 : this.innerRadius
                        };
 
                        helpers.extend(arc, {