1

I would like to know if is it possible to add a custom tooltip on highchart legend during on hover event.

I'm currently able to detect the event but i have no idea on how create the tooltip using highcharts.

My code :

$('.highcharts-legend text').each(function(index, element) {
    $(element).hover(function() {
            alert('Display my custom tooltip');
    });
});
Denis Cucchietti
  • 201
  • 6
  • 16
  • Hi James, there is no answer... – Denis Cucchietti Jan 27 '15 at 16:43
  • 1
    Hmm, I've retracted my close vote as the answer isn't very detailed. I'd suggest using jQuery UI or something similar, as you're already using jQuery. jQuery UI has a `tooltip()` function. – James Donnelly Jan 27 '15 at 16:44
  • I prefer to know if it's possible using highcharts before but no I haven't tried it yet :) thx – Denis Cucchietti Jan 27 '15 at 16:48
  • 1
    Hi, i think this is not possible by using highcharts themself. They do not have a tooltip on the legend, and you can only use the functions they already have implemened. That is why you can bind the event and do what you need. – Asped Jan 27 '15 at 16:56
  • 1
    I'm sorry, but imho my answer is very detailed.. :) However is buggy (closures - just fixed). Just get elements and attach mouseover/mouseout events. – Paweł Fus Jan 28 '15 at 11:47
  • Yes Pawel, i am using your answer with jquery-ui tooltip function and it works like a charm :) – Denis Cucchietti Jan 29 '15 at 12:26

1 Answers1

2

I have gone through the HighCharts docs for this and cannot find anything that would help you implement a tooltip on legend. You will most probably need to use a JQuery tooltip plugin to get your legend on hover tooltip.

Noman Ur Rehman
  • 6,707
  • 3
  • 24
  • 39