LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xy graph: visible points after zoom

 

Hi,

 

I've been struggling with getting the visible points of a XY graph visible in a table. The user can zoom, hence making the range smaller.

 

I've been using the x-range property nodes to determine the min and max axis value. But these values are usually a bit lower and higher than the first and last displayed point.

So when I search my array to find the index of the first and last datapoint using the range value, it usually returns -1

 

So who could help me out? The array contains timestamps 

0 Kudos
Message 1 of 4
(2,422 Views)

You can use the array threshold function to get the 'points'.

Most propably it won't work on the raw data, so you need to sort them. You could make a cluster (x,y,index) and sort it -> threashold with the x min,max values; use (y,x,index) and sort it ->  threashold with the y min, max values. Then get both subset's and use a for loop over one of them and search if the index is also in the index list of the other (>=0), if so, this is a displayed point.

 

Felix 

Message 2 of 4
(2,411 Views)
Thank you! I will try right away. Kudos for you for the helpful and fast reply
0 Kudos
Message 3 of 4
(2,409 Views)
Message Edited by _Faust on 04-06-2010 07:43 AM
0 Kudos
Message 4 of 4
(2,396 Views)