Reparse when series is set for array data.
authorRobert Konigsberg <konigsberg@google.com>
Sun, 18 Nov 2012 01:10:22 +0000 (19:10 -0600)
committerRobert Konigsberg <konigsberg@google.com>
Sun, 18 Nov 2012 01:10:22 +0000 (19:10 -0600)
dygraph.js

index ae61842..fa8823e 100644 (file)
@@ -3108,8 +3108,9 @@ Dygraph.prototype.parseArray_ = function(data) {
               "in the options parameter");
     this.attrs_.labels = [ "X" ];
     for (i = 1; i < data[0].length; i++) {
-      this.attrs_.labels.push("Y" + i);
+      this.attrs_.labels.push("Y" + i); // Not user_attrs_.
     }
+    this.attributes_.reparseSeries();
   } else {
     var num_labels = this.attr_("labels");
     if (num_labels.length != data[0].length) {