06-15-2011 03:02 PM
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
06-16-2011 12:12 AM
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!
06-16-2011 11:02 AM
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
06-16-2011 11:13 AM
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
06-16-2011 01:06 PM
I believe it was '-1', the value for no active plot.
06-16-2011 01:26 PM
Visually, does the cursor snap to the plot & point that you attached it to?
Could you attach some program that reproduces this behavior?
Luis
06-16-2011 02:06 PM
I will try, however given how busy things are, I won't be able to get to it until sometime next week.