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); });
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.
Thank you Petko. Yes, i see it's working with HTML page, but still not working for me in SharePoint 2010. I just copied the same code and no custom template.
I'm not sure why igdatacharttooltipshown event not firing in SharePoint 2010.
Thanks,
Benjamin
It is hard to say what cause this behavior without having any code sample of the page. It is some kind of JS issue, so there is a big change it is not related to SharePoint. Also the chart may be goes into some other edge scenario (like the one described in the previous post).
It is good to see that the event attachment works properly on widget init, but we cannot continue to investigate without page code and scripts provided.
Just FYI - I was able to fix it using the other way round:) not sure why using Delegate didn't work.
// Initialize
$(
".selector"
).igDataChart({
tooltipShown:
function
(evt, ui) {
}
});