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

Re-initializing a chart

9 Answers 191 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 03 Jan 2013, 02:13 PM
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);

9 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 03 Jan 2013, 02:30 PM
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!
0
Karl
Top achievements
Rank 1
answered on 03 Jan 2013, 03:18 PM
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


0
Hristo Germanov
Telerik team
answered on 03 Jan 2013, 03:48 PM
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!
0
Karl
Top achievements
Rank 1
answered on 03 Jan 2013, 03:50 PM
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.
0
Hristo Germanov
Telerik team
answered on 03 Jan 2013, 04:01 PM
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!
0
Karl
Top achievements
Rank 1
answered on 03 Jan 2013, 04:31 PM
Sorry I'm not seeing the attachment.
0
Hristo Germanov
Telerik team
answered on 03 Jan 2013, 04:56 PM
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!
0
Karl
Top achievements
Rank 1
answered on 03 Jan 2013, 06:18 PM
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
0
Hristo Germanov
Telerik team
answered on 04 Jan 2013, 08:18 AM
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!
Tags
Charts
Asked by
Karl
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Karl
Top achievements
Rank 1
Share this question
or