LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling waveform graph properties for waveform array.

Solved!
Go to solution

I am customizing a waveform graph.  I am having no problem using property nodes to set all the things I need to (plot color, axis names, etc...).  My waveform is actually an array that contains seven waveforms.  The problem is that the property node for the waveform graph only changes plot color, legend name, etc... for the first signal in the graph.  They all graph perfectly together.  However, my application requires the user to be able to select say signals 2,5, and 7 from the array.  When he does so, he gets signals 2,5, and 7 on the graph, but the legend shows signals 1,2, and 3 and they plot in the colors of signals 1,2, and 3.  Any suggestions on updating properties of multiple plots for a waveform graph?

 

Also when I want 1 signal I plot to a waveform graph.  When I want 2 to 7 signals I have to plot to a second copy of the waveform graph.  For whatever reason a waveform array graph can't double as a single waveform graph.  Any ideas on this?  Thanks in advance for your help.

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

To change the properties of the other signals in the graph you will need to set the ActivePlot property node before writing the color, legend name, etc. To only display the selected signals you could do a couple of different things.

 

1) set the color of the signals that aren't being displayed to transparent

2) write NaN values to the waveform graph for the signals you don't want to display

0 Kudos
Message 2 of 3
(2,772 Views)

Setting the Active Plot to the signal I want to change the color of and then changing the color seems to work great.  I've set this up to set these colors once upon first call.  It's working as designed.  Before no matter what signal I picked it always came up as signal 0 with those properties.  Thanks for the additional advice as well.  I'm currently controlling the display of signals using 7 booleans controlling 7 case statements.  I index that signal into a new array of the same index if True.  If False I load null into that index of the new array.  This also seems to be functioning (although I may be making things difficult on myself).  Thanks again for your help.

0 Kudos
Message 3 of 3
(2,745 Views)