IXYSeriesData Interface
The interface should be implemented by an object that provide data for Series.
Namespace: DevExpress.XamarinForms.Charts
Assembly: DevExpress.XamarinForms.Charts.dll
Declaration
public interface IXYSeriesData
Related API Members
The following members return IXYSeriesData objects:
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 |
---|---|
| GetQualitativeArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetNumericArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetDateTimeArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetQualitativeArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetNumericArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetDateTimeArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
| GetDateTimeArgument(Int32);
GetValue(ValueType, Int32) with the value type set to |
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 |
---|---|
Displays data as points connected by a line. | |
| |
| The interface should be implemented by an object that provide data for Series. |