From 003a590a220a9f8c4871e0d690079ff3be729614 Mon Sep 17 00:00:00 2001 From: eichsjul Date: Wed, 20 Mar 2013 15:50:58 +0100 Subject: [PATCH] BUGFIX: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is set to false. --- plugins/range-selector.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/range-selector.js b/plugins/range-selector.js index df8f867..d45a29a 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -176,7 +176,11 @@ rangeSelector.prototype.resize_ = function() { } var plotArea = this.dygraph_.layout_.getPlotArea(); - var xAxisLabelHeight = this.getOption_('xAxisHeight') || (this.getOption_('axisLabelFontSize') + 2 * this.getOption_('axisTickSize')); + + var xAxisLabelHeight = 0; + if(this.getOption_('drawXAxis')){ + xAxisLabelHeight = this.getOption_('xAxisHeight') || (this.getOption_('axisLabelFontSize') + 2 * this.getOption_('axisTickSize')); + } this.canvasRect_ = { x: plotArea.x, y: plotArea.y + plotArea.h + xAxisLabelHeight + 4, -- 2.7.4