Chart resize not work

5 posts, 0 answers
  1. ITS
    ITS avatar
    7 posts
    Member since:
    Feb 2014

    Posted 13 Mar 2015 Link to this post

    Hello,
    when I try to resize a RadHtmlChart after an Ajax request with a js function as the only element to be resized are the series while the wrapper does not change (see attachments).
    I had read the article RadHtmlChart in a Responsive Web page and then I had somethig like this, in order to resize the chart.

    function resizeChart(id) {   
        var RadHtmlChart1 = $find(id);
        if ($(RadHtmlChart1).length) {       
            RadHtmlChart1._chartObject.resize();
             
            RadHtmlChart1.repaint();       
        }
    }

    Taking a look at the DOM Explorer I saw that the problem is in the element SVG.
    The DIV with class k-chart is sized correctly.

    Thanks in advance,

    Alessio

  2. ITS
    ITS avatar
    7 posts
    Member since:
    Feb 2014

    Posted 13 Mar 2015 in reply to ITS Link to this post

    P.S. The RadHtmlChart is added during the ajaxRequest.
    I have an RadListView with the RadHtmlChart inside the ItemTemplate, and when I click a button an RadAjaxManager starts a loading panel. During the Ajax request a new item is added to the listview collection and the chart is rendered. On the client event OnResponseEnd of the RadAjaxManager I fire my js script to resize the chart.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 16 Mar 2015 Link to this post

    Hi Alessio,

    Can you paste the code below that reproduces the issue, so I can investigate it further? For the data-bound control you can hard code some dummy data.

    Regards,
    Danail Vasilev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. ITS
    ITS avatar
    7 posts
    Member since:
    Feb 2014

    Posted 16 Mar 2015 in reply to Danail Vasilev Link to this post

    Hi Danail,
    I cannot post the code because to reproduce the issue  some "private" js should be included and I cannot share with other users.
    Is it possible to upload exclusive to you(telerik) a sample solution?

    Thank you
  6. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 17 Mar 2015 Link to this post

    Hi Alessio,

    I have already replied to the support ticket that was opened by you on the matter, so we can continue our discussion there.

    Regards,
    Danail Vasilev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017