How to detect when chart is loading?

Read through this thread for possible solutions: