HumbleSoftware / Flotr2

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

xaxis.min / xaxis.max breaks the graph when passed a raw date object #302

Open danieljpetersen opened 9 years ago

danieljpetersen commented 9 years ago

It appears that the options xaxis.min and xaxis.max do not work when given a date object.

I've made a fiddle of the problem -- https://jsfiddle.net/jgz0fb28/1/

I eventually figured out that you need to give it date.getTime() for it to work as expected, but this was really non-obvious to me. I feel like it should explicitly handle this case, or at least document it somewhere (did I just miss it?).