LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two questions about XY Graph

Solved!
Go to solution

I have two questions about the XY Graph.

 

1.) Is there a way to disable a user from typing in the scales and changing them, while still permitting the zoom tools?

I had a range in there, and had odd behavior if I type a manual value in the middle of the scale, and want to prevent that condition.

2.) Is there a way to hide the waveform icon in the plot legend? Just the icon. I want to preserve the rest. I'm not seeing a setting for that. It would be nice to increase the size of the checkbox, but memory serves that cannot be done.

example.png

 

Thanks

0 Kudos
Message 1 of 6
(1,034 Views)

Hi DBISI,

 


@DBISI wrote:

1.) Is there a way to disable a user from typing in the scales and changing them, while still permitting the zoom tools?

I had a range in there, and had odd behavior if I type a manual value in the middle of the scale, and want to prevent that condition.

2.) Is there a way to hide the waveform icon in the plot legend? Just the icon. I want to preserve the rest. I'm not seeing a setting for that. It would be nice to increase the size of the checkbox, but memory serves that cannot be done.


  1. You can set the axis properties using property nodes. You can set them in regular intervals or based on UI events, like when your user clicks inside the graph area…
  2. No, not with the in-built plot legend.
    You can implement your own plot legend, for instance using a listbox. Then you can implement any behaviour you like to implement!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,007 Views)

@GerdW wrote:

Hi DBISI,

 

  1. You can set the axis properties using property nodes. You can set them in regular intervals or based on UI events, like when your user clicks inside the graph area…
  2. No, not with the in-built plot legend.
    You can implement your own plot legend, for instance using a listbox. Then you can implement any behaviour you like to implement!

Listbox worked great (with the caveat of an extra, blank row). Got that working.

I already have a scale option where I overwrite the scale. But what I saw earlier was weird, it didn't reset the value I had entered. My reset of the scale didn't work. Granted, I am developing on a Win10 machine and saw the error on a Win11 machine. Maybe that has something to do with it, but the scale fix on my machine works.

0 Kudos
Message 3 of 6
(992 Views)
Solution
Accepted by topic author DBISI

@DBISI wrote:

2.) Is there a way to hide the waveform icon in the plot legend? Just the icon. I want to preserve the rest. I'm not seeing a setting for that. It would be nice to increase the size of the checkbox, but memory serves that cannot be done.

example.png


You can increase the checkbox size and hide the icon by customize the XY Graph:

Select the graph, from menu bar => Edit => Customize Control...

In the popup window, change to Customize Mode.  You should be able to resize and reposition the checkbox.

 

To hide the icon, you have to customize the plot legend 2nd times.

The plot legend is an array of a cluster.  Select the cluster, not the array.  Then customize it using the menu bar item. 

In the popup window, you will get a cluster of a checkbox, a string, and a boolean.

Copy the cluster to a new VI, use property node the hide the boolean.  Then copy and paste it back to the popup window.

Close and replace the control twice.

 

 

George Zou
0 Kudos
Message 4 of 6
(980 Views)

@zou wrote:

@DBISI wrote:

2.) Is there a way to hide the waveform icon in the plot legend? Just the icon. I want to preserve the rest. I'm not seeing a setting for that. It would be nice to increase the size of the checkbox, but memory serves that cannot be done.

example.png


You can increase the checkbox size and hide the icon by customize the XY Graph:

Select the graph, from menu bar => Edit => Customize Control...

In the popup window, change to Customize Mode.  You should be able to resize and reposition the checkbox.

 

To hide the icon, you have to customize the plot legend 2nd times.

The plot legend is an array of a cluster.  Select the cluster, not the array.  Then customize it using the menu bar item. 

In the popup window, you will get a cluster of a checkbox, a string, and a boolean.

Copy the cluster to a new VI, use property node the hide the boolean.  Then copy and paste it back to the popup window.

Close and replace the control twice.

 

 


I was able to hide the boxes. Thanks.

Is there a way to change the color of the text? I have three plots, and if I try to change the color of one it changes the color of all three in the legend to that one color.

 

0 Kudos
Message 5 of 6
(907 Views)

if I try to change the color of one it changes the color of all three in the legend to that one color.

That's because the plot legend is an array.

What you could do is paint the background color of the array, the cluster and the string to transparent.

and then add a decoration behind plot legend as background.

 

George Zou
0 Kudos
Message 6 of 6
(899 Views)