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

XCategory Not Refreshing

2 Answers 30 Views
Chart
This is a migrated thread and some comments may be shown as answers.
BitWise
Top achievements
Rank 1
BitWise asked on 03 Nov 2009, 04:27 PM
I have a chart with four chart areas where i'm manually adding dataseries.  Based on upon buttons clicked, I clear the data series and manually re-add a new series.  This is working well except one particular case: when the user clicks the button and current chartarea has 3 XCategory datapoints and the new series also as 3 XCategory datapoints, the XCategory values in the 'new' chart are not updated.  Howerver, if the new dataseries has a different number of XCategories then the old datasieres, the chart is update correcty.  Below is snippet of how I'm updating the charts.  Does anyone have any ideas on what I can try?

Thanks!

       void processInboundCalls(object sender, getInboundCallsByWorkgroupCompletedEventArgs e)  
        {  
            ChartAreaInbound.DataSeries.Clear();  
            var res = e.Result.GroupBy(x => x.IDisplayType);  
 
            foreach (IGrouping<string, InboundCall> ic in res)  
            {  
                DataSeries ds = new DataSeries();  
                ds.Definition = new StackedBarSeriesDefinition();  
                ds.LegendLabel = ic.Key.ToString();  
 
                //reverse order  
                for (int i = ic.Count(); i > 0; i--)  
                {  
                    {  
                        DataPoint dp = new DataPoint();  
                        dp.XCategory = ic.ElementAt(i - 1).Name.ToString();  
                        dp.YValue = ic.ElementAt(i - 1).Calls;  
                        ds.Add(dp);                      
                    }  
                }  
                ChartAreaInbound.DataSeries.Add(ds);                  
            }  
            if (ChartAreaInbound.Visibility == Visibility.Collapsed) { ChartAreaInbound.Visibility = Visibility.Visible; }             
        } 

2 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 06 Nov 2009, 09:00 AM
Hello BitWise,

This issue is already fixed in the Q3 release, which is already available for download.

Kind regards,
Evtim
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
BitWise
Top achievements
Rank 1
answered on 06 Nov 2009, 01:13 PM
Thanks much!  I will download them today.

Appreciate your assistance,
Bit
Tags
Chart
Asked by
BitWise
Top achievements
Rank 1
Answers by
Dwight
Telerik team
BitWise
Top achievements
Rank 1
Share this question
or