This is a migrated thread and some comments may be shown as answers.
Re-Grouping
2 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
Ashim
Top achievements
Rank 1
Ashim asked on 11 Aug 2011, 10:37 PM
My Data Format Look like This : DDate,Year,Value
in LinqDataSource_Selecting base of RadioButton i get a year , 2years or 3 Years Data
and then if selection is 2 or 3 years data then i set DataGroupColumn = "Year"

if for fist time i select 3 years then move to 2 years or this year every thing is fine

if for fist time i select 2 years then move to this year is Ok, But if go to 3 years chart will show just 2 group in chart and legend !!

if for fist time i select this year , and then i go to 2 or 3 years still will show me 1 group in chart and legend

i can see i chart data items every thing works as the it should be but just it is not showing new groups !!

is there anyway i can force chart to Re-group it's self

2 Answers, 1 is accepted

Sort by
0
Missing User
answered on 17 Aug 2011, 11:39 AM
Hi Ashim,

Based on the supplied information, it is hard to determine what is causing this unwanted behavior. However, you can try to clear the RadChart.Series and rebind the chart after you change the DataSource. In cases, where you don't need grouping, you can clear the data grouping related properties, because the chart will not do this automatically. For example:
...
radChart.Series.Clear();
radChart.DataGroupColumn = "";
radChart.PlotArea.XAxis.DataLabelsColumn = "DDate";
radChart.DataSource = newData;
radChart.DataBind();
...

If the issue persists, could you please elaborate a bit more on the way you setup the RadChart control and implement this functionality? We also appreciate if you open a formal support ticket, and send us a sample runnable project with dummy data, that demonstrates the unwanted behavior. We will review it locally, and advise you further.

Kind regards,
Polina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Ashim
Top achievements
Rank 1
answered on 24 Aug 2011, 11:23 PM
Thanks
radChart.Series.Clear(); 
fix the problem
 
Asked by
Ashim
Top achievements
Rank 1
Answers by
Missing User
Ashim
Top achievements
Rank 1
Share this question
or