New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid date in tooltip #976

Closed
eolsson opened this Issue May 24, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@eolsson
Contributor

eolsson commented May 24, 2012

  1. Start this example: http://jsfiddle.net/5Rd3M/
  2. Hover over the points

Result: The tooltip contains the string "invalid date" even though the data points look ok
Expected: The date of the point.

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi commented May 25, 2012

It happens because a name is supplied for each point, and Highcharts tries to use the name instead of the date. But since this is a datetime axis, the point's key is passed through dateFormat.

The workaround is to remove the point names. If names are required for some other purpose than the tooltip, they can be given a different id and picked up in the formatters accordingly.

A possible fix for this would be to always pass in point.x to the tooltip formatter on datetime axes. It is a rare case though - normally there is no need to use point names on a datetime axis.

@jgrau

This comment has been minimized.

jgrau commented Sep 13, 2012

I believe the correct behaviour would be to not parse the 'name' key through dateFormat when on a datetime axis. If someone uses the name key on a point on a datetime axis it is because they want to display something else than the date on the tooltip.

In my case we are using the point name to display the milestone name on a project burndown graph. It makes more sence to display "Sprint 10 - Code Freeze" than it does to display "September 2012"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment