X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Frange-selector.js;h=d45a29a8dc8bcd122c2a0b5105c6ec446191aa59;hb=b99970f8bc1a0cbec2c00f4eeafc8d97f0883edb;hp=df8f867ca18487571b93e0a446fb08c601b26f3d;hpb=2871344a34358f8c02b909c3d795d4c47db09e0a;p=dygraphs.git 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,