LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

When using a right and left y-axis, how do you select which axis issed for for the GetGraphCursor y value?

Solved!
Go to solution

I'm using a graph with a right and left Y-axis (2 datasets).  I'm trying to use one cursor to select a point in time (x) and the y values in both datasets.  I can't figure out how to control which value is returned for the y value when using the GetGraphCursor call.

GetGraphCursor (panelHandle, PANEL_GRAPH, yourCursorNumber, &x, &y)

 

 

0 Kudos
Message 1 of 2
(3,119 Views)
Solution
Accepted by topic author ryan@gar

Using SetCursorAttribute with attribute ATTR_CURSOR_YAXIS should be what you are looking for. The online help for this attribute explains it wery well:

 

Description:  Used to change the Y axis with which the graph cursor is associated. 
When a graph cursor is created, the Y axis to which it is associated is determined by the value of ATTR_ACTIVE_YAXIS.  Afterwards, the association can be changed using ATTR_CURSOR_YAXIS.
The associated Y axis serves as the reference for the cursor position coordinates in calls to SetGraphCursor and GetGraphCursor.



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 2 of 2
(3,108 Views)