projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce a TWO_DAILY tick spacing
[dygraphs.git]
/
dygraph-canvas.js
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
4d7a7dd
..
6e503d9
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-599,12
+599,16
@@
DygraphCanvasRenderer._errorPlotter = function(e) {
continue;
}
continue;
}
+ newYs = [ point.y_bottom, point.y_top ];
if (stepPlot) {
if (stepPlot) {
- newYs = [ point.y_bottom, point.y_top ];
prevY = point.y;
prevY = point.y;
- } else {
- newYs = [ point.y_bottom, point.y_top ];
}
}
+
+ // The documentation specifically disallows nulls inside the point arrays,
+ // but in case it happens we should do something sensible.
+ if (isNaN(newYs[0])) newYs[0] = point.y;
+ if (isNaN(newYs[1])) newYs[1] = point.y;
+
newYs[0] = e.plotArea.h * newYs[0] + e.plotArea.y;
newYs[1] = e.plotArea.h * newYs[1] + e.plotArea.y;
if (!isNaN(prevX)) {
newYs[0] = e.plotArea.h * newYs[0] + e.plotArea.y;
newYs[1] = e.plotArea.h * newYs[1] + e.plotArea.y;
if (!isNaN(prevX)) {