RadChart and Large Number of DataPoints

4 posts, 0 answers
  1. Patrick Fletcher
    Patrick Fletcher avatar
    19 posts
    Member since:
    Jun 2009

    Posted 11 Nov 2009 Link to this post

    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


  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 16 Nov 2009 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rob Peters
    Rob Peters avatar
    16 posts
    Member since:
    Feb 2010

    Posted 07 Apr 2010 Link to this post

    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
  5. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 12 Apr 2010 Link to this post

    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.
Back to Top