morrisjs / morris.js

Pretty time-series line graphs
http://morrisjs.github.com/morris.js/
6.91k stars 1.23k forks source link

When I call window['Morris'][params['type']](params) method, it keeps anything in the global scope? #589

Open NTMan opened 9 years ago

NTMan commented 9 years ago

Hi!

I develop a framework for the SPA (Single Page Application). Pages overloaded simply by innerHTML. I want to ask in advance to be safe, window['Morris'][params['type']](params) keeps some variables in the global scope or not? Can I just remove chart by innerHTML method? Or I need also run some clear method?

example: for AmCharts I need call clear method for properly freed memory.

leriel commented 9 years ago

At this time, there is no proper method for destroying. #569 has some insight into that and possible solutions for you. Extra consideration is needed when using resize: true