Hello all,
our application is recording data points from a measurement device. The recorded data points are shown in a 2D and 3D chart. Both charts are within one page, the user can switch between the charts via TabControl.
The problem we have is, that when a new data point is added, the chart, which is not in focus (so not selected by the TabControl) does not update.
For the 2D chart we could solve this issue by executing the following code on the TabControl selection changed event:
this.ViewportManager.BeginInvoke(() => { this.ViewportManager.ZoomExtents(); });
For the 3D chart we tried the same approach with the following code (also exectue on the TabControl selection changed event), the function ScaleWorldDimensions adjust the 3D space based on the recorded data:
Application.Current.Dispatcher.Invoke(() =>
{
if (this.ListDataPoints.Count > 0)
{
this.ScaleWorldDimensions(this.ListDataPoints);
this.Surface3D.ViewportManager.ZoomExtents();
}
});
But unfortunately this does not solve the issue. Therfore the user either has to switch the tab again or add a new data point when the 3D chart is selected.
Do have hints on how to solve this issue?
Thanks for your support in advanced, in case you need furhter information please let me know.
- Thomas Holler asked 12 months ago
- last edited 12 months ago
- You must login to post comments
Hi Thomas
This is a really old version of SciChart so it’s possible this issue is fixed in the latest version.
In any case, you can force a redraw of a 2D or 3D chart by calling
sciChartSurface.InvalidateElement();
Best regards
Aandrew
- Andrew Burnett-Thompson answered 12 months ago
- You must login to post comments
Please login first to submit.