Address code review comments
[dygraphs.git] / dygraph.js
index 0c00c84..0b01dd8 100644 (file)
@@ -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<Number> } 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');