RadChart Performance Issue

Thread is closed for posting
6 posts, 0 answers
  1. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 11 Jul 2011 Link to this post

    Dear Telerik Team,

     

    Currently, we are working on our web.app. which utilizes your library for ATLAS. Getting a fast chart component was one of the reasons for our decision to buy your library. Recently, we have using MSChart on certain web page which resides in our solution. However, we are unfavorably surprised, because of your Radchart performance ussues. We are afraid of the incorrect utilization of the RadChart component, therefore we would like to ask you for a proper technique to RadChart preparing as well as rendering.  

     

    Please, have a look at our performance test, which we have made for the comparison.  The test were proceeded on the same machine/IDE/database/.NET framework  (so, on the same HW & SW configuration).

     
    Here is our source code snippet: (Let us remark that we need to specify the color for each of the series.)

     

                foreach (KeyValuePair<DataPointEntity, DataTable> dt in data)

                                {

                         ChartSeries chartSeries = new ChartSeries(radChart.Series);

                         chartSeries.Name = dt.Key.Name;

                         chartSeries.Appearance.ShowLabels = false;

                         chartSeries.SetColors(dt.Key.Color);

                         chartSeries.Appearance.FillStyle.MainColor = dt.Key.Color;

     

                        for (int i = 0; i < dt.Value.Rows.Count; ++i)

                             chartSeries.AddItem(new ChartSeriesItem(
                                 ((DateTime)dt.Value.Rows[i][1]).ToOADate(), (double)dt.Value.Rows[i][2]));

     

                        radChart.Series.Add(chartSeries);

                }

     

    Here are the obtained results:

      

    MSChart:

     Preparing 27 000 values       0:0:0.093 s

     Rendering: 13 s

      

    RadChart:

     Preparing 27 000 values       0:0:2.160 s

     Rendering: 30 s

    What we have made wrong, please?  Must we done this by using a DataTable (or something similar)? 

     

    There is series type “Fastline” in MS chart for faster rendering. Do you have any tip or idea how to set up the RadChart instance to accomplish faster rendering, or is there something for increase the rendering speed?

    We suppose that Silverlight version of the RadChart maybe faster, but we want to build our web app on ATLAS.

     

    Kind Regards,
    SCT

  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 14 Jul 2011 Link to this post

    Hello,

    While databinding is the preferred way to populate RadChart, I do not believe you would gain any significant improvement by switching to it. The problem is in the large amount of data. The product was designed to be easily customizable and feature rich, but this comes at a price -- it does not cope well with extremely busy charts or rendering a lot of graphs on a single page. The control is mostly targeted for casual situations which do not require a high performance solution. There is a trade off to make between high customization and high performance and RadChart is in the rich features path as it is what most of our customers are interested in.

    As 27000 values could hardly be displayed in several hundred pixels, my suggestion would be to process the data before sending it to the chart. You can get a series of values, calculate their average and plot that value within the chart.

    Best regards,
    Ves
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 14 Jul 2011 Link to this post

    Thank you very much for the information.

    Kind regards,
    SCT
  5. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 22 Jul 2011 Link to this post

    Dear Telerik team,

    we apologize for our previous claim about your RadChart performance. We've performed the performance tests again and the results about rendering were nearly the same as by MS Chart. (Meanwhile we found a few of development mistakes by our previous tests).

    Kind regards,
    SCT
  6. SCT
    SCT avatar
    32 posts
    Member since:
    Jun 2012

    Posted 02 Aug 2011 Link to this post

    Hello,

    we've found some time difference by ViewState enabling upon RadChart additionally. By enabled ViewState the chart rendering tooks about
    twofold time consumption in comparison to disabled ViewState.
    Is such behaviour correct, or is there some another factors which decelerate the RadChart rendering?

    Thanks in advance,
    SCT
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 05 Aug 2011 Link to this post

    Hello,

    If your use case permits this, using the control with disabled ViewState will be generally faster (with all other conditions being equal).

    There are two main reasons that cause performance degradation for the chart control -- usage of excessive amount of data points and usage of the automatic algorithm that tries to resolve the overlapping of series item labels (to disable it, set RadChart.IntelligentLabelsEnabled = false). The smart labels algorithm also is significantly more problematic if the chart is populated with lots of data (the performance degrades exponentially and not linearly).


    Regards,
    Giuseppe
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017