Home › forums › Report Bugs › Chart not responsive when hidden
I’ve read about this issue before and didn’t know if there was a fix…
Here’s the fiddle…
You just need to call chart.render() after you are going to show the div in which you are plotting the chart. Here is an example.
I have tried this and it didn’t seem to work, but I will try again. I read something about the latest beta solving this issue though?
What is happening here is that, when the container is hidden, it’s height and width will be 0 and hence chart takes default width and height of 500 x 400. So You just need to call chart.render() after making the container visible so that chart updates its width and height. We have demonstrated the same in the previous example.
You must be logged in to reply to this topic.