Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / DataSeries Class / Evaluate Method
This argument supports the following string constants:
MIN returns the minimum value contained in the subset
MAX returns the maximum value contained in the subset
AVE returns the average value of the subset
SUM returns the sum of all values contained in the subset
ABSSUM returns the absolute sum of all values contained in the subset
FIRST returns the data series value at the first index in the subset
LAST returns the data series value at the last index in the subset
subset in the data series on which to perform the evaluation
Example


In This Topic
    Evaluate Method
    In This Topic
    This method evaluates a single argument function on the specified data series subset.
    Syntax
    'Declaration
     
    Public Function Evaluate( _
       ByVal singleArgumentFormula As String, _
       ByVal subset As DataSeriesSubset _
    ) As Double
    'Usage
     
    Dim instance As DataSeries
    Dim singleArgumentFormula As String
    Dim subset As DataSeriesSubset
    Dim value As Double
     
    value = instance.Evaluate(singleArgumentFormula, subset)
    public double Evaluate( 
       string singleArgumentFormula,
       DataSeriesSubset subset
    )

    Parameters

    singleArgumentFormula
    This argument supports the following string constants:
    MIN returns the minimum value contained in the subset
    MAX returns the maximum value contained in the subset
    AVE returns the average value of the subset
    SUM returns the sum of all values contained in the subset
    ABSSUM returns the absolute sum of all values contained in the subset
    FIRST returns the data series value at the first index in the subset
    LAST returns the data series value at the last index in the subset
    subset
    subset in the data series on which to perform the evaluation

    Return Value

    the result of the evaluation
    Example
    The following code calculates the sum of the values contained in a data series.
    Dim subset As DataSeriesSubset =  New DataSeriesSubset() 
    subset.AddRange(0, dataseries.Count - 1)
    Dim sum As Double =  dataseries.Evaluate("SUM",subset)
    DataSeriesSubset subset = new DataSeriesSubset();
    subset.AddRange(0, dataseries.Count - 1);
    double sum = dataseries.Evaluate("SUM", subset);
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also