Home › forums › Using CanvasJS › Resize existing chart in tabstrip
Tagged: chart, resize, tabstrip
This topic contains 1 reply, has 2 voices, and was last updated by Sunil Urs 3 years, 11 months ago.
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:
What should I do in that situation? How can I get existing chart object to use render() method?
Is there any other solution?
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.
You must be logged in to reply to this topic.