this.global_,
this.user_,
this.highlightSeries_];
+ var names = this.seriesNames();
+ for (var i = 0; i < names.length; i++) {
+ var name = names[i];
+ if (this.series_.hasOwnProperty(name)) {
+ optionsDicts.push(this.series_[name].options);
+ }
+ }
for (var i = 0; i < optionsDicts.length; i++) {
var dict = optionsDicts[i];
if (!dict) continue;
*/
DygraphOptions.prototype.warnInvalidOption_ = function(optionName) {
if (!WARNINGS[optionName]) {
+ WARNINGS[optionName] = true;
var isSeries = (this.labels_.indexOf(optionName) >= 0);
if (isSeries) {
console.warn('Use new-style per-series options (saw ' + optionName + ' as top-level options key). See http://bit.ly/1tceaJs');
} else {
console.warn('Unknown option ' + optionName + ' (full list of options at dygraphs.com/options.html');
- // throw "invalid option " + optionName;
+ throw "invalid option " + optionName;
}
- WARNINGS[optionName] = true;
}
};
+// Reset list of previously-shown warnings. Used for testing.
+DygraphOptions.resetWarnings_ = function() {
+ WARNINGS = {};
+};
+
}
return DygraphOptions;