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: 

How to programmatically change plot legend

I have a chart on which I'll plot one or more signals. I can't predict
the signal names in advance so I'd like to programmatically change the
legend(s). Is there a way to do that in LV 6.1?

Thanks,
Dave
0 Kudos
Message 1 of 2
(3,032 Views)
Yes.

- Create a property node for the chart
- add elements for "Active Plot" and "Plot -> Plot Name"
- Wire an index of the plot name you want to change to "ActPlot"
- Wire an string with the new name to "Plot.Name"

A simple implementation would be to make an array of new names and then auto-index a for loop with the increment counter tied to "ActPlot".

Good luck.
0 Kudos
Message 2 of 2
(3,032 Views)