Skip to main content
A newer version of this page is available. .

IXYSeriesData Interface

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

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

public interface IXYSeriesData

Remarks

Objects that implement this interface provide user data values for Area Series, Line Series, Bar Series, Point Series, Bubble Series, Financial Series.

Note that various series can display data with a specific data type only (the GetDataType() method’s return value):

Series Type GetDataType Return Value
Area Series Qualitative, Numeric, DateTime
Line Series Qualitative, Numeric, DateTime
Bar Series Qualitative, Numeric, DateTime
Point Series Qualitative, Numeric, DateTime
Bubble Series WeightedQualitative, WeightedNumeric, WeightedDateTime
Financial Series Financial

The interface provides GetValue and a set of GetArgument methods that return values by which the chart plots a series. Note that, parameters of GetValue method and concrete GetArgument method that the series call depend on data type the interface return:

Data Type

Called Methods and Their Arguments

Qualitative

GetQualitativeArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value.

Numeric

GetNumericArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value.

DateTime

GetDateTimeArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value.

WeightedQualitative

GetQualitativeArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value and Weight.

WeightedNumeric

GetNumericArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value and Weight.

WeightedDateTime

GetDateTimeArgument(Int32); GetValue(ValueType, Int32) with the value type set to Value and Weight.

Financial

GetDateTimeArgument(Int32); GetValue(ValueType, Int32) with the value type set to Open, High, Low and Close.

The series data type should correspond to the chart’s X-axis type. The following table lists axis-data matches:

Axis Series Data Type
QualitativeAxisX Qualitative, WeightedQualitative
NumericAxisX Numeric, WeightedNumeric
DateTimeAxisX DateTime, WeightedDateTime, Financial

Note

The chart creates an X-axis that matches the first series’ data if the chart does not have the specified X-axis.

Example

This example demonstrates how to populate a series with data:

<dxc:ChartView.Series>
    <dxc:LineSeries DisplayName="Stock">
        <dxc:LineSeries.Data>
            <data:StockSeriesData ItemsSource="{Binding Prices}"/>
        </dxc:LineSeries.Data>
    </dxc:LineSeries>
</dxc:ChartView.Series>

The code above uses the following classes and members:

Symbol

Description

LineSeries

Displays data as points connected by a line.

LineSeries.Data

Gets or sets the series data.

IXYSeriesData

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

See Also