Home forums Using CanvasJS Resize existing chart in tabstrip

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 1 year, 8 months ago.

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

    Joanna
    Participant

    Hello,

    I have a problem with charts in kendo tabstrip. When I open second tabstrip page charts are not in full size. Here is a screen with chart:

    chart on page in second tabstrip

    What should I do in that situation? How can I get existing chart object to use render() method?
    Is there any other solution?

    #8398

    Sunil Urs
    Keymaster

    Joanna,

    Chart takes the size of its container at the time of rendering. In this case, probably kendo tabstrip hasn’t set its size when chart is being rendered and hence chart has rendered with default size. So, you can keep a reference of the chart and call chart.render() soon after the tab is opened and the chart gets resized according to its container’s size.

    In case you are using our jQuery Charting plugin, you can get reference to chart by doing $(“#chartContainer”).CanvasJSChart(). You can learn more about jQuery plugin here.


    Sunil Urs

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

You must be logged in to reply to this topic.