LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I REALLY eliminate plot names from a chart legend?

Hi All,

 

I can set the number of rows in a chart legend by setting the LegNumRows property, but how do delete the old plots and plot names from the chart legend (and from the chart as well)?

 

Say I have a chart with three plots in it.  Plots are named:

 

Plot 1

Plot 2

Plot With a Name That is Too Frakkin Long

 

I want to programatically delete "Plot With a Name That is Too Frakkin Long" and then have the legend autosize itself to the width defined by the length of the plot labels "Plot 1" and "Plot 2."

 

Currently, I can set the legend length to include to first two plots, but it continues to size the width of the legend to be very long, to accomodate the long name of the third plot.  When I manually drag the plot legend down to include a third row, it shows me the really long name.  How do I programatically eliminate that third plot and the associated name?

 

Any help would be greatly appreciated.

 

Cheers!

 

 

 

 

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 6
(2,852 Views)

Have you tried the following? Let me know if I have not understood correctly.

example.png

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(2,823 Views)

Can you post your code so we can see what you are doing?

Tim
GHSP
0 Kudos
Message 3 of 6
(2,809 Views)

diarmaede,

 

Just to expand on what Adnan Z showed, you can also add a property node that sets the number of rows that are visible.  You can see an example of this below:

 

Waveform Chart Property Node.png

 

Good luck on your project!

Trey C.

Property Node

0 Kudos
Message 4 of 6
(2,786 Views)

Thanks, Trey.  Is it possible to reset Plot.Name back to the system default (Plot N) without manually setting the name back to the default name?  Which is to say, is there a way to programatically set the legend properties back to their default mode.  I think this would be to have the legend show one plot named "Plot 1," and then to have subsequent plot numbers as "Plot 2," "Plot 3, etc.?

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 5 of 6
(2,776 Views)

You won't be able to do that directly but you can do that indirectly by concatenating a String 'Plot' with the active plot number and feeding that into the Plot Name.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 6
(2,763 Views)