X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=1ac7d43b4fd6d3568e068e37392596e128603a6d;hb=a4aceb34724b0113fbedc3ec204a660300fdfb82;hp=4cee311fbd0c90dfae376bdee51cb99b4d88b3ea;hpb=a716aff2f83602d77caec236eaa9826ecf1b12c8;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 4cee311..1ac7d43 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2452,25 +2452,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', - 'yAxisLabelWidth', - 'axisLabelFontSize', - 'axisTickSize' - ]; - - // 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.