Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SeriesDataAdapter Class

Provides the data for the ChartView series.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

#Declaration

C#
[ContentProperty("ValueDataMembers")]
public class SeriesDataAdapter :
    DataSourceAdapterBase,
    IXYSeriesData,
    IChangeableSeriesData

#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;
    }
}

#Inheritance

System.Object
See Also