Chart Performance

Thread is closed for posting
2 posts, 0 answers
  1. Marc
    Marc avatar
    17 posts
    Member since:
    May 2009

    Posted 16 May 2011 Link to this post

    We have a com+  component that returns our data from the database in the following format.
    This example represents 2 hours of 15min interval data with 4 data series delimited by commas.

    1/1/2009 12:15:00 AM,263.560000000001,326.10000000149,54.22,73.629
    1/1/2009 12:30:00 AM,254.490000002235,277,54.26,73.629
    1/1/2009 12:45:00 AM,254.369999998509,274.39999999851,54,73.629
    1/1/2009 1:00:00 AM,250.399999999255,253.20000000298,54.62,73.516
    1/1/2009 1:15:00 AM,248.340000002981,246.29999999702,53.96,73.629
    1/1/2009 1:30:00 AM,241.64999999702,286.20000000298,53.87,73.404
    1/1/2009 1:45:00 AM,244.939999999999,311,53.65,73.291
    1/1/2009 2:00:00 AM,241.980000000746,314.79999999702,53.74,73.516

    We currently use a charting component that can produce a chart with 2 data series (Chart Series)
    for 1 year in approximately 4 seconds (From Database query to Client display). That is 4x24x365=35040 points per series.

    Will the RadChart (RadControls for ASP.NET AJAX Q2 2010) give us this kind of performance?
    if so what would be the best method of loading the data into the chart

      1) data binding
      2) for loop loading item data

    I'm currently seeing about a 15-20sec load time for 2 data series and 800 points using the following sample code.

    Thank Marc,

     RadChart1.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;
     RadChart1.PlotArea.YAxis.AutoScale = true;
     RadChart1.PlotArea.YAxis.Step = 6;
     RadChart1.PlotArea.XAxis.AutoScale = true;
     RadChart1.PlotArea.XAxis.Step = 10;
     RadChart1.IntelligentLabelsEnabled = false;
     ChartSeries Series1 = new ChartSeries();
     Series1.Name = "Electric";
     Series1.Type = ChartSeriesType.Line;
     Series1.Appearance.LabelAppearance.Visible = false;
     ChartSeries Series2 = new ChartSeries();
     Series2.Name = "Gas";
     Series2.Type = ChartSeriesType.Line;
     Series2.YAxisType = ChartYAxisType.Secondary;
     Series2.Appearance.LabelAppearance.Visible = false;
     //Load Series Data   
     int xSeries=0;
     foreach (ChartSeries ChartSeries in RadChart1.Series)
         for (int i = 0; i < ProcessData.Length - 2000; i++)
             String[] Channels = ProcessData[i].Split(',');
             ChartSeries.AddItem(Convert.ToDouble(Channels[xSeries + 1]));

  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 19 May 2011 Link to this post

    Hello Marc,
    Usually the biggest culprits with performance are the following:
    -Intelligent labels feature
    -Shadows and other effects applied to the charts

    I have looked through your code and didn't see them explicitly enabled, but still I wanted to make sure I mention those to you. Other than that, it is difficult to say how performance can be improved and there is a final limit to what can be done.

    Most probably, RadChart will have problems with more than 1000 items on screen. While the product was designed to be easily customizable and feature rich it does not cope well with extremely busy charts. We are continually improving performance as we go but still the bottom line is that the control is 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 we've gone the rich features path as it is what most of our customers are interested in.

    If you need to populate the chart with thousands of items, you may consider grouping them first and then sending the modified data to the chart, so the chart items number is decreased.

    Regarding your concrete question about the data-binding, the two approaches should not give significant difference in performance.

    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