From d916677afcd23ccb21a923c2cfce368c2bce310c Mon Sep 17 00:00:00 2001 From: Jeremy Brewer Date: Fri, 18 Feb 2011 11:20:51 -0500 Subject: [PATCH] Small fixes from the last merge update. --- dygraph.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dygraph.js b/dygraph.js index 3e32297..039c6ce 100644 --- a/dygraph.js +++ b/dygraph.js @@ -156,7 +156,7 @@ Dygraph.DEFAULT_ATTRS = { yValueFormatter: function(x, opt_precision) { var s = Dygraph.floatFormat(x, opt_precision); var s2 = Dygraph.intFormat(x); - return s.length <= s2.length ? s : s2; + return s.length < s2.length ? s : s2; }, strokeWidth: 1.0, @@ -2233,13 +2233,14 @@ Dygraph.numericTicks = function(minV, maxV, self, axis_props, vals) { var n = k*k*k*k; for (var j = 3; j >= 0; j--, n /= k) { if (absTickV >= n) { - label = (tickV / n).toPrecision(numDigits) + k_labels[j]; + label = formatter(tickV / n, numDigits) + k_labels[j]; break; } } - ticks[i].label = label; } + ticks[i].label = label; } + return {ticks: ticks, numDigits: numDigits}; }; -- 2.7.4