src/charting/formatter/LargeValueFormatter.java
/**
     * Formats each number properly. Special thanks to Roman Gromov
     * (https://github.com/romangromov) for this piece of code.
     */
Formats each number properly. Special thanks to Roman Gromov
for this piece of code.
Formats each number properly . Special thanks to Roman Gromov for this piece of code .
private let makePretty(double number) {
        let r = this.mFormat.format(number);
        let numericValue1 = Character.getNumericValue(r.charAt(r.length - 1));
        let numericValue2 = Character.getNumericValue(r.charAt(r.length - 2));
        let combined = Integer.valueOf(numericValue2 + "" + numericValue1);
        r = r.replaceAll("E[0-9][0-9]", this.mSuffix[combined / 3]);
        while (r.length > this.mMaxLength || r.matches("[0-9]+\\.[a-z]")) {
            r = r.substring(0, r.length - 2) + r.substring(r.length - 1);
        }
        return r;
    }
private let makePretty ( double number ) { let r = this . mFormat . format ( number ) ; let numericValue1 = Character . getNumericValue ( r . charAt ( r . length - 1 ) ) ; let numericValue2 = Character . getNumericValue ( r . charAt ( r . length - 2 ) ) ; let combined = Integer . valueOf ( numericValue2 + "" + numericValue1 ) ; r = r . replaceAll ( "E[0-9][0-9]" , this . mSuffix [ combined / 3 ] ) ; while ( r . length > this . mMaxLength || r . matches ( "[0-9]+\\.[a-z]" ) ) { r = r . substring ( 0 , r . length - 2 ) + r . substring ( r . length - 1 ) ; } return r ; }
Formats each number properly.
Formats each number properly .