X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Frange-selector.js;h=089e64aabd6ce1ec6dfd13d262395c96ed9f26a5;hb=91cf61beb7c8d3836f3d860bf89a4464dabdf709;hp=f00a87d2fc69e2d5805f588eb40b0d19536bfd10;hpb=c3491213337a0241107430ad15038c2f18fa5789;p=dygraphs.git diff --git a/plugins/range-selector.js b/plugins/range-selector.js index f00a87d..089e64a 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,