Tooltip hotspots are not removed from prior chart

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 Joachim on 15th May 2016
hi,

I've found a problem which I could not solve yet. Would be great if have a tip how to solve this.

I'm creating a bar-chart with tooltips and a second line chart also with tips. The first chart is loaded and displays (some tooltips are requested). Then the second chart is loaded into the same canvas and is displayed. When I move mousepointer into this chart's area there are hotspots from the first chart's tooltip positions. When I click them they show first chart's tooltips. Looking with firebug I'm seeing those as attached to body-element with div-id "__rgraph_tooltip_cvs.**".

For me it seems that the eventslistener for tooltips of first chart is not unbound, when a second chart is loaded into same canvas.

Is there a way to deregister first chart's listeners or what is the problem?
Posted by Richard on 15th May 2016
Hi there,

Try using the reset function instead of the clear function to forget previous charts:

RGraph.reset(canvas);





Richard
Posted by Joachim on 15th May 2016
hi,

Thank a lot!!!! This fixed it.

Add a reply




« Back to message list