I am writing a program that must screen some charts, the issue is that I do not know how much time a graph expends to load, it could be seconds or minutes. How can I make an appropriate wait, that only continues executing whenever the chart is fully loaded? I have thought about waiting for the load event, but I am not sure how to approach that.