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

RadChart and Large Number of DataPoints

3 Answers 184 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Patrick Fletcher
Top achievements
Rank 1
Patrick Fletcher asked on 11 Nov 2009, 04:30 PM
I am working on a application for my current employer, Sikorsky Corp., that is using a collection of 5,338  datapoints that I am binding to a radchart to generate a line serie. The problem is that the Telerik radchart line graph is taking between 7sec - 30sec to render on a machine having a Intel Core 2 Duo CPU executeing at 3.16 GHz, and having 3GB of RAM with Windows XP operating system.  How can I get radchart to perform much better then it is now current performing?  Was radchart line graph capability implemented using straight vanilla  WPF DataTemplate and/or overriding the OnRender method?  If it was implemented using straight vanilla WPF and/or overriding the OnRender method then this would explain the poor performance when dealing with large number of DataPoints.  What will need to be done is to implement the radchart line graph capability using DrawingVisual.  Please see link below on how to use DrawingVisual to implement charts that can deal with very large number of datapoints.

This is the property that I am binding to:

public

 

ObservableCollection<DataPoint> DataPoints

 

{

 

        get

 

        {

 

                return dataPoints;

 

        }

 

        set

 

        {

                dataPoints =

value;

 

                OnPropertyChanged(

"DataPoints");

 

        }

}


I set the ItemsSource property of my telerik chart to this DataPoints property as so:

<

 

telerik:RadChart x:Name="linePlot"  ItemsSource="{Binding Path=DataPoints}" >

 

 

 

        <telerik:RadChart.DefaultView>

 

 

 

            <telerik:ChartDefaultView>

 

 

 

                    <telerik:ChartDefaultView.ChartTitle>

 

 

 

                            <telerik:ChartTitle />

 

 

 

                    </telerik:ChartDefaultView.ChartTitle>

 

 

 

                    <telerik:ChartDefaultView.ChartLegend>

 

 

 

                            <telerik:ChartLegend Width="0" />

 

 

 

                    </telerik:ChartDefaultView.ChartLegend>

 

 

 

                    <telerik:ChartDefaultView.ChartArea>

 

 

 

                            <telerik:ChartArea>

 

 

 

                                    <telerik:ChartArea.AxisY>

 

 

 

                                                <telerik:AxisY MajorGridLinesVisibility="Visible" MinorGridLinesVisibility="Visible" />

 

 

 

                                    </telerik:ChartArea.AxisY>

 

 

 

                                    <telerik:ChartArea.AxisX>

 

 

 

                                                <telerik:AxisX />

 

 

 

                                    </telerik:ChartArea.AxisX>

 

 

 

                            </telerik:ChartArea>

 

 

 

                   </telerik:ChartDefaultView.ChartArea>

 

 

 

            </telerik:ChartDefaultView>

 

 

 

        </telerik:RadChart.DefaultView>

 

 

 

        <telerik:RadChart.SeriesMappings>

 

 

 

                <telerik:SeriesMapping>

 

 

 

                        <telerik:SeriesMapping.SeriesDefinition>

 

 

 

                                  <telerik:LineSeriesDefinition />

 

 

 

                        </telerik:SeriesMapping.SeriesDefinition >

 

 

 

                        <telerik:SeriesMapping.ItemMappings>

 

 

 

                                <telerik:ItemMapping DataPointMember="YValue" 
                                                                  FieldName
="YPlotPoint" />

 

 

 

                                <telerik:ItemMapping DataPointMember="XValue" 
                                                                  FieldName
="XPlotPoint"  />

 

 

 

                        </telerik:SeriesMapping.ItemMappings>

 

 

 

                </telerik:SeriesMapping>

 

 

 

        </telerik:RadChart.SeriesMappings>

 

 

 

</telerik:RadChart>

 


Link to DrawingVisual:

http://msdn.microsoft.com/en-us/magazine/dd483292.aspx


3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 16 Nov 2009, 04:10 PM
Hi Patrick Fletcher,

We must confirm that the 2009.2 813 version of the control introduced a memory leak that is especially problematic in scenarios where the chart is populated with large amount of data. We would suggest you to update to the latest version of the control (Q3 2009) and you should observe a noticeable improvement in the loading time.


Kind regards,
Manuel
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
Rob Peters
Top achievements
Rank 1
answered on 07 Apr 2010, 06:36 AM
Hello Manuel,

There seems to be a memory leak in the WPF Telerik demo with the 100.000+ records.
When you set the slider to the full range and wait 10 hours, the memory from the demo application is up to 2GB
(See Image).

Could i suggest a option? Double clicking the slider would toggle between actual range, and full range?

With kind regards,
Rob
0
Giuseppe
Telerik team
answered on 12 Apr 2010, 09:38 AM
Hi Rob,

Thank you for contacting us.

Unfortunately we were unable to reproduce the problematic behavior on the mentioned example based on your guidelines (note that there is nothing dynamic on this specific example i.e. nothing happens unless user input triggers zoom / scroll, etc). However, it is probable that you have come across a memory leak in the example application itself (probably you have browsed different examples prior to opening the 100,000+ records chart example) and that is what is causing this significant memory usage -- we will forward your feedback to our developers for further review.

As for your feature suggestion -- we have logged it in our public issue tracking system and we will consider it for one of the future releases of the control.


Kind regards,
Freddie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart
Asked by
Patrick Fletcher
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Rob Peters
Top achievements
Rank 1
Share this question
or