LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overcoming choppy motion with cursor on XY waveform graph

So I have a vertical cursor that I would like to be able to sweep over the data in an XY graph. If I configure the cursor to be single point, it works very close to how I want, however, there is one gotcha: if you click the cursor point (as opposed to the line), and sweep the cursor over the data (but slightly above where the data is in the graph), the cursor will move in a choppy fashion as it only wants to lock on to peaks near where you sweep the cursor.

 

You can in theory get around this by making the cursor free but then you can drag the cursor outside of the data and move the scale away from the data (as well as the cursor).

 

I'm curious if there is a clean way to get the always smooth sweeping of the cursor. Obviously, "just don't click the cursor point" isn't an option, since I am the programmer and not the user. Who knows what the user will do. I just want to ensure a good user experience (i.e. it is confusing to the user if the cursor does not sweep smoothly... how do they know what they did wrong to get it to scroll smoothly).

 

Example of good and bad behavior: https://www.youtube.com/watch?v=omo2B-bciKU

 

0 Kudos
Message 1 of 3
(1,996 Views)

For an xy graph, it tries to lock to the nearest point. (This is much more obvious if you show the plot as points only.)

 

Maybe you could use a second, free, cursor and make the cursor locked to the plot not "drag-able". Of course there will be other side-effect, but here's a quick draft.

 

 

 

0 Kudos
Message 2 of 3
(1,974 Views)

Yeah, as I mentioned, using a free cursor allows the user to drag the cursor outside of the scale range (which has the side effect of also moving the scale range). You can fix this by forcing the cursor back to the max or min when it leaves the graph range, but it doesn't look as good as the single plot cursor that never alters the range of the scale at all (from what I can implement anyways). I'd rather have the choppy behavior than the drag out of range behavior. I wish it was possible to just lock the scale and cursor range a bit more gracefully but I haven't figured out how to do that.

0 Kudos
Message 3 of 3
(1,969 Views)