I have one Highchart and some other functions in one script. It works fine in Firefox and IE > 8, but with IE 7/8 there is a timing problem, the chart is not shown at all.
My workaround is
setTimeout( function() {
.. my other functions
}, 5000 );
but it is not a good practice and even not sure, if 5000 is enough in every case.
Is there a way to detect, when Highchart is ready and the script can go on with other functions?
You can listen for the chart load event ...
$(document).ready(function () {
$("#container").highcharts({
events: {
load: function () { myOtherFunctions(); }
}
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.