Skip to main content

DXCalculatedSeries Class

The base class for all series that calculate its values by another series’s data.

Namespace: DevExpress.Xamarin.iOS.Charts

Assembly: DevExpress.Xamarin.iOS.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

public class DXCalculatedSeries :
    DXSeries

Remarks

The Calculated Series displays values that it computes by data points another series provides. The series utilizes a formula a concrete descendant implements to calculate values. The concrete formula can utilize values of several data points or can use several values of a data point. The source series’ available data types depend on the concrete calculated series.

Note

You should use the DXCalculatedSeries class’ descendants to display calculated data in DXChart instead of utilizing this class directly.

This topic contains general series customization information. Refer to descendant class descriptions to learn more about their data requirements and features.

How to: Specify Series Data

This example demonstrates how to implement the calculated series’ data source:

// In the ViewDidLoad method.
DXStockSeries stockSeries = InitStock();
this.chart.AddSeries(stockSeries);
this.chart.AddSeries(
    new DXMovingAverageIndicator {
        Data = new CalculatedSeriesData(stockSeries),
        ValueLevel = DXValueLevel.Close,
        PointsCount = 21,
        DisplayName = "MA (21)",
        ShowInLegend = true
    }
);
// ...

public class CalculatedSeriesData: DXCalculatedSeriesData {
    DXSeries series;    
    public CalculatedSeriesData(DXSeries series) {
        this.series = series;
    }
    public override DXSeries Source => series;
}

The code above uses the classes and members below:

Symbol

Description

DXMovingAverageIndicator

The Simple Moving Average overlay indicator.

DXSeries.Data

Gets or sets data the series display on the Chart.

DXMovingAverageIndicator.PointsCount

DXMovingAverageIndicator.ValueLevel

Important

The source series’s data must be compatible with the type of a calculated series’ that utilizes this source series. For example, the DXMassIndexIndicator requires the DXFinancialSeriesData source series data type. Refer to calculated seres descendants to learn the source series data limitations.

How to: Configure Series Hint Options

The chart Hint interacts with series to request values to display, to ask series what axis lines the Crosshair should display, etc.

The following code specifies how the hint displays the series:

series.HintOptions = new DXSeriesCrosshairOptions {
    PointTextPattern = "{S}: ${V$##}K",
    ShowInLabel = true,
    AxisLineHidden = false,
    AxisLabelHidden = true,
};

The series can utilize the classes and properties below to configure how the hint displays it:

Symbol

Description

HintOptions

DXSeriesCrosshairOptions

DXSeriesHintOptionsBase.PointTextPattern

DXSeriesCrosshairOptions.ShowInLabel

DXSeriesCrosshairOptions.AxisLineHidden

DXSeriesCrosshairOptions.AxisLabelHidden

Note

Properties the DXSeriesCrosshairOptions class introduces do not affect the hint when the hint’s Behavior is set to DXTooltipHintBehavior. At the same time, all properties the class inherits from its parent influence the hint.

Implements

IEquatable<Foundation.NSObject>
Foundation.INSObjectProtocol
ObjCRuntime.INativeObject
See Also