LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph cursor handling

Check your property node. You have a typo. You are setting the cursor position for "Y", it should be:  Cursor.PosX

Message 11 of 14
(1,492 Views)

Also, if these are really x values, be aware that they don't align with the x-values of the data points, so it will lock to the closest point and not where you set the X.

 

If you want the cursor anywhere on the line, you need a free cursor and calculate the Y according to x, e.g. by linear interpolation of the data.

0 Kudos
Message 12 of 14
(1,481 Views)

@jamiva wrote:

Check your property node. You have a typo. You are setting the cursor position for "Y", it should be:  Cursor.PosX

 

Smiley Happy Thanks !!!

But what is strange, according to the HELP (link below), the value -1 puts cursor on all curves, but it seems not be the case.

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/properties-and-methods/vi-server/generic/c...

Plot with which the cursor is associated. If Plot is –1, the cursor snaps to all plots in the plot area. You can move the cursor to the nearest data point along any plot in the plot area.

0 Kudos
Message 13 of 14
(1,477 Views)

@altenbach wrote:

Also, if these are really x values, be aware that they don't align with the x-values of the data points, so it will lock to the closest point and not where you set the X.

 

If you want the cursor anywhere on the line, you need a free cursor and calculate the Y according to x, e.g. by linear interpolation of the data.


Stick to the closest X is not a problem for my app, actually such behavior is even better.

Not, I want both cursors to be locked to one of the curves (or both if this is possible)

0 Kudos
Message 14 of 14
(1,473 Views)