Slow when reloading entities

2 posts, 0 answers
  1. Kyle Watson
    Kyle Watson avatar
    19 posts
    Member since:
    May 2010

    Posted 12 Jan 2011 Link to this post

    I am testing out the chart component and it seems to be quick on the initial load but slow when I clear out the entities and reload them. I am using wcf ria services.

    For example,

    I added a chart in xaml with no settings:

    <telerik:RadChart Height="289" HorizontalAlignment="Left" Margin="365,6,0,0" Name="radChart1" VerticalAlignment="Top" Width="597" />

    Then in the load method of user control

    SeriesMapping seriesMapping = new SeriesMapping();
    seriesMapping.SeriesDefinition = new BarSeriesDefinition();
    seriesMapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("PersonName"));         
    seriesMapping.ItemMappings.Add(new ItemMapping("PersonName", DataPointMember.LegendLabel, ChartAggregateFunction.None));          
    seriesMapping.ItemMappings.Add(new ItemMapping("PersonName", DataPointMember.XValue, ChartAggregateFunction.Count));          
    seriesMapping.ItemMappings.Add(new ItemMapping("Amount", DataPointMember.YValue, ChartAggregateFunction.Sum));
                  
    this.radChart1.SeriesMappings.Add(seriesMapping);     
      
    radChart1.DefaultSeriesDefinition.LegendDisplayMode = LegendDisplayMode.SeriesLabel;
    radChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = true;
    radChart1.ItemSource = Context.DataEntity;

    I am calling context.Clear() for subsequent calls. The data itself is typically less than 50 rows.

    Can you recommend anything to help optimize loads with the chart component?

  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 18 Jan 2011 Link to this post

    Hi Kyle,

    To be able to improve the performance of the Chart you can review our help topic - http://www.telerik.com/help/silverlight/radchart-performance-tips-and-tricks.html. As you are using BarSeries please disable the animation for them like this to boost the performance:
    radChart1.DefaultView.ChartArea.EnableAnimations = false;

    Kind regards,
    Evgenia
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top