X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;h=b647b7a6716eac0332c5424ed3bff4456d869ba7;hb=ff91a8e4a020453eb8543f9fa866ada9eb36fd7a;hp=0e1bc751ef558e77e02b9179bda4c333268c346b;hpb=20bb4e9d1e3da5bedaee7584a9e91aefd9e3a6d4;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 0e1bc75..b647b7a 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -475,7 +475,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function(opt_seriesName, opt_ for (var j = 0; j < sets.length; j++) { setName = setNames[j]; - if (opt_seriesName && !(is_last && setName == opt_seriesName)) continue; + if (opt_seriesName && setName != opt_seriesName) continue; var points = sets[j]; @@ -507,6 +507,7 @@ DygraphCanvasRenderer.prototype._renderLineChart = function(opt_seriesName, opt_ plotArea: this.area, seriesIndex: j, seriesCount: sets.length, + singleSeriesName: opt_seriesName, allSeriesPoints: sets }); ctx.restore(); @@ -664,6 +665,9 @@ DygraphCanvasRenderer._errorPlotter = function(e) { * @private */ DygraphCanvasRenderer._fillPlotter = function(e) { + // Skip if we're drawing a single series for interactive highlight overlay. + if (e.singleSeriesName) return; + // We'll handle all the series at once, not one-by-one. if (e.seriesIndex !== 0) return;