LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

which function can i use to programtically change Axis name of graph and strip chart

Hi everyone:
which function can i use to programtically change Axis name of graph and strip chart? Thank you very much!
0 Kudos
Message 1 of 2
(2,998 Views)

Hi schoolworkwork,

To change an Axis name programmatically, you need to call the
SetCtrlAttribute function and set the ATTR_XNAME or ATTR_YNAME attribute to whatever you like.  For example, suppose I wanted to change the top X-Axis name of a graph. I would say

SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_ACTIVE_XAXIS, VAL_TOP_XAXIS);    // Make the top or bottom x-axis the active one
SetCtrlAttribute (panel, PANEL_GRAPH, ATTR_XNAME, "Hello there");           // Set the name


Hope this helps!

Best Regards,

Jonathan N.
National Instruments
Message 2 of 2
(2,990 Views)