ValueDataMemberCollection Class
Stores objects that specify data source fields that contain data for series point values.
Namespace: DevExpress.XamarinForms.Charts
Assembly: DevExpress.XamarinForms.Charts.dll
Declaration
public class ValueDataMemberCollection :
ObservableCollection<ValueDataMember>
Related API Members
The following members return ValueDataMemberCollection objects:
Remarks
ValueDataMemberCollection is a collection of ValueDataMember objects, which provide data for series point values. The number of these objects within the collection varies depending on the series type. For most series, this collection contains only one ValueDataMember. For financial and bubble series, it holds four and two data values respectively:
- High, Low, Open, and Close for financial series;
- Value and Weight for bubble series.
Example
These examples show how to create and configure the data adapter to populate ChartView series of different types with data.
For most series types supported by ChartView (besides financial and bubble charts), specify one ValueDataMember object with the ValueType set to Value:
<dxc:ChartView>
<dxc:ChartView.Series>
<dxc:LineSeries>
<dxc:LineSeries.Data>
<dxc:SeriesDataAdapter DataSource="{Binding GdpValues}"
ArgumentDataMember="Year">
<dxc:SeriesDataAdapter.ValueDataMembers>
<dxc:ValueDataMember Type="Value" Member="Value"/>
</dxc:SeriesDataAdapter.ValueDataMembers>
</dxc:SeriesDataAdapter>
</dxc:LineSeries.Data>
</dxc:LineSeries>
</dxc:ChartView.Series>
</dxc:ChartView>
Note
ValueDataMembers is a content property. You can skip property tags in the markup.
For financial series (CandleStickSeries and StockSeries), specify four ValueDataMember objects with ValueType set to High, Low, Open, and Close:
<dxc:ChartView>
<dxc:ChartView.Series>
<dxc:CandleStickSeries>
<dxc:CandleStickSeries.Data>
<dxc:SeriesDataAdapter DataSource="{Binding StockPrices}"
ArgumentDataMember="Date">
<dxc:SeriesDataAdapter.ValueDataMembers>
<dxc:ValueDataMember Type="High" Member="HighValue" />
<dxc:ValueDataMember Type="Low" Member="LowValue" />
<dxc:ValueDataMember Type="Open" Member="OpenValue" />
<dxc:ValueDataMember Type="Close" Member="CloseValue" />
</dxc:SeriesDataAdapter.ValueDataMembers>
</dxc:SeriesDataAdapter>
</dxc:CandleStickSeries.Data>
</dxc:CandleStickSeries>
</dxc:ChartView.Series>
</dxc:ChartView>
For BubbleSeries, specify two ValueDataMember objects with ValueType set to Value and Weight:
<dxc:ChartView>
<dxc:ChartView.Series>
<dxc:BubbleSeries>
<dxc:BubbleSeries.Data>
<dxc:SeriesDataAdapter DataSource="{Binding HighestGrossingFilms}"
ArgumentDataMember="Date">
<dxc:SeriesDataAdapter.ValueDataMembers>
<dxc:ValueDataMember Type="Value" Member="Value" />
<dxc:ValueDataMember Type="Weight" Member="WorldwideGrosses" />
</dxc:SeriesDataAdapter.ValueDataMembers>
</dxc:SeriesDataAdapter>
</dxc:BubbleSeries.Data>
</dxc:BubbleSeries>
</dxc:ChartView.Series>
</dxc:ChartView>