From cddcb969eabd7ff48fbae694931d0b1aa085fff0 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Fri, 19 Dec 2014 16:14:46 +0000 Subject: [PATCH] some mobiles don't support log10, so use regular log instead --- code/region_scoreboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/region_scoreboard.js b/code/region_scoreboard.js index 0aef1687..575e0e7e 100755 --- a/code/region_scoreboard.js +++ b/code/region_scoreboard.js @@ -69,7 +69,7 @@ function regionScoreboardScoreHistoryChart(result) { // vertical // first we calculate the power of 10 that is smaller than the max limit - var vtickStep = Math.pow(10,Math.floor(Math.log10(max))); + var vtickStep = Math.pow(10,Math.floor(Math.log(max)/Math.log(10))); // this could be between 1 and 10 grid lines - so we adjust to give nicer spacings if (vtickStep < (max/5)) { vtickStep *= 2;