Know when the graphs are loaded

I made an animation with CSS that slides a progress bar when the user scrolls to her. But Js “window.onload” was not working to detect when the document is ready. I used a sleep to see my code working, how can i know if the dash components have already loaded on the browser?