Commit 2581a4b9 authored by Clemens Stolle's avatar Clemens Stolle

much faster default tickFormatter()

- toFixed() is sloooow
http://jsperf.com/tofixed-vs-factor
parent ca050b26
......@@ -1219,7 +1219,8 @@
};
axis.tickFormatter = function (v, axis) {
return v.toFixed(axis.tickDecimals);
var factor = Math.pow(10, axis.tickDecimals);
return Math.round(v * factor) / factor;
};
}
......
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