This is a migrated thread and some comments may be shown as answers.

Binding 50000 records to Cartesian Chart

3 Answers 88 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Swapnil
Top achievements
Rank 1
Swapnil asked on 07 Oct 2015, 06:14 AM

Hi,

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.

3 Answers, 1 is accepted

Sort by
0
Laurent
Top achievements
Rank 1
answered on 07 Oct 2015, 04:54 PM

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. 

0
Laurent
Top achievements
Rank 1
answered on 08 Oct 2015, 04:00 AM
@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..
0
Martin Ivanov
Telerik team
answered on 09 Oct 2015, 11:51 AM
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.

Regards,
Martin
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
Tags
Chart
Asked by
Swapnil
Top achievements
Rank 1
Answers by
Laurent
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or