So, I have a function to preload an element and use "display: none" for a hidden chart
<div class="col-sm-9 topTenWebCus" ></div>
javscript:
$(document).ready(function() { window.setTimeout(function(){ $(".topTenWebCus").css("display","none"); },200); });
And after that I got another onclick function to remove the screen : "none" css
$("#buttonFire").click(function(){ $(".topTenWeb30d").css("display","none"); $(".topTenWebCus").css("display","block"); });
It works great. but it would not resize even if I have a bootstrap embed on the website.
I am going to use an internal function to execute .resize (), but it does not work, is there a better way to fix the resize problem?

Update 1:
The chart will resize if the user changes the zoom speed.
I’ll just find out one important thing: the chart displays correctly if the scaling factor is 100%, but if the user zooms out, the chart does not resize to the appropriate size.
Update2 I am trying to use .show () and .hide () but no luck
Solution example
$("#buttonFire").click(function(){ $(".topTenWeb30d").css("display","none"); $(".topTenWebCus").css("display","block"); chart.flush()
source share