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

Slow when reloading entities

1 Answer 53 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kyle Watson
Top achievements
Rank 1
Kyle Watson asked on 12 Jan 2011, 11:13 PM
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?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 18 Jan 2011, 07:57 AM
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>>
Tags
Chart
Asked by
Kyle Watson
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or