Wait loadGraphs until element has appeared in window

Rendering graphs were very heavy when there are many graphs in same page.
When I added 350 graphs in same section, Google Chrome has crashed.

This pull request change to wait rendering until element has appeared in window.