Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.DataManipulation.v4.4 Assembly / Xceed.Chart.DataManipulation Namespace / FunctionCalculator Class / CalculateXValues Method
Example


In This Topic
    CalculateXValues Method
    In This Topic
    Generates exemplary X-position values for the result elements. It is not compulsory to use the generated x values when presenting a function in the chart, still it is very useful for functions with groupping like AVERAGE, MIN, MAX and SUM.
    Syntax
    'Declaration
     
    Public Function CalculateXValues() As DataSeries
    'Usage
     
    Dim instance As FunctionCalculator
    Dim value As DataSeries
     
    value = instance.CalculateXValues()
    public DataSeries CalculateXValues()

    Return Value

    The function returns an DataSeries object which contains the generated x-position values.
    Example
    The following code sets an expression which calculates the average of every group of 3 successive values. The result of the Calculate function is assigned to the Values data series of a line series. Then the CalculateXValues function is called to generate x-values for the line series.
    functionCalculator.Expression = "AVERAGE(bars ; 3)";
    lineSeries.Values = functionCalculator.Calculate();
    lineSeries.XValues = functionCalculator.CalculateXValues();
    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