LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I get a specific position into Stripchart for a data array?

Could anybody help me with this question????

I plot an array onto Stripchart, later I need to know the index for a data set into array by the Stripchart position.

I would like to do a left click on a specific point in the stripchart thus to relate this point to the index of the array.

Somebody have any idea of how can I this??

Thank you for your help.
0 Kudos
Message 1 of 2
(3,015 Views)
You can do this using a graph instead of a cursor. You probably want to use a cursor to point to that position on the graph, and then you can use the function GetGraphCursorIndex, which obtains the plot handle and array index of the point to which the cursor is currently attached. That, along with a few other cursor attribute/value functions would probably be all you need to do this. If you need to stick with a chart, then you only have the x and y coordinates of the mouse and the size of the chart. You'll have to do some math to line up an x coordinate to an index value, and also maintain a growing array of points that are being plotted. Then, by clicking on the chart, you get the x coordinate, translate that to an index value, and then go to the global array and find out the Y value for that index. Hope this helps!
Jeremy L.
National Instruments
0 Kudos
Message 2 of 2
(3,005 Views)