Redraw on tooltip hide

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 Mark on 10th July 2013
Hi


I have a chart which uses tooltips on hover rather than the default click. I've noticed that it appears to redraw the entire chart whenever the tooltip is hidden. I have highlighting switched off so as far as I can tell no visual changes occur when the tooltip is removed (other than the removal of the overlaying div). Is it possible to prevent the chart redrawing under these circumstances? The chart can contain several thousand metrics and as fast as canvas is; it would be great to be able to kill this overhead.

Apologies if I've got my wires crossed in any way


Thanks
Mark
Posted by RGraph support on 10th July 2013
Hi there,

There's no way to stop the redrawing - however - one thing that is feasible is to alter the RGraph.Redraw() function to stop it clearing and drawing the canvas. You need to keep in mind though that if you do do that then it will undoubtedly break a lot of other things. Or, now I think about it, you could alter the RGraph.Redraw() function just for that page by reassigning it to an empty function, on that page - like this:

RGraph.Redraw = function ()
{
   // Does nothing
}

That way the redraw function is left intact for other pages. You'll need to also reduce the RGraph.Clear function to an empty shell of it's former self as well but with an Rgraph.HideTooltip() call in it. There's an example of doing this here:

www.rgraph.net/fiddle/view/ac3f875ba2b252dacf29282027fbf789




Richard
Posted by Mark on 10th July 2013
This worked a real treat, thanks for the fast response. I'll take a look at the source to see exactly what I'm overwriting and what implications it may have but as it stands the chart is still working exactly the way I need.


Thanks
Mark

Add a reply




« Back to message list