How to: Bind Series to View Models Using the Item Template
- 5 minutes to read
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.
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-generate-series-of-identical-view-types-using-the-mvvm-binding-style-t513360.