05-15-2023 11:19 AM
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.
Thanks
Solved! Go to Solution.
05-15-2023 01:29 PM
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.
05-15-2023 02:29 PM
@GerdW wrote:
Hi DBISI,
- 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…
- 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.
05-15-2023 03:05 PM
@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.
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.
05-23-2023 04:36 PM
@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.
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.
05-23-2023 05:09 PM
> 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.