X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-options.js;h=b0fad61cc9c4cf01205b54858da562a311004d3e;hb=e8c635cc4e3c265e88f66b46b689e291531330b6;hp=0f90086cb9abed450124304c55293f0fe0aa2851;hpb=7ad6c698d28d7d0f0770e1f6490f1a9649c64b6f;p=dygraphs.git diff --git a/dygraph-options.js b/dygraph-options.js index 0f90086..b0fad61 100644 --- a/dygraph-options.js +++ b/dygraph-options.js @@ -183,7 +183,7 @@ DygraphOptions.prototype.reparseSeries = function() { if (typeof(axis) == 'string') { if (!this.series_.hasOwnProperty(axis)) { - Dygraph.error("Series " + seriesName + " wants to share a y-axis with " + + console.error("Series " + seriesName + " wants to share a y-axis with " + "series " + axis + ", which does not define its own axis."); return; } @@ -290,11 +290,13 @@ DygraphOptions.prototype.getForAxis = function(name, axis) { } // User-specified global options second. - var result = this.getGlobalUser_(name); - if (result !== null) { - return result; + // But, hack, ignore globally-specified 'logscale' for 'x' axis declaration. + if (!(axis === 'x' && name === 'logscale')) { + var result = this.getGlobalUser_(name); + if (result !== null) { + return result; + } } - // Default axis options third. var defaultAxisOptions = Dygraph.DEFAULT_ATTRS.axes[axisString]; if (defaultAxisOptions.hasOwnProperty(name)) { @@ -370,15 +372,6 @@ DygraphOptions.prototype.seriesNames = function() { return this.labels_; }; -/* Are we using this? */ -/** - * Return the index of the specified series. - * @param {string} series the series name. - */ -DygraphOptions.prototype.indexOfSeries = function(series) { - return this.series_[series].idx; -}; - return DygraphOptions; })();