Page 1 of 1

Calculating Average, Standard Deviation and max and min

Posted: Wed Jun 15, 2011 1:14 pm
by 16459037
Hi,

How do I calculate:

Average
Standard Deviation
Max
Min

from a serie ?

If I "zoom" on a part of the serie - how do I then calculate the average, standard deviation and max and min of only the part that has been zoomed ?

Re: Calculating Average, Standard Deviation and max and min

Posted: Thu Jun 16, 2011 8:29 am
by narcis
Hi Friis,
How do I calculate:

Average
Standard Deviation
Max
Min

from a serie ?
You can use TeeChart built-in functions for that. You'll find examples of all of them at All Features\Welcome!\Functions\ in the new features demo, available at TeeChart's program group.
If I "zoom" on a part of the serie - how do I then calculate the average, standard deviation and max and min of only the part that has been zoomed ?
For minimum and maximum you could do something as the local minimum and maximum example suggested here. You could use series' FirstVisibleIndex and LastVisibleIndex as first and last arguments. This is a TeeChart .NET thread but same should apply to VCL version.

For average and standard deviation you could use its Calculate method passing visible indexes as in the local minimum and maximum example.