In draw() we were filtering this.data based on the xScale to avoid drawing things that aren't going to be visible anyways. We were just storing the filtered version locally for the purpose of draw(). However, in getLeftTimeBoundForPoint(), which is accessed from draw(), we were access this.data. Because of this, there was a discrepancy in array length and index numbers of the points. This caused incorrect LeftTimeBound calculations.
In
draw()
we were filteringthis.data
based on thexScale
to avoid drawing things that aren't going to be visible anyways. We were just storing the filtered version locally for the purpose ofdraw()
. However, ingetLeftTimeBoundForPoint()
, which is accessed fromdraw()
, we were accessthis.data
. Because of this, there was a discrepancy in array length and index numbers of the points. This caused incorrect LeftTimeBound calculations.@mnibecker