X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=dygraph.js;h=f2bcaecba3969eee436bc6ae932cbba2e97e007b;hb=bafe040e9908bc7ab46bab27a7323cf52c4c3dd8;hp=fe677f29688d874c74b06319cff267ae9d6d6108;hpb=5bc3e265be640a29bc57d7d58c059322ab361d63;p=dygraphs.git
diff --git a/dygraph.js b/dygraph.js
index fe677f2..f2bcaec 100644
--- a/dygraph.js
+++ b/dygraph.js
@@ -1699,10 +1699,10 @@ Dygraph.prototype.generateLegendHTML_ = function(x, sel_points) {
var labels = this.attr_('labels');
var html = '';
for (var i = 1; i < labels.length; i++) {
- var c = new RGBColor(this.plotter_.colors[labels[i]]);
+ var c = this.plotter_.colors[labels[i]];
if (i > 1) html += (sepLines ? '
' : ' ');
- html += "—" + labels[i] +
- "";
+ html += "—" + labels[i] +
+ "";
}
return html;
}
@@ -1719,11 +1719,11 @@ Dygraph.prototype.generateLegendHTML_ = function(x, sel_points) {
if (!Dygraph.isOK(pt.canvasy)) continue;
if (sepLines) html += "
";
- var c = new RGBColor(this.plotter_.colors[pt.name]);
+ var c = this.plotter_.colors[pt.name];
var yval = fmtFunc(pt.yval, displayDigits);
// TODO(danvk): use a template string here and make it an attribute.
- html += " "
- + pt.name + ":"
+ html += " "
+ + pt.name + ":"
+ yval;
}
return html;