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

ItemsSource not updating with stacked series.

4 Answers 166 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rex Walker
Top achievements
Rank 1
Rex Walker asked on 10 Nov 2009, 10:12 PM

4 Answers, 1 is accepted

Sort by
0
Rex Walker
Top achievements
Rank 1
answered on 11 Nov 2009, 03:53 PM
I forgot to mention that I am running version 2009.3.1103.1030 of the SL controls.

Working sample using the exact code provided in my previous message is available here:
http://www.rge-inc.com/sl/default.html

We start with no data.
Click the Update button just to update the items source with a new set of data.

The expected action is no change to the chart since the data is virtually identical.

0
Rex Walker
Top achievements
Rank 1
answered on 14 Nov 2009, 04:10 AM
Just wanted to update that I did find a workaround.

Even though clearing the ItemsSource associated with the RadChart by either setting it to null or replacing it causes the graph to generate additional series when it is replaced, the final solution is a little weird.

While this Doesn't Work
radChart1.ItemsSource = Nothing  <has no effect>

This Does Work
sDataValueArea.DataSeries.Clear() <clears the chart to prep for new data>
(where sDataValueArea is a ChartArea within the chart definition).

Is there a possbility in a future version that if the ItemsSource of the main chart is cleared, it effectively clears the associated ChartArea DataSeries as well? 

Thanks...
I think I'm good now on this issue..

0
Giuseppe
Telerik team
answered on 16 Nov 2009, 03:51 PM
Hi Rex,

Indeed we were able to reproduce the problem and unfortunately we must confirm it is a bug within the RadChart control -- the series are not properly cleared on rebind when non-default chart layout is used (UseDefaultLayout = false).

We will log this issue in our bugtracking system and will forward it to our developers so they can address it for the official service pack release (~ first half of December). For the time being we would suggest you to use the workaround you have already discovered on your own.

We have updated your Telerik points for the report as well.


Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marcus Lambert
Top achievements
Rank 1
answered on 25 Nov 2009, 12:16 AM
Hi,
 I have hit this for horizontal bar as well.
Clearling the dataseries is a workaround if you are using code behind, it is more of a problem when you are using MVVM.
The way i have been doing it is trap the binding event on the chart and then clear the DataSeries.
Marcus
Tags
Chart
Asked by
Rex Walker
Top achievements
Rank 1
Answers by
Rex Walker
Top achievements
Rank 1
Giuseppe
Telerik team
Marcus Lambert
Top achievements
Rank 1
Share this question
or