projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bf8791
)
added superior limit for small scale labels (yocto)
author
David Moena
<dmoena@gmail.com>
Mon, 18 Jun 2012 21:45:37 +0000
(17:45 -0400)
committer
David Moena
<dmoena@gmail.com>
Mon, 18 Jun 2012 21:45:37 +0000
(17:45 -0400)
dygraph-tickers.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-tickers.js
b/dygraph-tickers.js
index
4ab5ebb
..
c80bdf5
100644
(file)
--- 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)),