TracksApp/tracks — pull request #201 by doncruse (2013-07-29 00:12:40+00:00)
Title: Fixing bug #1442

This bug was caused when the chart encountered data outside of its
visible range (i.e., the upper bound of the array size). A test was
added that inserts some data from 2 years and 16 months in the past.
The test failed on the old version, throwing exactly the error in bug
report #1442.

The suggested fix is to check whether or not the array index is defined
before sending the "+=" operator. With this change, the test passes.

I also added a test for a completely empty set of data. That passed
before and after my changes.