XCategory Not Refreshing

3 posts, 0 answers
  1. BitWise
    BitWise avatar
    2 posts
    Member since:
    Sep 2008

    Posted 03 Nov 2009 Link to this post

    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. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 06 Nov 2009 Link to this post

    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.
  3. BitWise
    BitWise avatar
    2 posts
    Member since:
    Sep 2008

    Posted 06 Nov 2009 Link to this post

    Thanks much!  I will download them today.

    Appreciate your assistance,
    Bit
Back to Top