HtmlChart and Ajax

3 posts, 0 answers
  1. Tom Glover
    Tom Glover avatar
    2 posts
    Member since:
    Jun 2009

    Posted 16 Jul 2012 Link to this post


    I'm trying to refresh a set of HtmlCharts on my page in an ajax-style manner i.e. without reloading the whole page. The charts are populated manually in code using a method similar to that shown in

    I'd like to know if it is possible to refresh an HtmlChart using Ajax and the RadAjaxManager? I haven't succeeded yet since it seems to crash the browser (Firefox 13.0.1) when I try. This may be an SVG/browser issue, but I'd like to know if it ought to work?

    Alternatively is it possible to use the loadData() method from javascript and repopulate the chart with data as in the 'Programmatic Creation' sample? I can't see any events available server side to respond to loadData() but I'm not sure how the loadData binding works, so again I'm not sure if I'm going down the wrong path here.

    Any suggestions appreciated
  2. SC
    SC avatar
    9 posts
    Member since:
    Nov 2008

    Posted 18 Jul 2012 Link to this post

    I am also curious as how this works. Currently when i have a postback due to some selection changes the chart just vanishes and other controls just stop working (eg a tabstrip the chart is in).
  3. Slav
    Slav avatar
    1359 posts

    Posted 19 Jul 2012 Link to this post

    Hi guys,

    I tried to reproduce the problem you described, but without success. Please take a look at my test page, compare it with your setup and let me know if there are differences. Basically I have used the implementation from the online demo HtmlChart / Programmatic Creation and I have replaced the UpdatePanel with a RadAjaxManager. The effect appears to be the same as shown in this screen capture.

    As explained in the Client-side API help article, the method loadData invokes a light callback to the server in order to send the chart data to the client, which allows you to populate RadHtmlChart after the page is loaded. If you want to change the data that is loaded in the RadHtmlChart control, you will have to initiate an AJAX request to the server in order to specify the new datasource.

    Please check the attached sample and describe the changes that should be made in order to recreate your scenario. If this is not possible, you can also prepare and send a simple, runnable page that isolates the problem so that I can examine it locally and provide a concrete solution.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top