ICalculatedSeriesData Interface

The interface should be implemented by an object that provides data for CalculatedSeries.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

Declaration

public interface ICalculatedSeriesData

Related API Members

The following members accept/return ICalculatedSeriesData objects:

Examples

This example demonstrates how to populate a calculated series with data:

<dxc:ChartView.Series>
    <dxc:LineSeries x:Name="stock" DisplayName="Stock">
        <dxc:LineSeries.Data>
            <data:StockSeriesData ItemsSource="{Binding Prices}"/>
        </dxc:LineSeries.Data>
    </dxc:LineSeries>
    <dxc:BollingerBandsIndicator>
        <dxc:BollingerBandsIndicator.Data>
            <data:CalculatedSeriesData Series="{x:Reference stock}">
        </dxc:BollingerBandsIndicator.Data>
    </dxc:BollingerBandsIndicator>
</dxc:ChartView.Series>
public class CalculatedSeriesData : BindableObject, ICalculatedSeriesData {
    public const string SeriesPropertyName = "Series";

    public static readonly BindableProperty SeriesProperty = BindableProperty.Create(
        propertyName: SeriesPropertyName,
        returnType: typeof(Series),
        declaringType: typeof(CalculatedSeriesData),
        defaultValue: null);

    public Series Series {
        get => (Series)GetValue(SeriesProperty);
        set => SetValue(SeriesProperty, value);
    }
}

The code above uses the following classes and members:

Symbol

Description

LineSeries.Data

Gets or sets data the series displays on the chart.

BollingerBandsIndicator

A Bollinger Bands indicator.

CalculatedSeries.Data

Gets or sets data the series displays on the chart.

See Also