ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph legend does not get set

Solved!
Go to solution

In my VI I programmatically set Plot.Name property of an XY Graph, which is supposed to show up in the legend. However when I start the VI, the legend does not show up (see below)

girish53_0-1677794586748.png

It does show up after the VI has run for some time (see below)

girish53_1-1677794735732.png

Also, it is chopped off. But that is a separate issue. 

Is there a way to refresh the graph after I have set all the properties? Any suggestions on how I can fix this?

Girish

 

 

0 Kudos
Message 1 of 4
(1,624 Views)

Can you post the code you are using to set the plot names?

 

Also, just as a general thing, I've encountered glitches before when a plot name is a completely empty string.  Can you set each of them to be a single "space" character before running, and see if that helps either or both of your problems (the updating delay or the chopped off plot)?

0 Kudos
Message 2 of 4
(1,615 Views)
Solution
Accepted by girish53

Select the Legend part, and in the Toolbar with the two semi circle arrows, select Bring to front.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(1,580 Views)

I tried giving string of one blank and many blanks. That did not make a difference. When I gave a string of one blank, there was no noticeable difference in the legend. But when I gave a string of 12 blanks, a long empty legend showed up well after I started the VI, like when I gave real strings. 

Unfortunately, I cannot send you the code where I set the graph properties because it is part of a large VI. The weird part is that all the other things I set programmatically, number of plots, the X and Y axis labels, Y min and max, show up correctly on the graph. It is the legend that does not get set. I do all the changes in one set of frames. 

girish53_0-1677852875261.png

 

0 Kudos
Message 4 of 4
(1,567 Views)