lib/ui/charting/js_charting.js
function(num) {
            if(typeof num !== "number") {
                return NaN;
            }
            var isNegative = num < 0;
            num = (isNegative) ? -num : num;
            var log = this.logBaseTen(num),
                result = Math.pow(10, Math.floor(log));

            return (isNegative) ? -result: result;
        }
function(num) {
            if(typeof num !== "number") {
                return NaN;
            }
            var isNegative = num < 0;
            num = (isNegative) ? -num : num;
            var log = this.logBaseTen(num),
                result = Math.pow(10, Math.floor(log));

            return (isNegative) ? -result: result;
        }
function ( num ) { if ( typeof num !== "number" ) { return NaN ; } var isNegative = num < 0 ; num = ( isNegative ) ? - num : num ; var log = this . logBaseTen ( num ) , result = Math . pow ( 10 , Math . floor ( log ) ) ; return ( isNegative ) ? - result : result ; }
calculates the power of ten that is closest to but not greater than the number negative numbers are treated as their absolute value and the sign of the result is flipped before returning
calculates the power of ten that is closest to but not greater than the number negative numbers are treated as their absolute value and the sign of the result is flipped before returning