04-06-2010 04:14 AM
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
04-06-2010 05:24 AM
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
04-06-2010 05:27 AM
04-06-2010 07:41 AM - edited 04-06-2010 07:43 AM