DataLogger has a strange behaviour when visualizing data
cataclism opened this issue · 2 comments
Question:
I'm using a DataLogger to log real time data thatt I obtain from a Server. ( I've started looking at the example provided in the demos)
I have two actions to perform on it, start that as the name suggests start the log and stop.
When i click stop the data acquisition stops and i'd like to be able to perform actions on the plot, such as ZoomIn and ZoomOut and move left and right.
I've called my variable Logger = formsPlot1.Plot.Add.DataLogger();
(So that you can know what I am referring to)
The problem is that when I per form the ZoomIn as long as the Logger remains within the plottable areea there are no problems, but as soon as it goes beyond it, the data gets automatically fully showed, "bouncing back" (see video)
Please nothe that the button I am clicking performs a formsPlot1.Plot.Axes.Zoom(1.2, 1); formsPlot1.Refresh();
PXL_20240507_083050811.mp4
For what is concerning the code i an using ViewSlide() for visualization and then when I stop the data collection i pass to ViewFull(), otherwise when I try to do just an easy autoscaleX orY the plot becomes blank.
Last note to successfully be able to visualize data I had to set formsPlot1.Plot.MoveToFront(Logger);
If I do not do it I obtain:
Moreover I've found some issues with formsPlot1.Refresh();
that does refresh the plot as it should, leading to situations as the pic above
ScottPlot Version: 5.0.34
.Net Framework 4.6.2
C# version
Follow up:
I've managed to obtain a workaround to better visualize the data, which is that to insert all the data in a SignalXY, and toggle the visibility of the logger off. It works but i need to perform a formsPlot1.Plot.Clear()
.
When then I restart the data acquisition nothing shows up, even after Logger.IsVisible = true
,SignalXY.IsVisible = false
and formsPlot1.Plot.MoveToFront(Logger);
There is something that breaks when clearing out everything to show again the real time data.
It's absolutely possiblew that I'm missing something and/or doing something wrong