Multiple Series

9 posts, 0 answers
  1. Avi
    Avi avatar
    4 posts
    Member since:
    May 2011

    Posted 17 May 2011 Link to this post

    I am trying to check whether Telerik chart Is the best chart for me.
    I wrote a small application which shows 1000 line graphs with around 1000 points on each graph.
    My performance is really lousy.
    Did anyone ever tried to this ?

    My Mapping is done like this:
                RadChart1.DefaultView.ChartArea.EnableAnimations = false;
                RadChart1.DefaultView.ChartArea.EnableTransitionAnimations = false;
                RadChart1.DefaultView.ChartArea.AxisY.MaxValue = 100;
               
                
                RadChart1.DefaultView.ChartLegend.MaxWidth = 100;
                LineSeriesDefinition lineSeriesDefinition = new LineSeriesDefinition();
                lineSeriesDefinition.ShowItemLabels = false;
                lineSeriesDefinition.ShowPointMarks = false;
                lineSeriesDefinition.ShowItemToolTips = false;
                ItemMapping itemMappingX = new ItemMapping();
                itemMappingX.DataPointMember = DataPointMember.XValue;
                itemMappingX.FieldName = "DoubleData";
                ItemMapping itemMappingY = new ItemMapping();
                itemMappingY.DataPointMember = DataPointMember.YValue;
                itemMappingY.FieldName = "DoubleData2";
                
                for (int i = 0; i < multiObservableCollection.Count; i++)
                {
                    SeriesMapping seriesMapping = new SeriesMapping();
                    seriesMapping.CollectionIndex = i;
                    seriesMapping.SeriesDefinition = lineSeriesDefinition;
                    seriesMapping.ItemMappings.Add(itemMappingX);
                    seriesMapping.ItemMappings.Add(itemMappingY);

                    this.RadChart1.SeriesMappings.Add(seriesMapping);
                    Console.WriteLine(String.Format("Adding series {0}", i+1));
                    
                }
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 19 May 2011 Link to this post

    Hi Avi,

    To see more information on how to improve the performance, please refer to the following article:

    http://www.telerik.com/help/wpf/radchart-performance-tips-and-tricks.html

    With thousands of points, and many series, it is normal to expect a slowdown in the performance of the control. Nevertheless, you can reduce the number of points, or simplify the series, as per the suggestions in the article, to boost the performance. I hope this information helps.

    Greetings,
    Yavor
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Avi
    Avi avatar
    4 posts
    Member since:
    May 2011

    Posted 19 May 2011 Link to this post

    I have seent this article and ofcourse implemented all suggestions and still performance are not good enough, i'll be more specific.
    I need to add 1000 line series of 1000 points each. The series data is never changed and added to the chart once.
    My Code is:
    private void main(){
        ObservableCollection<ObservableCollection<DataClass>> multiObservableCollection = RandomDataGenerator.GetMultiObservableCollection(1000, 1000);
        SetDataMappings(multiObservableCollection );
        this.RadChart1.ItemsSource = multiObservableCollection ;
    }
      
      
    private void SetDataMappings(ObservableCollection<ObservableCollection<DataClass>> multiObservableCollection){
                RadChart1.DefaultView.ChartArea.EnableAnimations = false;
                RadChart1.DefaultView.ChartArea.EnableTransitionAnimations = false;
                RadChart1.DefaultView.ChartArea.AxisY.AutoRange = false;
                RadChart1.DefaultView.ChartArea.AxisY.MaxValue = 1000;
                  
                RadChart1.DefaultView.ChartLegend.MaxWidth = 300;
                LineSeriesDefinition lineSeriesDefinition = new LineSeriesDefinition();
                  
                lineSeriesDefinition.ShowItemLabels = false;
                lineSeriesDefinition.ShowPointMarks = false;
                lineSeriesDefinition.ShowItemToolTips = false;
      
                ItemMapping itemMappingX = new ItemMapping();
                itemMappingX.DataPointMember = DataPointMember.XValue;
                itemMappingX.FieldName = "DoubleData";
                ItemMapping itemMappingY = new ItemMapping();
                itemMappingY.DataPointMember = DataPointMember.YValue;
                itemMappingY.FieldName = "DoubleData2";
                  
                for (int i = 0; i < multiObservableCollection.Count; i++)
                {
                    SeriesMapping seriesMapping = new SeriesMapping();
                    seriesMapping.CollectionIndex = i;
                    seriesMapping.SeriesDefinition = lineSeriesDefinition;
                    seriesMapping.ItemMappings.Add(itemMappingX);
                    seriesMapping.ItemMappings.Add(itemMappingY);
                    this.RadChart1.SeriesMappings.Add(seriesMapping);
                    Console.WriteLine(String.Format("Adding series {0}", i+1));
                      
      
      
                }
    }
    Xaml is :
    <telerik:RadChart x:Name="RadChart1"/>

    Thanks,
    Have a nice day
    Avi
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 20 May 2011 Link to this post

    Hello Avi,

    With such a large number of series and datapoints, the first step in improving the performance would be to reduce them. There is no other optimization, which would allow the control to easily render 1000 series with 1000 points each. Additionally, such a setup would carry practical implications for the end user, since navigating among this layout may be a challenge. Thus, you can consider loading only subsets of the original data, and reloading a different set, when required.
    I hope this information helps.

    Kind regards,
    Yavor
    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
  6. Thorsten
    Thorsten avatar
    8 posts
    Member since:
    Oct 2010

    Posted 20 May 2011 Link to this post

    Avi,

    did you notice that using an ObservableCollection has a significant impact on performance? You should keep in mind that with every item added to the collection the whole series is redrawn (and possibly the whole chart as well). With 1.000 lines and 1.000 data points this would result in far more(!) than 1mio redraws. You should create you own ObservableCollection which suppresses the CollectionChange-event until it is fully populated (see the latest RadChart online documentation and the recommendation regarding using ObservableCollections).

    Maybe this helps you a bit.

    Thorsten
  7. Avi
    Avi avatar
    4 posts
    Member since:
    May 2011

    Posted 22 May 2011 Link to this post

    I don't have this problem since all lists are populated before chart is performed
  8. Avi
    Avi avatar
    4 posts
    Member since:
    May 2011

    Posted 22 May 2011 Link to this post

    Do you have any example on how to simplify the painting template ? maybe changing line series from Shape to Drawing ?
  9. arun
    arun avatar
    3 posts
    Member since:
    May 2015

    Posted 16 Sep 2015 Link to this post

    Hi

     I need to show multiple chart views  at one place .Whether it is achievable by using Report Viewer,Please Suggest.

    With Rgards,

    Arun

  10. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 18 Sep 2015 Link to this post

    Hi Arun,

    You can use Telerik report to display multiple Graph items. For example create a Band report and add a Graph item in the Detail section. There will be rendered Graph items for each record in the report's DataSource.
    The created report can be displayed in a WPF ReportVIewer control.


    If you need further help, please open a support ticket to Telerik Reporting and elaborate on the scenario, data structure and expected layout of the report document.

    Regards,
    Stef
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready