X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=4b4bd30fb2a5405146eb125bd9f6fc648d008dbd;hb=d0e6d1763b71a98f957cd5a690132709e57ba17b;hp=723164014ba86c41bf504d19a1fcbc0f89487fea;hpb=8abce470162e7ea51126b1796ad44aef8aa08359;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 7231640..4b4bd30 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1002,13 +1002,13 @@ Dygraph.prototype.createStatusMessage_ = function() { var div = document.createElement("div"); div.className = "dygraph-legend"; for (var name in messagestyle) { - if (messagestyle.hasOwnProperty(name)) { - try { - div.style[name] = messagestyle[name]; - } catch (e) { - this.warn("You are using unsupported css properties for your browser in labelsDivStyles"); - } - } + if (messagestyle.hasOwnProperty(name)) { + try { + div.style[name] = messagestyle[name]; + } catch (e) { + this.warn("You are using unsupported css properties for your browser in labelsDivStyles"); + } + } } this.graphDiv.appendChild(div); this.attrs_.labelsDiv = div; @@ -1765,10 +1765,16 @@ Dygraph.prototype.updateSelection_ = function() { if (!Dygraph.isOK(pt.canvasy)) continue; var circleSize = this.attr_('highlightCircleSize', pt.name); - ctx.beginPath(); - ctx.fillStyle = this.plotter_.colors[pt.name]; - ctx.arc(canvasx, pt.canvasy, circleSize, 0, 2 * Math.PI, false); - ctx.fill(); + var callback = this.attr_("drawHighlightPointCallback", pt.name); + var color = this.plotter_.colors[pt.name]; + if (!callback) { + callback = Dygraph.Circles.DEFAULT; + } + ctx.lineWidth = this.attr_('strokeWidth', pt.name); + ctx.strokeStyle = color; + ctx.fillStyle = color; + callback(this.g, pt.name, ctx, canvasx, pt.canvasy, + color, circleSize); } ctx.restore();