Merge branch 'master' of github.com:kberg/dygraphs into axis-label-font-size
[dygraphs.git] / dygraph.js
index d7c558b..4c8c65d 100644 (file)
@@ -2455,23 +2455,13 @@ Dygraph.prototype.computeYAxes_ = function() {
     this.axes_[axis] = opts;
   }
 
-  // TODO(konigsberg): REMOVE THIS SILLINESS this should just come from DygraphOptions.
-  // TODO(konigsberg): Add tests for all of these.
-
-  // all options which could be applied per-axis:
-  var axisOptions = [
-    'valueRange',
-    'pixelsPerYLabel',
-    'axisLabelFontSize',
-  ];
-
-  // Copy global axis options over to the first axis.
-  for (i = 0; i < axisOptions.length; i++) {
-    var k = axisOptions[i];
-    v = this.attr_(k);
-    if (v) this.axes_[0][k] = v;
-  }
-  // TODO(konigsberg): end of REMOVE THIS SILLINESS
+
+  // Copy global valueRange option over to the first axis.
+  // NOTE(konigsberg): Are these two statements necessary?
+  // I tried removing it. The automated tests pass, and manually
+  // messing with tests/zoom.html showed no trouble.
+  v = this.attr_('valueRange');
+  if (v) this.axes_[0].valueRange = v;
 
   if (valueWindows !== undefined) {
     // Restore valueWindow settings.