LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Legend for multiple waveform chart

I have a Waveform Chart (and legend) with multiple waveforms.  I can control the visibility of a given waveform on the chart programmatically using the "ActPlot" and "Plot.Visible?" properties.

 

Is it possible to programmatically make the legend only contain the plot names that are visible at any given time?

 

Cheers,

Dan

Dan
CLD
0 Kudos
Message 1 of 3
(4,611 Views)
The legend is based on the actual data for the plot, not the visibility of individual plots. To do what you want you'd need to draw your own legend or add/remove plots to the actual data that's going to the chart. Or, you could change the plot name to something like "(hidden)".
0 Kudos
Message 2 of 3
(4,598 Views)

Hello DanB,

 

Following along the lines of what smercurio_fc suggested, you can use the Legend>Number Of Rows property (LegNumRows) to change the number of rows of your legend to the number of plots you are viewing, and then use the Plot>Plot Name property (Plot.Name) to edit the names of the plots yourself. I cannot see a property to extract these names dynamically, so this is probably your best bet.

 

I hope this helps, otherwise please do let us know if there is anything further,

 

Kind Regards,

Michael S.
Applications Engineer
NI UK & Ireland

0 Kudos
Message 3 of 3
(4,564 Views)