SeriesTemplate Class
The series template that the chart uses to generate its series.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v18.1.dll
Declaration
[TypeConverter(typeof(SeriesTemplateTypeConverter))]
public class SeriesTemplate :
SeriesBase,
ISeriesFactory,
ISeriesPointFactory
Related API Members
The following members accept/return SeriesTemplate objects:
Library | Related API Members |
---|---|
WinForms Controls | ChartControl.SeriesTemplate |
Reporting | XRChart.SeriesTemplate |
ASP.NET Web Forms Controls | ChartControlSettings.SeriesTemplate |
WebChartControl.SeriesTemplate |
Remarks
The example uses the following classes and members:
Symbol | Description |
---|---|
ChartControl.SeriesTemplate for WinForms, WebChartControl.SeriesTemplate for ASP.NET WebForms, ChartControlSettings.SeriesTemplate for ASP.NET MVC | Returns the series template the chart uses to generate its series. |
Gets or sets the name of the data member whose values identify series. | |
Gets or sets the name of the data field that contains series point arguments. | |
Gets a collection of the names of data fields that contain series point values. |
Example
The following code demonstrates how to automatically generate series and fill them with data from a data source. It uses the classes and properties below:
Symbol | Description |
---|---|
ChartControl.SeriesTemplate | Returns the series template the chart uses to generate its series. |
SeriesTemplate | The series template that the chart uses to generate its series. |
SeriesTemplate.SeriesDataMember | Gets or sets the name of the data member whose values identify series. |
SeriesBase.ArgumentDataMember | Gets or sets the name of the data field that contains series point arguments. |
SeriesBase.ValueDataMembers | Gets a collection of the names of data fields that contain series point values. |
class GdpInfo {
public int Year { get; set; }
public String Region { get; set; }
public double Value { get; set; }
}
// ...
List<GdpInfo> gdpDataSource = GetGdpDataSource();
chartControl.DataSource = gdpDataSource;
chartControl.SeriesTemplate.SeriesDataMember = "Year";
chartControl.SeriesTemplate.ArgumentDataMember = "Region";
chartControl.SeriesTemplate.ValueDataMembers.AddRange("Value");
// ...
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SeriesTemplate class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.