LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the visible section of a graph?

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(2,718 Views)

Not directly but certainly indirectly.

 

How are you hoping to do this?

0 Kudos
Message 2 of 6
(2,708 Views)
Solution
Accepted by topic author CJW1800

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 6
(2,699 Views)

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.

0 Kudos
Message 4 of 6
(2,693 Views)

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

0 Kudos
Message 5 of 6
(2,684 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(2,678 Views)