Hi,
I’m trying out sciCharts for our MVVM application. From what I can see, if I want to use bindings to attach our view models to a sciChartSurface’s SeriesSource dependency property, they’ll have to derive from ChartSeriesViewModel? As we’ve got quite a few view models, is there a way to avoid that?
Thanks,
Shawn
- sleblanc asked 11 years ago
- You must login to post comments
Hi Shawn,
Actually they just need to implement IChartSeriesViewModel, so you can have your own base class, but we expect certain behaviour to get DataSeries or RenderableSeries pairs.
Alternatively, you can just expose N DataSeries in the ViewModel and bind directly to RenderableSeries declared in XAML, however this method doesn’t allow for adding/removing series dynamically.
Finally, a really good idea we’ve seen (submitting from a customer) was to create an attached behaviour to dynamically grow or shrink RenderableSeries based on a collection of DataSeries it bound to. Sorry, I can’t share an example at this time, but thought you might find it a useful idea.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 11 years ago
- You must login to post comments
Please login first to submit.