.NET Framework Bookmark and Share   
 index > Chart Controls for .NET Framework > how to calculate average value of rang data
 

how to calculate average value of rang data

I want to calculate the average valueof every period,
for example, the DataPoints are
Time value
1:00 1
1:10 2
1:20 3
1:30 4
1:40 5
1:50 6
2:00 7
I want calculate average by every 30 minutes, so the results would be 2 DataPoint on chart:
1:30 (1+2+3+4)/4
2:00 (5+6+7)/3


How can I do it?

Thanks
Rick Cai

Try something like this:

chart1.DataManipulator.Group("AVE, X:CENTER", 30, IntervalType.Minutes, "MyInputSeriesName", "MyOutputSeriesName");

For this formula to work correctly you sholud be specifying the Time value in DateTime format. You can find more information in Chart Sample Environment: http://code.msdn.microsoft.com/mschart

Alex.


http://blogs.msdn.com/alexgor
Alex Gorev

You can use google to search for other answers

Custom Search

More Threads

• MOSS 2007 Blank Chart Image
• How to auto Fix XAxis
• Data points insertion error. Only 1 Y values can be set for this data series.
• Chart Control with Authentication mode="Forms"
• I need some example for pie chart except miscrosoft windows chart example.
• why Chart control not showing all points labels on x-axis
• Chart controls - text histogram
• Can you anchor the background image for zooming
• How to drawing dynamic Electrocardiogram (ECG)in Chart Control?
• X Axis zoom