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

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

1 Answer 25 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
kilhoffer
Top achievements
Rank 1
kilhoffer asked on 20 Mar 2011, 07:42 AM
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

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 23 Mar 2011, 11:01 AM
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

Tags
Gauges
Asked by
kilhoffer
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or