Prasad.CH
Prasad.CH

Reputation: 492

Flotr2 - Safely destroy graph element along with all events binded for that element

I'm dynamically creating Flotr2 Graphs and resetting container element with simple empty string.

$("#contrainer").html("");

After creating 10 -15 times, application becoming slower and found that my click and select events on Flotr2 are piling up and not getting cleared..

So, is there any function to call and clean up everything related to container element?

Upvotes: 0

Views: 251

Answers (1)

cesutherland
cesutherland

Reputation: 546

You should call .destroy() on the graph created by Flotr.draw().

Upvotes: 1

Related Questions