This example generates different Series from a view model. Clicking on a series changes its type from Line to Range Area.
The XYDiagram2D.SeriesItemsSource property defines a collection of objects used to generate Series. To bind series view models to a chart, use the SeriesItemsSource property of a diagram. To configure how the series view model converts to a series on a chart, use SeriesItemTemplate or SeriesItemTemplateSelector. In this example, the Template Selector converts the selected series type from Line to Range Area.
Note that you can bind secondary axes and custom labels using the same approach.
- MainWindow.xaml (VB: MainWindow.xaml)
- MainWindow.xaml.cs (VB: MainWindow.xaml.vb)
- ViewModel.cs (VB: ViewModel.vb)
Chart for WPF - Use the MVVM Binding Style to Generate Series of an Identical View Type
(you will be redirected to DevExpress.com to submit your response)
