Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I've been able to find the average/mean of a series using the code:
DataManipulator.Statistics.Mean
and then throwing that to a label/text box.

Is there something similar for other math functions? I'm looking for Sum, Multiplication, etc.

What I have tried:

VB

'Determine the mean
Dim mean As Double = Chart1.DataManipulator.Statistics.Mean(inputSeriesName:="ActualWeight")



'Display mean as text
TxtAverageWeight.Text = mean.ToString("N")
Posted
Updated 8-Mar-18 9:15am

1 solution

A good place to start is the documentation[^]
The thing to consider is - are you genuinely interested in having this in a chart or is it just data - in which case there are all sorts of ways to do what you want
 
Share this answer
 
Comments
Member 13714109 8-Mar-18 15:15pm    
It doesn't have to be part of the chart area. I've been able to come up with a solution using a group by query, but I thought it would be easier to just use some class i wasn't aware of like in my example of 'Statistics.Mean'.
CHill60 9-Mar-18 3:24am    
The Group by query is the best way in my opinion. You might find this article of interest - How to Use Microsoft SQL Server 2012's Window Functions, Part 1 | IT Pro[^]
Maciej Los 8-Mar-18 15:52pm    
5ed!
Member 13714109 9-Mar-18 17:08pm    
Thank you all.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900