projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rv f4e7e19, which was committed by accident
[dygraphs.git]
/
dygraph-canvas.js
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
571191c
..
165d885
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-618,7
+618,7
@@
DygraphCanvasRenderer._errorPlotter = function(e) {
ctx.beginPath();
while (iter.hasNext) {
var point = iter.next();
ctx.beginPath();
while (iter.hasNext) {
var point = iter.next();
- if (
!Dygraph.isOK(point.y
)) {
+ if (
(!stepPlot && !Dygraph.isOK(point.y)) || (stepPlot && !isNaN(prevY) && !Dygraph.isOK(prevY)
)) {
prevX = NaN;
continue;
}
prevX = NaN;
continue;
}
@@
-633,17
+633,15
@@
DygraphCanvasRenderer._errorPlotter = function(e) {
newYs[1] = e.plotArea.h * newYs[1] + e.plotArea.y;
if (!isNaN(prevX)) {
if (stepPlot) {
newYs[1] = e.plotArea.h * newYs[1] + e.plotArea.y;
if (!isNaN(prevX)) {
if (stepPlot) {
- ctx.moveTo(prevX, newYs[0]);
- } else {
ctx.moveTo(prevX, prevYs[0]);
ctx.moveTo(prevX, prevYs[0]);
- }
- ctx.lineTo(point.canvasx, newYs[0]);
- ctx.lineTo(point.canvasx, newYs[1]);
- if (stepPlot) {
- ctx.lineTo(prevX, newYs[1]);
+ ctx.lineTo(point.canvasx, prevYs[0]);
+ ctx.lineTo(point.canvasx, prevYs[1]);
} else {
} else {
- ctx.lineTo(prevX, prevYs[1]);
+ ctx.moveTo(prevX, prevYs[0]);
+ ctx.lineTo(point.canvasx, newYs[0]);
+ ctx.lineTo(point.canvasx, newYs[1]);
}
}
+ ctx.lineTo(prevX, prevYs[1]);
ctx.closePath();
}
prevYs = newYs;
ctx.closePath();
}
prevYs = newYs;