some mobiles don't support log10, so use regular log instead

This commit is contained in:
Jon Atkins 2014-12-19 16:14:46 +00:00
parent 0691d61976
commit cddcb969ea

View File

@ -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;