maui-devexpress-dot-maui-dot-charts-dot-seriesdataadapter.md
Gets or sets the name of the data source field that contains series point argument. This is a bindable property.
Namespace : DevExpress.Maui.Charts
Assembly : DevExpress.Maui.Charts.dll
NuGet Package : DevExpress.Maui.Charts
public string ArgumentDataMember { get; set; }
| Type | Description |
|---|---|
| String |
Stores the name of the data field that contains series point argument.
|
To populate the ChartView series with data, you can bind it to a data source. To do this, set the Data property of your series to a SeriesDataAdapter instance and specify this adapter’s properties:
ArgumentDataMember — the data source field that contains argument values. Each data point of a series requires one argument value;This example shows how to provide data for the ChartView series.
Set the Data property of your series to a new SeriesDataAdapter instance. Use the DataSource, ArgumentDataMember, and ValueDataMembers properties to specify the data source for the chart, and to define data source members used to generate series points and labels.
public class MainViewModel {
public List<Gdp> Gdps { get; }
public IList<GdpValue> GdpValueForChina => Gdps[0].Values;
public MainViewModel() {
Gdps = new List<Gdp> {
new Gdp(
"China",
new GdpValue(new DateTime(2017, 1, 1), 19.391),
// ...
new GdpValue(new DateTime(2007, 1, 1), 14.478)
),
};
}
}
// ...
public class GdpValue {
public DateTime Year { get; }
public double Value { get; }
public GdpValue(DateTime year, double value) {
this.Year = year;
this.Value = value;
}
}
<dxc:ChartView>
<dxc:ChartView.BindingContext>
<local:ViewModel/>
</dxc:ChartView.BindingContext>
<dxc:ChartView.Series>
<dxc:LineSeries>
<dxc:LineSeries.Data>
<dxc:SeriesDataAdapter DataSource="{Binding GdpValueForChina}"
ArgumentDataMember="Year">
<dxc:ValueDataMember Type="Value" Member="Value"/>
</dxc:SeriesDataAdapter>
</dxc:LineSeries.Data>
</dxc:LineSeries>
</dxc:ChartView.Series>
</dxc:ChartView>
See Also