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

Chart resize not work

6 Answers 77 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
ITS
Top achievements
Rank 1
ITS asked on 13 Mar 2015, 04:33 PM
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

6 Answers, 1 is accepted

Sort by
0
ITS
Top achievements
Rank 1
answered on 13 Mar 2015, 04:49 PM
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.
0
Danail Vasilev
Telerik team
answered on 16 Mar 2015, 09:27 AM
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.

 
0
ITS
Top achievements
Rank 1
answered on 16 Mar 2015, 01:53 PM
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
0
Danail Vasilev
Telerik team
answered on 17 Mar 2015, 02:00 PM
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.

 
0
hart
Top achievements
Rank 1
Veteran
answered on 22 May 2017, 03:47 PM
Alessio -- when you state "...so we can continue our discussion there.", those of us that come here that have a similar issue cannot see the result.  In the future, can you paste a link to the thread where you "continue on your discussion".
0
Marin Bratanov
Telerik team
answered on 23 May 2017, 07:23 AM

Hello,

I have answered your other thread: http://www.telerik.com/forums/refresh-chart-with-javascript-click-function#aszSwcOAD0GuoxGnIygyHg.

This one moved to a private support ticket, so a public link is not available.

Regards,

Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Chart (HTML5)
Asked by
ITS
Top achievements
Rank 1
Answers by
ITS
Top achievements
Rank 1
Danail Vasilev
Telerik team
hart
Top achievements
Rank 1
Veteran
Marin Bratanov
Telerik team
Share this question
or