I have an interesting tooltip conundrum

« 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 Matt on 8th June 2013

I’ve been trying to incorporate RGrpah into a JQuery based ’slider’ script (always difficult trying to combine two javascripts). Ive been having fairly good success but ive come up against a problem I just can’t figure out.

The slider script moves horizontally between divs, that are arranged vertically in the code. In each div there are some RGraph canvases. It all works beautifully on the first div however on the second the tooltip divs come up a long way to the right of the scatter points, and on the third div this offset distance doubles again.

My guess is that this is because RGraph thinks the divs and canvases are arranged vertically and so therefore adds an offset distance to get the tooltip divs to show in the right place?

I have been messing around with the RGraph.commom.tooltips js file but I can’t seem to figure out how this offset is done. Does someone know where this is set? Any ideas of how I can try and fix this problem?

Example here: www.stage.mattstubbs.co.uk/5/charts/example4.php?mrn=10000001

(NB: to move between the ‘slider divs’ press the keyboard back arrow, it starts on the last of 3 divs. The tooltips always come up but they are off-screen to the right unless on the first (left most) div)

Thanks in advance for any help,

Posted by RGraph support on 9th June 2013
Hi there,

By the looks of it you might benefit from using the chart.tooltips.coords.page option.

Richard, RGraph support

Add a reply

« Back to message list