Re-initializing a chart

10 posts, 0 answers
  1. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Jan 2013 Link to this post

    I have 2 line charts and one bar chart on the same page. I have buttons underneath each chart that will re-initialize the chart with new data. Everything works but when I press the buttons under each line chart, both charts render again. I only change the data of one of them and recreate it, but the other chart does it's loading animation again, even though nothing has changed in it.

    Here is some pseudo code that I'm using to re-init the chart:

    $('#graph1').empty();
    createGraph('graph1', fullYear, -77);

    The createGraph function does some work to create a settings object and then calls $el.kendoChart(settings);
  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 03 Jan 2013 Link to this post

    Hi Karl Sieburg,

    Unfortunately I am not able to reproduce this issue locally. Could you please send us a simple test project or just a jsbin/jsfiddle test page which reproduces the depicted issue? Thus I will be able to observe the problem and advice you further.

    Note: You doesn't need to call empty() because we will do it for you when you call kendoChart({....}).

    All the best,
    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!
  3. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Jan 2013 Link to this post

    Hi Hristo,

    I think this may be due to the version of dataviz that I'm using. Can you see if you can reproduce with 
    2011.3.1129/kendo.dataviz.min.js?
    
    Thanks
    
    
  4. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 03 Jan 2013 Link to this post

    Hi Karl Sieburg,

    Could you please update to the latest version of Kendo UI and tell me if the problem persists?

    Kind 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!
  5. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Jan 2013 Link to this post

    Unfortunately we are locked into this version by our client. I was wondering if you could confirm for me that the issue is with this version so I can bring this up to the client and hopefully get them to approve using another version.
  6. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 03 Jan 2013 Link to this post

    Hello Karl Sieburg,

    Here is my modified test project with the 2011.3.1129 version of Kendo UI, so could you please examine it and tell me if I am doing something different than you, because I cannot get such problem?

    Greetings,
    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!
  7. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Jan 2013 Link to this post

    Sorry I'm not seeing the attachment.
  8. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 03 Jan 2013 Link to this post

    Hi Karl Sieburg,

    I apologize for missing that in my previous reply. Here is the sample: http://jsbin.com/oveham/3/edit

    Greetings,
    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!
  9. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 03 Jan 2013 Link to this post

    Yeah this is not the same thing. What I'm saying is that my issue is that each chart has its own "Click me!" button underneath it. When I click the button under the line charts it should only refresh the chart it's underneath, but it seems to refresh all charts.

    Please see my edits: http://jsbin.com/oveham/5/edit
  10. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 04 Jan 2013 Link to this post

    Hi Karl Sieburg,

    Unfortunately I can't give you a workaround for this issue.

    In the latest version of Kendo UI this issue is fixed: http://jsbin.com/oveham/10/edit

    Please excuse us for the inconvenience.

    Greetings,
    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!
Back to Top