Tooltip delay
I would like the tooltip to have a 'initial delay' - such that it acts more like a typical tooltip. I.e. the tooltip only shows after the mouse is stationary for a specified time, and then tracks data points instantly once shown.
Additionally, I would like the tooltip to be able to be replaced by a callback which provided the point values, such that they could be displayed elsewhere. So, for example, I might want to display the values of the currently tracked points in a div to the right of the graph, while still retaining the crosshair functionality.
Here’s a snippet that adds an optional delay to the initial tooltip display: http://jsfiddle.net/highcharts/xb4ax7v0/
Does this fix your problem?
-
Bonnie Grubbs commented
I took a look at the snippet from Torstein, and unfortunately it would not work for my use case. I would need the tooltip to not display at all if a user were to mouse over the line and not leave the cursor in place for more than a specified amount of time (the delay). Is there a way to do this yet?
-
Anonymous commented
In my view, Torstein's fix is just perfect and is all that is required. Particularly, I like that it only adds a delay when first showing the tooltip but then responds immediately to moving the mouse.
-
@Pieter, IMHO the snippet at at http://jsfiddle.net/highcharts/xb4ax7v0/ is better, because it only adds a delay when first showing the tooltip, but when it has shown, it responds immediately to moving the mouse. That way is feels more responsive.
For now we are reluctant to add it to the core, as it isn't a very frequently requested feature and we have a strict policy of reducing bloat. And the snippet should work well.
-
Pieter commented
Torstein, we now make use of this plugin: http://www.highcharts.com/plugin-registry/single/18/Tooltip%20delay%20before%20display
And the first feedback / comments are very good.
So possible to add this by default to HighStock?
-
Doug Kent commented
I second the request. The concern about unresponsiveness would be addressed by allowing the display delay time to be configurable. As is, the tooltips are displayed too aggressively, appearing with the slightest passing of the mouse over the chart. This is not normal tooltip behavior, which is for the tooltip to appear only after a delay. With a proper delay the page behavior is less cluttered and the user less distracted.
-
Pieter Werbrouck commented
@Torstein: I received this request also from our customers. Can this be an extra option on the tooltip api?
-
Kun Janos commented
@Torstein: I would like the delay for the tooltip too. If someone wants "real time" tooltip, he could set the delay to 0 or null. Using version 2.1.9 I have a case when the chart line is under the legend. Because points of the line are under the legend, when I want to turn on/off series, the tooltip quickly shows up over the legend and legend is not clickable.
-
1. Personally I think this would appear as the chart were unresponsive.
2. Standalone tooltips can be implemented by using mouse events: http://jsfiddle.net/highcharts/Mw8WB/