How do I make the indicator refresh mode "Average" work?

2 posts, 0 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 20 Mar 2011 Link to this post

    I have a guage that gets updated once per second. The value has some flux to it, but I don't want the indicator to jump if the value drops a bit on one sampling out of like 10. What I'm looking for is a steady average of values. What do I need to do to make this average work automatically? Obviously, I could record the past x number of samplings and average them myself, but I understood the indicator refresh mode to behave this way when its set to average. What I'm witnessing now is an indicator jump when I get values such as these:

    Values:

    89
    88
    92
    93
    90
    88
    70 <----Big indicator jump here
    88
    89
    92

    I'm just looking to smooth this out a bit. What are your recommendations?

    Thanks...
    -T

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Mar 2011 Link to this post

    Hi kilhoffer,

    I think you can use the "Average" mode of a gauge indicator.
    Each gauge indicator contains the RefreshMode and RefreshRate properties. When the refresh mode is "Average" then the indicator shows average value for values which were assigned to the Value property of indicator during the time which assigned to the refresh rate.
    I have attached a sample solution which uses the marker and needle indicators. The marker uses values as is, but the needle indicator uses the "Average" feature.

    Also I would recommend to take a look at the "Indicator Refresh Rate" example of our demo application.
    It is placed in the "Visualization -> Gauge -> Features" section. You can start the demo application locally or you can use the following link to start online examples:
    http://demos.telerik.com/wpf/Telerik.Windows.Examples.xbap

    Best wishes,
    Andrey Murzov
    the Telerik team

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top