Tooltip container

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Ben on 28th February 2014
I have a pie chart inside a modal dialog. The modal is scrollable leaving the page background fixed. When scrolling the modal the tooltips stay fixed in position and don't move with the modal. Is there anyway to have the tooltips render in a different container other than the document body.
Posted by Richard on 28th February 2014
Hi there,

They're fixed so that when you show a canvas and it is or one of its parents is fixed the likelihood is that the tooltip is needed to be fixed.

In your case though it sounds like a mix between fixed and not-fixed positioning. You could use the ontooltip function to adjust the position. For a fixed container thats scrollable it might get a trifle involved when it comes to working out the coodinates.

myChart.ontooltip = function (obj)
{
     // Reposition the tooltip here
}






Richard
Posted by Richard on 28th February 2014
Hi there,

Also - the option toolstips.coords.page may help:

obj.Set('toolips.coords.page', true);





Richard
Posted by Ben on 28th February 2014
I need them to be fixed with in a scrollable DIV and get their positioning from that container, not the body of the page. Is that possible?
Posted by Richard on 28th February 2014
Hi there,

Probably - but you'll need to code it in the ontooltip event like I suggested



Richard

Add a reply




« Back to message list