HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

Bug: null values are ignored when scaling Y axis #187

Closed mjharte closed 11 years ago

mjharte commented 11 years ago

When using null values for missing data, these are correctly shown as holes in the graphs. But...the vertical scaling does not ignore them and treats them as 0 for the purpose of calculating the min/max range. I think this should be changed so that only non-null values are included and nulls are ignored.

This is especially important when the data range is small and far away from 0, e.g. from 500 to 501. Currently the y-axis is scaled from 0 to 501, squashing the line flat at the top of the graph.

cesutherland commented 11 years ago

Hmm I don't see that behaviour:

http://jsfiddle.net/cesutherland/Pwdsw/

Could you fork with your reproduction?

mjharte commented 11 years ago

Indeed; re-testing with the latest flotr.min.js shows the issue not occurring anymore. I guess this was fixed sometime in the past couple of weeks :)

cesutherland commented 11 years ago

If you encounter it again just let me know!