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

Lag when updating a real-time chart

3 Answers 172 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jinyan
Top achievements
Rank 1
Jinyan asked on 05 Aug 2012, 10:37 PM
Hi all,

I am following the example given in WPF demo -> Controls -> Visualization -> Chart -> Performance -> Live Data, in particular, I am looking at this line of code: 
private void OnTimerTick(object sender, EventArgs e)
{
    this.nowTime = this.nowTime.AddMilliseconds(500);
    this.UpdateData(this.nowTime);
    this.SetUpAxisXRange(this.nowTime);
 
    this.Data = null;
    this.Data = this.cpuData;
}

In my data set, I am updating over 20 line series every second, and resetting the view data with this.Data = null and this.Data = this.cpuData seems to be incredibly slow. Is there a better way to update the chart with live data?

Thanks,
Jin

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosko
Telerik team
answered on 07 Aug 2012, 08:41 AM
Hello Jinyan,

This is typical behavior for RadChart, which slowly becomes obsolete. What I can advice you is to use RadChartView. For the time being, it lacks some of the features that RadChart has, but it has much better overall performance. The latter seems cruicial to your requirements. It also has online demos with code and online documentation. One of the topics is a comparison between RadChart and RadChartView. I hope this prooves useful for you.

Greetings,
Rosko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jinyan
Top achievements
Rank 1
answered on 07 Aug 2012, 05:48 PM
Hi Rosko,

Thanks for the response! I am trying out using RadCartesianChart instead. However, I cannot seem to find the assembly reference for Telerik.Windows.Controls.Chart. I have v.2010.3.1314.35 for my Telerik WPF distribution.
0
Rosko
Telerik team
answered on 08 Aug 2012, 07:37 AM
Hello Jinyan,

RadChartView is not present in this version of the distribution. You wil need the latest version of the binaries as RadChartView is having cosntantly new features added.

All the best,
Rosko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Jinyan
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Jinyan
Top achievements
Rank 1
Share this question
or