I'm using SciChart v3.1 and I have a requirement to display two charts on the same window (in different tabs), both displaying the same data. I'm plotting data "real time" (adding a new point every second), but I'm finding that new values don't appear on the charts as they are added to the bound series. I've found that I can get the charts to refresh by recreating the VisibleRange that is bound to the charts' Y axis, but this isn't ideal.
Things work fine if there is only one chart on the window, so the issue seems to point to using two charts. Any thoughts? I appreciate I'm on an older version but curious if this is a known issue, and whether there is a workaround.
In SciChart v3, the SeriesSource API binds to an ObservableCollection of IChartSeriesViewModel. Each IChartSeriesViewModel contains both DataSeries and BaseRenderableSeries (which is a framework element).
Hence, your chart actually has WPF FrameworkElements on two charts (two visual parents) - a big no-no for WPF terms.
This was a known issue in SciChart v3, and as a result the SciChart team re-wrote this API in version 4 of SciChart.
The new MVVM API: SeriesBinding, completely separates View from ViewModel so that you can bind multiple charts to the same set of ViewModels and it will work as expected.
Workaround for v3. Ensure you have new IChartSeriesViewModel and RenderableSeries for each chart. DataSeries may still be shared.