Home forums Using CanvasJS Chart rendering problem inside bootstrap modal having multiple nav-tabs

This topic contains 1 reply, has 2 voices, and was last updated by  Priyanka M S 2 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22434

    ayush.sa01
    Member

    I have a bootstrap modal with multiple nav-tabs each containing a chart.
    I have set one of the tab to active.
    So whenever the modal pop ups, the active tab containing the chart renders properly but when switched to other tabs containing chart does not render (width problem).

    • This topic was modified 2 months, 2 weeks ago by  ayush.sa01.
    #22437

    Priyanka M S
    Member

    @ayush.sa01,

    CanvasJS Chart automatically sets the height and width of the chart according to the container’s dimension. If the values are not set for the container, it takes the default values.

    In bootstrap, since the second tab is not displayed initially, chart takes the default values. To solve this issue, the second chart is rendered when the shown.bs.tab event is fired by bootstrap. Please take a look at this jsfiddle.

    If this doesn’t solve your issue, please share a jsfiddle reproducing the issue you are facing.

    __
    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.