krzysu / flot.tooltip

tooltip plugin for wonderful Flot plotting library
https://github.com/krzysu/flot.tooltip
187 stars 153 forks source link

Incorrect date/time displayed for time axis mode #92

Closed firmanw closed 8 years ago

firmanw commented 10 years ago

Hi, I'm currently using the final version 0.8.4, the tooltip always displayed the date/time before current hovered. For example August being hovered but the tooltip displayed as July. I have tested using the Flot examples http://www.flotcharts.org/flot/examples/axes-time/index.html and get the same result, the quarter and year also incorrect.

flot-tooltip-month flot-tooltip-quarter flot-tooltip-year

mattcameron commented 8 years ago

I also experienced this problem and eventually realised that the problem was due to the difference between my timezone (GMT +11) and the default timezone used by flot.

I solved it by adding xaxis: { timezone: 'browser' }

krzysu commented 8 years ago

@mattcameron thank you for solving the issue, I labeled it for the future reference and I'm closing it for now