LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Have cursor track plot so I can get data point from it

That's definitely unexpected and I'd like to investigate further, if it's okay with you.

 

Can you try running the samples\userint\graphcursors.cws shipping example? When you run it and you click the Plot Data button, there should be three cursors in the graph and one plot. The two cursors with the long cross-hairs are free-form and do not snap. The third cursor with the short cross-hair should always be snapped to a point in the plot, regardless of where you move it to with the mouse. Can you confirm if that's what you see?

 

If the shipping example works and your program doesn't, would it be possible for you to send us your program, or some reduced subset of your program, so that we can try to reproduce the problem behavior here at NI?

 

Thanks,

Luis

0 Kudos
Message 11 of 17
(1,255 Views)

It is also important to know how many points are in the plot: the fact is that the cursor snaps to the closest point among those effectively drawn on the graph (let me call them "data" points), not to the closest position on the lines that connect them. This may generate an unexpected behaviour since the position the cursor snaps to can be far from where the user has clicked.

This can be observed in the example suggested by Luis if you zoom in the graph so that only a few data points are left on the visible part and click on the graph: the cursor could jump from one side to the other of the screen!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 12 of 17
(1,246 Views)

That's not the problem, the problem is that I'll programattically set the cursor to snap to a specific plot, but when I try to read back the plot it's snapped to with something like "GetGraphCursorIndex" it doesn't return a plot number of a plot it's snapped to.

 

Kaveh

0 Kudos
Message 13 of 17
(1,167 Views)

What does it return instead? Visually, does the cursor snap to the plot & point that you attached it to?

 

Could you attach some program that reproduces this behavior?

 

Luis

0 Kudos
Message 14 of 17
(1,165 Views)

I believe it was '-1', the value for no active plot.

0 Kudos
Message 15 of 17
(1,159 Views)

Visually, does the cursor snap to the plot & point that you attached it to?

 

Could you attach some program that reproduces this behavior?

Luis

0 Kudos
Message 16 of 17
(1,155 Views)

I will try, however given how busy things are, I won't be able to get to it until sometime next week.

0 Kudos
Message 17 of 17
(1,148 Views)