this.global_user = this.dygraph_.user_attrs_ || {};
// Get a list of series names.
+
+ var labels = this.find("labels");
+ if (!labels) {
+ return; // -- can't do more for now, will parse after getting the labels.
+ };
+
+ this.reparseForLabels();
+}
+
+DygraphOptions.prototype.reparseSeries = function() {
this.labels = this.find("labels").slice(1);
var axisId = 0; // 0-offset; there's always one.
this.axes.push(axis_opts["y"] || {});
this.axes.push(axis_opts["y2"] || {});
} else {
- this.axes.push(axis_opts["y"] || {}); // There has to be at least one axis.
+ this.axes.push({}); // There has to be at least one axis.
}
};
// User hasn't explicitly set labels, so they're (presumably) in the CSV.
start = 1;
this.attrs_.labels = lines[0].split(delim); // NOTE: _not_ user_attrs_.
+ this.attributes_.reparseSeries();
}
var line_no = 0;