projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #238 from kberg/master
[dygraphs.git]
/
dygraph-canvas.js
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
fa0dd80
..
99ad493
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-507,6
+507,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function(opt_seriesName, opt_
plotArea: this.area,
seriesIndex: j,
seriesCount: sets.length,
plotArea: this.area,
seriesIndex: j,
seriesCount: sets.length,
+ singleSeriesName: opt_seriesName,
allSeriesPoints: sets
});
ctx.restore();
allSeriesPoints: sets
});
ctx.restore();
@@
-664,6
+665,9
@@
DygraphCanvasRenderer._errorPlotter = function(e) {
* @private
*/
DygraphCanvasRenderer._fillPlotter = 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;
// We'll handle all the series at once, not one-by-one.
if (e.seriesIndex !== 0) return;
@@
-727,13
+731,21
@@
DygraphCanvasRenderer._fillPlotter = function(e) {
'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + fillAlpha + ')';
ctx.fillStyle = err_color;
ctx.beginPath();
'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + fillAlpha + ')';
ctx.fillStyle = err_color;
ctx.beginPath();
- while(iter.hasNext) {
+ var last_x, is_first = true;
+ while (iter.hasNext) {
var point = iter.next();
if (!Dygraph.isOK(point.y)) {
prevX = NaN;
continue;
}
if (stackedGraph) {
var point = iter.next();
if (!Dygraph.isOK(point.y)) {
prevX = NaN;
continue;
}
if (stackedGraph) {
+ if (!is_first && last_x == point.xval) {
+ continue;
+ } else {
+ is_first = false;
+ last_x = point.xval;
+ }
+
currBaseline = baseline[point.canvasx];
var lastY;
if (currBaseline === undefined) {
currBaseline = baseline[point.canvasx];
var lastY;
if (currBaseline === undefined) {