diff options
author | Richard Wall <richard@the-moon.net> | 2013-06-20 20:19:24 +0100 |
---|---|---|
committer | Richard Wall <richard@the-moon.net> | 2013-06-20 20:19:24 +0100 |
commit | cfdc61b2569cd0ba5734325cf854e93fc12fa8d2 (patch) | |
tree | 03c268cf508104fc6c2be20f2d42a77ca77acb73 | |
parent | 0b4e3665a016d40a1fbf47a8542cb6a022096e1c (diff) |
add extra condition suggested by trubus to take into account negative y axis
-rw-r--r-- | jarmon/jarmon.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index 51b1c33..a7d0adc 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -649,7 +649,8 @@ jarmon.Chart = function(template, recipe, downloader) { }; var si = 0; while(true) { - if( Math.pow(1000, si+1)*0.9 > axis.max ) { + if( Math.pow(1000, si+1)*0.9 > axis.max + && -(Math.pow(1000, si+1))*0.9 < axis.min ) { break; } si++; |