Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
How do I handle the tooltip shown event and change the text that it displayed
posted

The following event seems not working:

$(document).delegate("#ProChart", "igdatacharttooltipshown", function (evt, ui) {

var tooltip = ui.element;

var item = ui.item;

var newValue = formatDate(item.X);

$(tooltip).text(newValue);
});

Parents
  • 2095
    posted

    Hi Benjamin David,

    Thank you for posting in our community!

    The approach is working well except in few edge scenarios. One of them is when tooltip template is used. Then the events cannot be caught, because it is fired on another layer, not the original one - the layer of the tooltip. I'm sending you our sample, modified to show proper behavior of the igdatacharttooltipshown handler.

    Firstly, execute code as it is. You will see that everything works properly.

    Then uncomment the code, that is placed in the chart declaration. It will implement tooltip layout. Then you will experience one of the scenarios when this event wont be fired.

    index.zip
Reply Children