LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bonus (?) row in waveform chart legend

Solved!
Go to solution

LV2015, Win7 SP1

 

Greetings All,

 

I'm testing different instruments, and each one produces a unique set of parameters that I need to monitor.  So, the number of plots in my waveform chart & legend vary each test.  I assign custom plot names using the Plot.Name property.  I have the LegHt and LegScrollVis properties set to only display 10 rows, and the user can scroll through the entire list of plots using the scroll bar.  When I run the VI, the chart is properly displaying the data, and the legend is getting created correctly... however... when I scroll to the bottom of the legend, there is a greyed-out "bonus" row that I can't seem to get rid of.  If I click on the box identified by the arrow in the picture, that row becomes "live" and it inherits the next available label (in this case it would display Plot 22).  In addition, that "new" row is remembered the next time I run the VI.

 

In the attached pic, the instrument I am testing generates 20 parameters, and the last parameter is "Photo Valves = 000".  Plots 20 and 21 were added by clicking on the bonus row during previous runs.

 

Is this normal behavior for a custom-sized/scrolling legend, or am I somehow creating an additional blank row?  Sorry, I can't attach the code for you to review.

 

Thanks!

-H

 

 

-Heyla
0 Kudos
Message 1 of 12
(3,132 Views)

Can't you attach a simplified version of your VI for us to review?

 

Even if it is just the chart with the data saved as default to we can poke around and see if the legend looks like that to us.

0 Kudos
Message 2 of 12
(3,099 Views)

Yes, that's always there if the scrollbar is shown (sames as with e.g. array indicators).

0 Kudos
Message 3 of 12
(3,092 Views)

@RavensFan:  I have attached example code for your review.  My data is coming in as a 2D string array, one row of labels, one row of data.  I'm combining each column and assigning to Plot.Name for each legend row.  I'm also limiting the vertical size of the legend and adding the scroll bar.  The attached code now has two additional legend rows, "Plot 2" and "Plot 3", due to my clicking on the "blank" row during previous runs.

 

@Altenbach/RavensFan:  Since the legend "remembers" any rows that accidentally get added by a user that might click on the blank row, can you suggest a workaround to prevent this?  

 

Thanks!

-Heyla
0 Kudos
Message 4 of 12
(3,070 Views)
Solution
Accepted by topic author Heyla

Don't show the scrollbar.

0 Kudos
Message 5 of 12
(3,068 Views)

The plot legend is actually an array (and there are ways to get to many of its properties).

While I do see the greyed out elements past the last plot, I can only create a new element when the VI is in edit mode; I can't create a new one when the VI is running.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 12
(3,066 Views)

@Altenbach:  Unfortunately, sometimes I only have six parameters to display, but other times it might be thirty... and I only have front panel room for a few rows.

 

@paul_cardinale:  My example code was just a single iteration to demonstrate the issue.  If you run it continuously in a while loop, you should be able to create the extra "live" row (at least it exhibits that behavior on my system).

 

-H

-Heyla
0 Kudos
Message 7 of 12
(3,064 Views)

The default chart legend provides a box next to each plot name that a user can access to change line colors/widths/etc.  Is there a way (property node, other) to disable user access to that box, while still keeping it visible?

-Heyla
0 Kudos
Message 8 of 12
(3,039 Views)

Cover with a transparent decoration?

0 Kudos
Message 9 of 12
(3,034 Views)

You could also slide the legend slightly behind the actual graph so the last row remains hidden. 😄

 

(make sure to change the z order. In the image I selected the legend to show the outline)

 

HideIt.png

0 Kudos
Message 10 of 12
(3,029 Views)