projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clean up gviz selection test
[dygraphs.git]
/
dygraph-canvas.js
diff --git
a/dygraph-canvas.js
b/dygraph-canvas.js
index
fc47be5
..
979688d
100644
(file)
--- a/
dygraph-canvas.js
+++ b/
dygraph-canvas.js
@@
-488,7
+488,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = this.options.strokeWidth;
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = this.options.strokeWidth;
- var prevX =
-1
;
+ var prevX =
NaN
;
var prevYs = [-1, -1];
var count = 0;
var yscale = this.layout.yscale;
var prevYs = [-1, -1];
var count = 0;
var yscale = this.layout.yscale;
@@
-503,7
+503,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
count++;
if (point.name == setName) {
if (!isOK(point.y)) {
count++;
if (point.name == setName) {
if (!isOK(point.y)) {
- prevX =
-1
;
+ prevX =
NaN
;
continue;
}
// TODO(danvk): here
continue;
}
// TODO(danvk): here
@@
-511,7
+511,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
point.y + point.errorMinus * yscale ];
newYs[0] = this.area.h * newYs[0] + this.area.y;
newYs[1] = this.area.h * newYs[1] + this.area.y;
point.y + point.errorMinus * yscale ];
newYs[0] = this.area.h * newYs[0] + this.area.y;
newYs[1] = this.area.h * newYs[1] + this.area.y;
- if (
prevX >= 0
) {
+ if (
!isNaN(prevX)
) {
ctx.moveTo(prevX, prevYs[0]);
ctx.lineTo(point.canvasx, newYs[0]);
ctx.lineTo(point.canvasx, newYs[1]);
ctx.moveTo(prevX, prevYs[0]);
ctx.lineTo(point.canvasx, newYs[0]);
ctx.lineTo(point.canvasx, newYs[1]);
@@
-537,7
+537,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = this.options.strokeWidth;
ctx.save();
ctx.strokeStyle = color;
ctx.lineWidth = this.options.strokeWidth;
- var prevX =
-1
;
+ var prevX =
NaN
;
var prevYs = [-1, -1];
var count = 0;
var yscale = this.layout.yscale;
var prevYs = [-1, -1];
var count = 0;
var yscale = this.layout.yscale;
@@
-552,7
+552,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
count++;
if (point.name == setName) {
if (!isOK(point.y)) {
count++;
if (point.name == setName) {
if (!isOK(point.y)) {
- prevX =
-1
;
+ prevX =
NaN
;
continue;
}
var pX = 1.0 + this.layout.minyval * this.layout.yscale;
continue;
}
var pX = 1.0 + this.layout.minyval * this.layout.yscale;
@@
-561,7
+561,7
@@
DygraphCanvasRenderer.prototype._renderLineChart = function() {
var newYs = [ point.y, pX ];
newYs[0] = this.area.h * newYs[0] + this.area.y;
newYs[1] = this.area.h * newYs[1] + this.area.y;
var newYs = [ point.y, pX ];
newYs[0] = this.area.h * newYs[0] + this.area.y;
newYs[1] = this.area.h * newYs[1] + this.area.y;
- if (
prevX >= 0
) {
+ if (
!isNaN(prevX)
) {
ctx.moveTo(prevX, prevYs[0]);
ctx.lineTo(point.canvasx, newYs[0]);
ctx.lineTo(point.canvasx, newYs[1]);
ctx.moveTo(prevX, prevYs[0]);
ctx.lineTo(point.canvasx, newYs[0]);
ctx.lineTo(point.canvasx, newYs[1]);