maui-devexpress-dot-maui-dot-charts-dot-seriestemplateadapter.md
Gets or sets the name of the data source field whose values serve as generated series identifiers. This is a bindable property.
Namespace : DevExpress.Maui.Charts
Assembly : DevExpress.Maui.Charts.dll
NuGet Package : DevExpress.Maui.Charts
public string SeriesDataMember { get; set; }
| Type | Description |
|---|---|
| String |
The data source field name.
|
When a chart [unless you are referring to a very specific chart that you already mentioned, the definite article is incorrect here] generates series from a bound data source, it groups data records into series according to the values of the field assigned to the SeriesDataMember property. You can access an object that specifies this field value when you define a template for generated series (for example, to set a series name displayed in the chart’s legend). To do this, use the SeriesDataMemberValue property of a SeriesTemplateData object that serves as a binding context for the series template (SeriesTemplate).
Note that Charts do not support dot notation (for example, “Object1.Property1”) in the SeriesDataMember property values. In such cases, you can implement the IXYSeriesData interface in objects located in the series data, and call the GetValue method to return values from the nested property.
In this example, the chart generates bar series that visualize GDP per capita by year for the G7 from 2017 to 2019.
Create a data source for series generation. Each object in the list stores a country’s name, year, and the GDP value for this year.
Set the ChartView.SeriesDataTemplate property to a SeriesTemplateAdapter object with the following properties specified (all these settings are required for series generation):
ChartView displays generated series in addition to series that you define in the Series collection.
See Also