projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bugfix: Avoid getting stuck when the first datapoint has a NaN value
[dygraphs.git]
/
dygraph.js
diff --git
a/dygraph.js
b/dygraph.js
index
bc830b2
..
c94536b
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-1552,7
+1552,8
@@
Dygraph.prototype.findClosestPoint = function(domX, domY) {
dy = point.canvasy - domY;
dist = dx * dx + dy * dy;
if (minDist === null || dist < minDist) {
- minDist = dist;
+ if (!isNaN(dist))
+ minDist = dist;
closestPoint = point;
closestSeries = setIdx;
idx = i;