StatisticFormula.Mean Method (String)

.NET Framework (current version)
 

The mean formula calculates the average, or mean, of data stored in a data series.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

Public Function Mean (
	inputSeriesName As String
) As Double

Parameters

inputSeriesName
Type: System.String

Name of the Series object that stores the data for which the mean value is required.

Return Value

Type: System.Double

Mean value of all the data points in the given series.

If named input series does not exist in the SeriesCollection at the time of the method call, an exception is thrown.

The following code demonstrates how to use this formula.

Dim result As Double = Chart1.DataManipulator.Statistics.Mean("Series1")

.NET Framework
Available since 4.0
Return to top
Show: