Chart resize - broser

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 06 Sep 2012 Link to this post

    Hi,

    i have a problem with the refresh/resize from the Chart, if i resize the Browser the Cahrt is still in the original size before. I have to click F5 to resize the Chart in the browser.
    I attached my KendoChart Project. Open the index.html in your browser, resize the browser and you will see the problem.

    How can i solve this...

    Best Regards
    Thanks
    Rene
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 10 Sep 2012 Link to this post

    Hi Rene,

    Generally speaking, once rendered the Kendo UI Chart cannot be resized due to the browser limitations. In order to get the desired behavior you can call the refresh() method of the chart's client object, so that the widget is recreated with the new dimensions. Like here: 
    $(window).resize(function(){
        $("#chart").data("kendoChart").refresh();
    });

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top