X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=dygraph.js;h=0b01dd896c61fde477728ad7a70550a0a63c223c;hb=ccecde931c59699a62c0e83651dc28ac680f83ab;hp=0c00c84b650e77d2c37d6ef232c62d05f80aa1f0;hpb=fa460473ef9397759466361ff32de56a4f8fa956;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 0c00c84..0b01dd8 100644 --- a/dygraph.js +++ b/dygraph.js @@ -660,7 +660,7 @@ Dygraph.prototype.xAxisRange = function() { */ Dygraph.prototype.xAxisExtremes = function() { var pad = this.attr_('xRangePad') / this.plotter_.area.w; - if (!this.numRows() > 0) { + if (this.numRows() == 0) { return [0 - pad, 1 + pad]; } var left = this.rawData_[0][0]; @@ -900,17 +900,6 @@ Dygraph.prototype.numRows = function() { }; /** - * Returns the full range of the x-axis, as determined by the most extreme - * values in the data set. Not affected by zooming, visibility, etc. - * TODO(danvk): merge w/ xAxisExtremes - * @return { Array } A [low, high] pair - * @private - */ -Dygraph.prototype.fullXRange_ = function() { - return this.xAxisExtremes(); -}; - -/** * Returns the value in the given row and column. If the row and column exceed * the bounds on the data, returns null. Also returns null if the value is * missing. @@ -2092,7 +2081,7 @@ Dygraph.prototype.addXTicks_ = function() { if (this.dateWindow_) { range = [this.dateWindow_[0], this.dateWindow_[1]]; } else { - range = this.fullXRange_(); + range = this.xAxisExtremes(); } var xAxisOptionsView = this.optionsViewForAxis_('x');