danvk/dygraphs — pull request #130 by klausw-g (2012-02-28 04:40:15+00:00)
Title: Fix NaN values confusing closest-point search

The current algorithm was not handling NaN values right, since the "dist
>= max" check is unexpectedly true for dist=NaN. Fix this by reversing
the if logic, and add a regression test for it. (I confirmed that the
test fails for the original code, and passes after the change.)