01-09-2014 06:18 AM
Hi,
Is there a way of retrieving the data associated with the currently visible section of a graph/chart when a user has zoomed in to the trace.
Regards
Chris
Solved! Go to Solution.
01-09-2014 06:33 AM
Not directly but certainly indirectly.
How are you hoping to do this?
01-09-2014 06:42 AM
Chris,
when using a Graph, you can use an event structure to implement the "Scale Range Change" event. This is created once the user zooms in or out.
The event gives you access to the new range settings (min/max x-value for instance) which enables you to create a "snippet dataset" matching exactly the visible area of the graph.
As Shane poses, i also do not see an advantage of this except the user should narrow down the dataset before saving to disk......BUT: What do you do if the user zoomed in too much???
Norbert
01-09-2014 06:55 AM
It also gets much more complicated if you have an XY Graph with a zoomed portion of the graph representing multiple unconnected ranges of your total data.
For waveforms it's a lot easier.
Shane.
01-09-2014 07:00 AM
Hi Norbet, Shane,
Thanks for the quick responses.
The requirement is as you said Norbet, the client wishes to save subsets of traces.
If they have zoomed in too much you can zoom out again?? Why would that be a problem?
With an XY it would be much harder and perhaps not worth it.
Thanks again.
Chris
01-09-2014 07:04 AM
Chris,
with "zoomed in too much" i refer to the following situations:
The user collects data, zooms in, saves the subset. Close the application.
A day later, he re-evaluates the data and sees that samples are missing.......
So possibly you want to store all data (always) and place markers in the file which sample is the "zoomed start index" and which one is the "zoomed end index".
Norbert