[#286, bugfix]: Fix case for null in Tick labels

Trying to run label.toString() on null value in tickFormatter results
in error.
This commit is contained in:
Joe Hand 2013-03-21 10:55:05 -06:00
parent b09fb7124e
commit 930e3ad7c5

View File

@ -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();