Ability to persist tooltip post mouse leave.
Would like the ability to keep the tooltip shown after the users mouse has left the chart. Pretty easy to add.
Add option tooltip.sticky
Line: 1613. Add sticky: false.
Line: 8672. Add && !chart.options.tooltip.sticky.
Line: 8618. Wrap with if statement (!chart.options.tooltip.sticky).
@Seth Is this something you can use? http://jsfiddle.net/highcharts/yrpv0kuc/
It does two things:
- never hide the tooltip
- keep it in a fix position
Along these lines, is there a way to make the tooltip a permanent readout? That is to say I'd like the mouseover values to display information (null when not mouseover) always on page to the right or under the graph in a persistent, non-animated way, no hide effect and no appear, just always there.
Okay, here's an attempt at a plugin implementing pin and unpin methods: http://jsfiddle.net/highcharts/3P4Ug/.
Possible improvements would be to pin also the state of the hovered point, so that the series stops responding to mouseover once the tooltip is pinned.
Another logical behaviour would be the the tooltips are pinned on point click, and that I can move the pinned tooltip on clicking another point. Then clicking outside the series would unpin the tooltip.
Yes, that is exactly what we are thinking about. Do you think that is feasible ?
So you want an API to freeze the tooltip programmatically, one that you can bind to your keystroke event listener?
Yes, We would like to freeze/pin the tooltip to the current hovered point (we have a keybind for it), so you are free to move your cursor around the application (and over the chart) without the tooltip moving or updating anymore.
What do you mean by "focused on"? The current hack prevents it from hiding when you leave the plot area. Do you want to pin the tooltip on click? In that case, we would need a way to unpin it?
That is indeed a much more elegant solution. That makes much of our code simpler. The second part is now to keep the tooltip showing for the specific point that is was focused on. Do you have any tips on how elegantly to stop redrawing the tooltip so it keeps showing for that one certain point on the chart?
I suppose the simplest possible solution will be to override the Tooltip.hide method to do nothing. Does it work for you? See http://jsfiddle.net/highcharts/3P4Ug/ .
We implemented a custom solution without modifying highcharts but it includes a lot of event.StopPropagation on mouse moves which is really dirty and messes with other parts of the code. This feature would be welcomed very much.