X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Frange-selector.js;h=438528ced9fe09af8af36a7444dada94c09fd98d;hb=464b5f504e75c5d2b98eff12b3b8ad520a1729cb;hp=f00a87d2fc69e2d5805f588eb40b0d19536bfd10;hpb=c3491213337a0241107430ad15038c2f18fa5789;p=dygraphs.git diff --git a/plugins/range-selector.js b/plugins/range-selector.js index f00a87d..438528c 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -74,7 +74,7 @@ rangeSelector.prototype.createInterface_ = function() { // Range selector and animatedZooms have a bad interaction. See issue 359. if (this.getOption_('animatedZooms')) { - this.dygraph_.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.'); + Dygraph.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.'); this.dygraph_.updateOptions({animatedZooms: false}, true); } @@ -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.dygraph_.getOptionForAxis('drawAxis', 'x')) { + xAxisLabelHeight = this.getOption_('xAxisHeight') || (this.getOption_('axisLabelFontSize') + 2 * this.getOption_('axisTickSize')); + } this.canvasRect_ = { x: plotArea.x, y: plotArea.y + plotArea.h + xAxisLabelHeight + 4,