lib/ui/charting/js_charting.js
function(startVal, endVal, drawFn, finishCallback) {
            var animationRange = endVal - startVal,
                duration = 500,
                animationProperties = {
                    duration: duration,
                    step: function(now, fx) {
                        drawFn(startVal + now);
                        this.nudgeChart();
                    }.bind(this)
                };

            if(finishCallback) {
                animationProperties.complete = function() {
                    finishCallback(endVal);
                };
            }
            // for the animation start and end values, use 0 and animationRange for consistency with the way jQuery handles
            // css properties that it doesn't recognize
            $(this.renderTo)
                .stop(true, true)
                .css({'animation-progress': 0})
                .animate({'animation-progress': animationRange}, animationProperties);
        }
function(startVal, endVal, drawFn, finishCallback) {
            var animationRange = endVal - startVal,
                duration = 500,
                animationProperties = {
                    duration: duration,
                    step: function(now, fx) {
                        drawFn(startVal + now);
                        this.nudgeChart();
                    }.bind(this)
                };

            if(finishCallback) {
                animationProperties.complete = function() {
                    finishCallback(endVal);
                };
            }
            // for the animation start and end values, use 0 and animationRange for consistency with the way jQuery handles
            // css properties that it doesn't recognize
            $(this.renderTo)
                .stop(true, true)
                .css({'animation-progress': 0})
                .animate({'animation-progress': animationRange}, animationProperties);
        }
function ( startVal , endVal , drawFn , finishCallback ) { var animationRange = endVal - startVal , duration = 500 , animationProperties = { duration : duration , step : function ( now , fx ) { drawFn ( startVal + now ) ; this . nudgeChart ( ) ; } . bind ( this ) } ; if ( finishCallback ) { animationProperties . complete = function ( ) { finishCallback ( endVal ) ; } ; } // for the animation start and end values, use 0 and animationRange for consistency with the way jQuery handles // css properties that it doesn't recognize $ ( this . renderTo ) . stop ( true , true ) . css ( { 'animation-progress' : 0 } ) . animate ( { 'animation-progress' : animationRange } , animationProperties ) ; }
we can't use the jQuery animation library explicitly to perform complex SVG animations, but we can take advantage of their implementation using a meaningless css property and a custom step function
we can t use the jQuery animation library explicitly to perform complex SVG animations but we can take advantage of their implementation using a meaningless css property and a custom step function