diff --git a/jquery.flot.js b/jquery.flot.js index 13455bd..52c2d31 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -2100,9 +2100,6 @@ Licensed under the MIT license. function drawAxisLabels() { $.each(allAxes(), function (_, axis) { - if (!axis.show || axis.ticks.length == 0) - return; - var box = axis.box, legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis", layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles, @@ -2111,6 +2108,9 @@ Licensed under the MIT license. surface.removeText(layer); + if (!axis.show || axis.ticks.length == 0) + return; + for (var i = 0; i < axis.ticks.length; ++i) { tick = axis.ticks[i];