From 930e3ad7c5189ff457993b6491430426ea3c9a59 Mon Sep 17 00:00:00 2001 From: Joe Hand Date: Thu, 21 Mar 2013 10:55:05 -0600 Subject: [PATCH] [#286, bugfix]: Fix case for null in Tick labels Trying to run label.toString() on null value in tickFormatter results in error. --- src/view.flot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view.flot.js b/src/view.flot.js index f23abc87..018a2963 100644 --- a/src/view.flot.js +++ b/src/view.flot.js @@ -191,7 +191,7 @@ my.Flot = Backbone.View.extend({ // convert x to a string and make sure that it is not too long or the // tick labels will overlap // TODO: find a more accurate way of calculating the size of tick labels - var label = self._xaxisLabel(x); + var label = self._xaxisLabel(x) || ""; if (typeof label !== 'string') { label = label.toString();