From: David Moena Date: Mon, 18 Jun 2012 21:45:37 +0000 (-0400) Subject: added superior limit for small scale labels (yocto) X-Git-Tag: v1.0.0~261^2^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=1413fab6a392fa99cd9f8a57a958a86f545ad1a7;p=dygraphs.git added superior limit for small scale labels (yocto) --- diff --git a/dygraph-tickers.js b/dygraph-tickers.js index 4ab5ebb..c80bdf5 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -203,7 +203,7 @@ Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) { } if(opts("labelsKMG2")){ tickV = String(tickV.toExponential()); - if(tickV.split('e-').length === 2 && tickV.split('e-')[1] >= 3){ + if(tickV.split('e-').length === 2 && tickV.split('e-')[1] >= 3 && tickV.split('e-')[1] <= 24){ if(tickV.split('e-')[1] % 3 > 0) { label = Dygraph.round_(tickV.split('e-')[0] / Math.pow(10,(tickV.split('e-')[1] % 3)),