From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing graph positions programmability

Solved!
Go to solution

Is there a way to change graphs position based on a state of your VI? For instance: I want to switch two charts based on a test type. The charts are different sizes. I know I can just wire the charts oppositely in my code but what changes do I need to make for the labels and such? Are there property nodes to change the label of charts?

0 Kudos
Message 1 of 3
(2,176 Views)
Solution
Accepted by topic author glskinner

So far as I know the VI must be in edit mode to change the label name. You can use property nodes to read and write the actual position your chart currently is and to define where you wish it to be. This can happen during run time. If you want to programmatically change the names of charts you have to have something like a second VI that runs and modifies your main VI when it is closed and changes the names there through property nodes and such. It's a huge pain (though fun). 😛

 

 

 

You can even stack the charts on top of each other and just change which is visible (this is probably the easiest way to do what you describe). Also another thing you could do maybe is use a string indicator to hold your chart name.

 

Anyways hope this helps!

 

 

Message 2 of 3
(2,157 Views)

While you must be in edit mode to change a label name, the caption name can be changed at run-time and was designed for that purpose.  Thus, the simplest way to do what you want to do is to show the captions, hide the labels, and, at run time, change the captions and the contents of the graphs.  You will need to use property nodes to change the captions.  To show captions, right-click the graph and select Visible Items»Caption.

Message 3 of 3
(2,123 Views)