@dpanscik,
window.onload
is executed after the entire page (including all dependent resources like images, stylesheets, and scripts) has finished loading. It ensures that all DOM elements and resources (like the CanvasJS script) are available before the code inside window.onload is run. $(document).ready()
runs as soon as the DOM is fully loaded and ready, but before other resources (like images and external stylesheets) are completely loaded. Please refer to this link for more information about window.onload.
—-
Manoj Mohan
Team CanvasJS