Binding 50000 records to Cartesian Chart

4 posts, 0 answers
  1. Swapnil
    Swapnil avatar
    6 posts
    Member since:
    Jan 2015

    Posted 07 Oct 2015 Link to this post


    Am trying to plot a chart with 50,000 records.

    The rendering time required is around 8 to 10 seconds,please suggest how do I improve the performance.


    Thanks in advance.

  2. Laurent
    Laurent avatar
    15 posts
    Member since:
    Sep 2015

    Posted 07 Oct 2015 Link to this post

    I have experimented with graphs recently. It seems to me that rendering performance is fine. What gets slow for big amount of data is actually building the data structure that support the chart.

    Suggestion: Have you tried to preallocate your data points? That helped (not much though) in my test app.

    Suggestion for TELERIK devs: Series objects do NOT have a capacity parameter for their constructors. This may be an issue if these collections are based on growable arrays, such as List<>. When the client code adds data points, the corresponding collections will be copied into a new one, the old one thrown away, which takes plenty of time and creates additional memory pressure and needless runs of the GC. 

  3. Laurent
    Laurent avatar
    15 posts
    Member since:
    Sep 2015

    Posted 07 Oct 2015 Link to this post

    @Swapnil: I forgot: Make sure to calculate ​the tick interval according to the number of chart data points. If you don't, you will get dozens of thousands of ticks, slowing everything down..
  4. Martin Ivanov
    Martin Ivanov avatar
    1405 posts

    Posted 09 Oct 2015 Link to this post

    Hello guys,

    By default RadChartView is using WPF FrameworkElements to draw its data points. Drawing such big amount of elements using the XAML rendering engine is quite heavy operation which leads to the long rendering time. However, RadChartView supports couple additional rendering engines for its series - Bitmap and Direct2D. You can read more about them in the Rendering help article. Also, you can consider sampling your data using the ChartDataSource.

    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