Lag when updating a real-time chart

4 posts, 1 answers
  1. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 05 Aug 2012 Link to this post

    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
  2. Answer
    Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 07 Aug 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jinyan
    Jinyan avatar
    23 posts
    Member since:
    Jul 2012

    Posted 07 Aug 2012 Link to this post

    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.
  5. Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 08 Aug 2012 Link to this post

    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.

Back to Top