From: eichsjul Date: Wed, 20 Mar 2013 14:50:58 +0000 (+0100) Subject: BUGFIX: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is X-Git-Tag: v1.0.0~39^2~3 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=003a590a220a9f8c4871e0d690079ff3be729614;p=dygraphs.git BUGFIX: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is set to false. --- 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,