Is it possible to make a tooltip stick when clicking on a node in a graph (Flotr2)

95 views Asked by At

I know how to make a customized tooltip using the function trackformatter. Problem is if like in my case, I'm having links in the tooltip, then I would like the tooltip to stick if I click on the graph node and don't dissapear as soon as the mouse cursor have left the node. Is this possible in flotr2 graph library?

        mouse : { track : true,
                     trackFormatter: function(obj){ 
                       return <table><tr>
<td><a href="http://www.w3schools.com/">Visit W3Schools</a></td></tr>   
 <tr><td><a href="http://www.w3schools.com/">Visit W3Schools</a></td></tr></table> } },
1

There are 1 answers

0
Tony On BEST ANSWER

Two possible solutions:

Create a div element that has the tooltip styling set to hide (display: none). Then toggle it in the trackFormatter callback ($('#yourtooltip').show()).

Find the event being triggered to hide the tooltip and silence it.