Hi,
I had a similar situation some months ago when I needed to "bind" a plot to a custom class which had a set of data representing plot series (mainly StairStepSeries and AreaSeries).
My solution was quite simple: I created a viewmodel which contains one property for each series (List<DataPoint>), binding (in XAML) one OxyPlot series to the corresponding property (the only limitation here is that the series are statically added in XAML but it was ok for my purposes).
To fill in the values I used a simple "SetData" method in my model with my custom class as parameter, the method assigns each "class series" to the corresponding viewmodel property and fills the series using Points.Add(DateTimeAxis.CreateDataPoint(...)) calls.
Hoping to be helpful :)
Bye!
I had a similar situation some months ago when I needed to "bind" a plot to a custom class which had a set of data representing plot series (mainly StairStepSeries and AreaSeries).
My solution was quite simple: I created a viewmodel which contains one property for each series (List<DataPoint>), binding (in XAML) one OxyPlot series to the corresponding property (the only limitation here is that the series are statically added in XAML but it was ok for my purposes).
To fill in the values I used a simple "SetData" method in my model with my custom class as parameter, the method assigns each "class series" to the corresponding viewmodel property and fills the series using Points.Add(DateTimeAxis.CreateDataPoint(...)) calls.
Hoping to be helpful :)
Bye!