From f6f764eb2da66cd84a3fa66d44af891b50164712 Mon Sep 17 00:00:00 2001 From: Sean Jordan Date: Mon, 28 Jan 2013 16:35:29 -0700 Subject: [PATCH] Fixing bug with default tickFormatter Change-Id: If53fdb1bf9563834c58cf2b569d0e1a6a7155eb8 --- jquery.flot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index 918352a..7c35944 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -1326,7 +1326,7 @@ Licensed under the MIT license. axis.tickFormatter = function (value, axis) { - var factor = Math.pow(10, axis.tickDecimals); + var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1; var formatted = "" + Math.round(value * factor) / factor; // If tickDecimals was specified, ensure that we have exactly that