LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot visibility detection

Solved!
Go to solution

I have two graphs and allow the user considerable flexiblity in what is being displayed. The plot Plot Visibility Checkbox in the Plot Legend is a very nice way to turn on and off temporarily one particular plot.

 

Is there any way other than polling the Plot Visible property to detect when one of those boxes is clicked?  I want to change the visibility of the same plot on both graphs simultaneously.

 

Lynn

Plot visibility.png

0 Kudos
Message 1 of 10
(4,250 Views)
Solution
Accepted by topic author johnsold

I never worked with these, but there does seem to be a trick which gets you most of the way there - the control has a Plot Attribute Changed event which is fired when one of these is clicked. The event itself doesn't seem to include data about this specific property, but it does include the index and reference of the plot, so you can then just read its property directly.


___________________
Try to take over the world!
Message 2 of 10
(4,233 Views)

@tst wrote:

I never worked with these, but there does seem to be a trick which gets you most of the way there - the control has a Plot Attribute Changed event which is fired when one of these is clicked. The event itself doesn't seem to include data about this specific property, but it does include the index and reference of the plot, so you can then just read its property directly.



Works only in LV2012 (I came with this idea yesterday and checked it in 2011SP1 - didn't work).

0 Kudos
Message 3 of 10
(4,218 Views)

tst,

 

That works great.  It is exactly what I was looking for.   I did not think to look through the event structure for possibilities.

 

Lynn

0 Kudos
Message 4 of 10
(4,211 Views)

Hi!

I have the same problem. In my case, I have multiple 3D  measurements (in particular 12 sensors) being each axis data represented in a different graph. I want to enable/disable the visibility of each sensor from the legend of only one graph. I know that i can use the plot.visibility? property but I can not select the sensor, since active plot is always the same....

 

Is there any way to export the plot visibility settings from one graph to the others? 

 

Thanks in advance.

0 Kudos
Message 5 of 10
(3,753 Views)

@bokeauss wrote:

but I can not select the sensor, since active plot is always the same.....


Property nodes execute top to bottom, so all you need is select the active plot and set it's visibility.

 

The code on the picture would iterate over an array of booleans and set the various plots accordingly.

 

PlotVisibility.png

0 Kudos
Message 6 of 10
(3,748 Views)

Thanks!!! 

 

I did a modification, instead of an array of bool I used one graph property to set the others.

 

Setting visible plots.PNG

 

Message 7 of 10
(3,745 Views)

Can you sent the block diagram

0 Kudos
Message 8 of 10
(332 Views)

Can you sent this block diagram

0 Kudos
Message 9 of 10
(331 Views)

I don't think you'll get an answer:
• a written request in bold and not even a "please"
• the thread is 6 years old
• as far as I can see, that was his last post

0 Kudos
Message 10 of 10
(311 Views)