Nevron .NET Vision
Nevron.Chart.Functions Namespace / NFunctionCalculator Class / Calculate Method
Example


In This Topic
    Calculate Method (NFunctionCalculator)
    In This Topic
    Calculates a function which is defined by the current expression and arguments.
    Syntax
    'Declaration
     
    
    Public Function Calculate() As NDataSeriesDouble
    'Usage
     
    
    Dim instance As NFunctionCalculator
    Dim value As NDataSeriesDouble
     
    value = instance.Calculate()
    public NDataSeriesDouble Calculate()

    Return Value

    The function returns an NDataSeries object which contains the result of the calculation. If the expression is empty the function returns null.
    Exceptions
    ExceptionDescription
    Raised if there are some invalid arguments or a syntax error in the expression.
    Example
    The following code Calculates a function and presents the result data in a line chart.
    // ... setup the lineSeries
    // ... setup the functionCalculator (arguments and expression)
                 
    lineSeries.Values = functionCalculator.Calculate();
    lineSeries.Values.ValueFormatter = new NNumericValueFormatter("0.00");
                
    chartControl.Refresh();
    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