Commit b9733a1b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

stats.html: fix log-scale for negative exponents

parent 1645314c
......@@ -205,7 +205,12 @@ active
function tfmt(d) {
var e = Math.round(Math.log(d) / Math.LN10);
if (Math.abs(Math.log(d) / Math.LN10 - e) < 1e-6)
return 10 + formatPower(e);
{
if (e >= 0)
return 10 + formatPower(e);
else
return 10 + "" + formatPower(e);
}
return null
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment