X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=4c8c65db1b8f2035af1d19265502741859a3aad8;hb=600da35ccf7fda98f16ba16037c80451ebca9cf5;hp=2135b3cbabf079cf463fa5b7a1aee06fdf9037cf;hpb=cb136039d06ace657e202c884f84569322ffdaf2;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 2135b3c..4c8c65d 100644 --- a/dygraph.js +++ b/dygraph.js @@ -598,6 +598,9 @@ Dygraph.prototype.getOption = function(name, opt_seriesName) { return this.attr_(name, opt_seriesName); }; +Dygraph.prototype.getOptionForAxis = function(name, axis) { + return this.attributes_.getForAxis(name, axis); +} /** * @private * @param String} axis The name of the axis (i.e. 'x', 'y' or 'y2') @@ -2452,12 +2455,13 @@ Dygraph.prototype.computeYAxes_ = function() { this.axes_[axis] = opts; } - // TODO(konigsberg): REMOVE THIS SILLINESS this should just come from DygraphOptions. - // Copy global axis options over to the first axis. - var k = 'valueRange'; - 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.