From cfdc61b2569cd0ba5734325cf854e93fc12fa8d2 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Thu, 20 Jun 2013 20:19:24 +0100 Subject: add extra condition suggested by trubus to take into account negative y axis --- jarmon/jarmon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; -- cgit v1.1-4-g5e80