From: Evert Timberg Date: Sat, 11 Apr 2015 23:17:30 +0000 (-0400) Subject: Add an option to control the minimum number of animation steps. X-Git-Tag: v2.0-alpha~37^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3579334b297fc477e594724bde5e45022d4c3da;p=thirdparty%2FChart.js.git Add an option to control the minimum number of animation steps. --- diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 2b8aa78f8..6288f9699 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -60,6 +60,9 @@ // Number - Number of animation steps animationSteps: 60, + + // Number - Minimum number of animation steps to complete regardless of frame rate + minAnimationSteps: 10, // String - Animation easing effect animationEasing: "easeOutQuart", @@ -936,7 +939,7 @@ if (this.options.animation && !reflow){ var animation = new Chart.Animation(); animation.numSteps = this.options.animationSteps; - animation.minSteps = 10; // TODO: add an option for this + animation.minSteps = this.options.minAnimationSteps; animation.easing = this.options.animationEasing; // render function @@ -1362,7 +1365,7 @@ Chart.Animation = Chart.Element.extend({ currentStep: null, // the current animation step numSteps: 60, // default number of steps - minSteps: 10, // TODO: create an option for this + minSteps: 10, // default minimum number of steps. easing: "", // the easing to use for this animation render: null, // render function used by the animation service