sveinn-steinarsson / flot-downsample

Downsample plugin for Flot charts.
286 stars 39 forks source link

iPhone 6 Issue #15

Closed randdusing closed 9 years ago

randdusing commented 9 years ago

Thanks for the great plugin! I'm receiving a strange error only on iPhone 6 devices, the same exact code works perfectly on earlier iPhone devices: TypeError: undefined is not an object (evaluating 'data[ range_offs ][ 1 ]')on line 82. I can provide more detailed information if needed. The logic is a bit confusing, but it doesn't seem like your code is using anything 'special' that would change between iPhone versions. Maybe their implementation of floor changed?

randdusing commented 9 years ago

Oops, I figured out the issue. I was basing the threshold off the size of the window, which on iOS 6 isn't a whole number. Rounding the threshold value in my code resolved the issue.

sveinn-steinarsson commented 9 years ago

Well done and thanks for the comment!