added superior limit for small scale labels (yocto)
authorDavid Moena <dmoena@gmail.com>
Mon, 18 Jun 2012 21:45:37 +0000 (17:45 -0400)
committerDavid Moena <dmoena@gmail.com>
Mon, 18 Jun 2012 21:45:37 +0000 (17:45 -0400)
dygraph-tickers.js

index 4ab5ebb..c80bdf5 100644 (file)
@@ -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)),