Fix label colour selection for sparse data sets.
authorNeal Nelson <neal@makalumedia.com>
Fri, 8 Oct 2010 13:54:04 +0000 (15:54 +0200)
committerNeal Nelson <neal@makalumedia.com>
Fri, 8 Oct 2010 13:54:04 +0000 (15:54 +0200)
dygraph.js

index 98d297a..969584d 100644 (file)
@@ -1056,7 +1056,7 @@ Dygraph.prototype.updateSelection_ = function() {
           replace += "<br/>";
         }
         var point = this.selPoints_[i];
-        var c = new RGBColor(this.colors_[i%clen]);
+        var c = new RGBColor(this.plotter_.colors[point.name]);
         var yval = fmtFunc(point.yval);
         replace += " <b><font color='" + c.toHex() + "'>"
                 + point.name + "</font></b>:"