It is currently Tue Sep 02, 2014 7:26 pm Advanced search

Tooltip showing wrong x axis value

Technical support for the Highcharts Stock package

Tooltip showing wrong x axis value

Postby sky82 » Thu Feb 16, 2012 6:28 pm

Hi there,
i'm using HighStock 1.1.3 and i'm experiencing this weird thing: the tooltip shows the wrong x value (the date) while the lower navigator scale shows the right value. However only the navigator is correct, but the value data of the four series inside the tooltip (3.329, 1677, etc.) are the ones of the 11 of february.
Image
It is a bug or it is a weird setting that i'm missing?
Thank you very much

Edit: It happens the same with Highstock v1.0.2.
Moreover, the issue does not happens when the x-axis has hour steps datetime values (e.g. 10 feb 2012 10:00, 10 feb 2012 11:00 etc). It happens when there are fixed day-steps date values (e.g. 10 feb 2012 00:00, 11 feb 2012 00:00)
sky82
 
Posts: 12
Joined: Fri Dec 02, 2011 1:25 pm

Re: Tooltip showing wrong x axis value

Postby hfrntt » Wed Feb 22, 2012 5:29 pm

Could you set up a demo of this chart on http://highcharts.com/jsbin/#javascript,live ?
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Tooltip showing wrong x axis value

Postby sky82 » Mon Feb 27, 2012 1:14 pm

Ok. I'll set up a working demo as soon as possible (for sure before march), i'll let you know
Thank you very much
sky82
 
Posts: 12
Joined: Fri Dec 02, 2011 1:25 pm

Re: Tooltip showing wrong x axis value

Postby sky82 » Tue Feb 28, 2012 12:44 pm

sky82
 
Posts: 12
Joined: Fri Dec 02, 2011 1:25 pm

Re: Tooltip showing wrong x axis value

Postby hfrntt » Fri Mar 02, 2012 4:31 pm

I belive that it's caused by time zone differencies.

The first x value is: 1298847600000, it's: Mon Feb 28 2011 00:00:00 GMT+0100 (CET). So in UTC it's Feb 27 23:00:00. Take a look at the attached image, you can see that points are not exactly above the x axis tick.

I mentioned UTC, because by default Highcharts uses UTC time (to rounds tick position etc.)
Attachments
Screen Shot 2012-03-02 at 15.25.04.png
Screen Shot 2012-03-02 at 15.25.04.png (16.16 KiB) Viewed 775 times
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: Tooltip showing wrong x axis value

Postby sky82 » Mon Mar 05, 2012 4:15 pm

You got it, thank you! All the series x values are just shifted by one hour - these values are obtained directly from Date(YYYY/MM/DD).getTime() function, that being executed in a +1 GMT timezone gives that values.
Thank you again!
sky82
 
Posts: 12
Joined: Fri Dec 02, 2011 1:25 pm


Return to Highstock Usage

Who is online

Users browsing this forum: No registered users and 4 guests