SeriesDataAdapter.ArgumentDataMember Property
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
#Declaration
public string ArgumentDataMember { get; set; }
#Property Value
Type | Description |
---|---|
String | Stores the name of the data field that contains series point argument. |
#Remarks
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:
- DataSource — data source for the chart;
ArgumentDataMember
— the data source field that contains argument values. Each data point of a series requires one argument value;- ValueDataMembers — the collection of data source fields that contain data values for series points.
#Example
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;
}
}