Home forums Report Bugs Chart not responsive when hidden

This topic contains 3 replies, has 2 voices, and was last updated by  Anjali 2 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7042

    warria98
    Participant

    I’ve read about this issue before and didn’t know if there was a fix…

    Here’s the fiddle…

    http://jsfiddle.net/NtnSe/5/

    #7065

    Anjali
    Participant

    Hi,

    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.

    __
    Anjali

    #7077

    warria98
    Participant

    Hi Anjali,

    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?

    #7090

    Anjali
    Participant

    Hi,

    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.


    Anjali

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.