Skip to main content

Diagram.SeriesItemTemplate Property

Gets or sets the DataTemplate that specifies how to convert a model object to a series.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public DataTemplate SeriesItemTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate that specifies the visualization of the series data objects. The default is null (Nothing in Visual Basic).

Example

This example demonstrates how to bind series view models to a chart. Note that you can bind secondary axes and custom labels using the same approach.

To bind series view models to a chart, use the Diagram.SeriesItemsSource property. To configure how the series view model is converted to a series on a chart, use Diagram.SeriesItemTemplate or Diagram.SeriesItemTemplateSelector. In this example, the Template is used to generate identical series.

View Example

Public Class GdpSeries
    Public Property CountryName() As String
    Public Property Values() As IEnumerable(Of Gdp)
End Class

Public Class Gdp
    Public Property Year() As Integer
    Public Property Value() As Double
End Class

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SeriesItemTemplate property.

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.

See Also