This is a migrated thread and some comments may be shown as answers.

Chart Resizing Issue

1 Answer 192 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 06 Jan 2012, 12:19 AM
Hi,

I have kendo ui tab control where each tab has a chart and a grid in it.  The grids are appropriately resizing with the window, however the first displayed chart is filling the display width, but not resizing, while the rest of the charts are in some default size and are not resizing with the window appropriately.

Has anyone encountered this issue, and do they have any advice or suggestions?

Thanks in advance,

Jon

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 10 Jan 2012, 02:45 PM
Hi,

Thank you for contacting us.

The svg is not a block element, thus you need to call refresh() method of the chart which sets width and height to the chart. You can try to hook up to the onresize event of the chart's parent div element where you can call the refresh() method.

$("#chartID").data("kendoChart").refresh()

Regards,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Jon
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Share this question
or