LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Icons in XY graph scale legend

Hi All,

 

Is there any way to change the icons of the 4 buttons in the Scale Legend of an XY graph/Intensity graph control?

 

The reason I ask is that I want to define custom graphs that will match our company's style guide and we don't really like the default ones.

I tried to look for the pictures inside the XY Graph control using the control editor, but unsuccessful. For some reason, the icons need to be part of the array itself so LV knows that it needs to draw two different X icons for the first item (X-scale) in the scale legend (which is an array of clusters containing string control and three boolean buttons) and for the next item, it draws two different Y icons.

Arrowin_0-1617202787393.png

 

If anybody has a clue, it would be nice..

 

Thanks,

Davy

0 Kudos
Message 1 of 21
(258 Views)

Nothing is stopping you from creating your own controls and buttons and hiding the real ones. Then just use events to modify graph properties when they are clicked.

 

(And yes, there are other ways to modify certain parts of graphs, but I don't remember the details. I'll try to find the ancient discussion)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 21
(224 Views)

Also remember that there are at least four xy graphs with very different styles. Maybe one of the others is a better match out of the box.

 

altenbach_0-1617208863191.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 3 of 21
(215 Views)

Hi,

 

Well, I am actually looking to change the icons itself (not the style of the button) since I can't find them in the scale legend (see attached image). In the image, you can see that the icons for X and Y are missing from the scale legend and should be part of the graph itself..

I would like to know where these image icons are stored in the heap of the FP of the control ctl file.

 

BR,
Davy

0 Kudos
Message 4 of 21
(149 Views)

@Arrowin wrote:

I would like to know where these image icons are stored in the heap of the FP of the control ctl file.


They are stored in the array element whose UID is 63 higher then the owning graph.

 

The array element is a cluster. The cluster has controls. The 2nd, 3rd and 4th controls are Booleans. The Booleans can be replaced.

 

Go for the DIY... This isn't an easy hack.

0 Kudos
Message 5 of 21
(141 Views)

Never mind.

 

Turns out you can replace them in the Customize... dialog.

 

Right click the control, Advanced>Customize.

Change to Customize Mode (CTRL+M).

Put a new Boolean control (your Boolean control) on the FP.

Copy it.

Select the scale Boolean.

CTRL+V.

 

Now the Boolean is replaced.

 

Note that replacing it with the menu doesn't work.

Once it's been replaced, you can't change it anymore.

 

Graph Scale Booleans.PNG

 

0 Kudos
Message 6 of 21
(138 Views)

Played around with that.  The X and Y icons aren't part of the button, unlike the lock icon which is part of the button.  You can replace the button, but the X/Y (and X.XX/Y.YY) icons appear over them.  I suspect here had to be custom code in the control to use a different icon for X versus Y scales.

 

Note: it seems by making an array of clusters containing a string and three buttons, you can paste in the entire Scale Legend structure at once.

0 Kudos
Message 7 of 21
(130 Views)

@drjdpowell wrote:

Played around with that.  The X and Y icons aren't part of the button, unlike the lock icon which is part of the button.  You can replace the button, but the X/Y (and X.XX/Y.YY) icons appear over them.  I suspect here had to be custom code in the control to use a different icon for X versus Y scales.


Ah, I though that was the goal, but it's the problem.

0 Kudos
Message 8 of 21
(123 Views)

@Arrowin wrote:

In the image, you can see that the icons for X and Y are missing from the scale legend and should be part of the graph itself..

 

snapshot scale legend in customise control mode (1).png


Q: How did you get that array out of the graph like that?  I don't know how to do that and I would love to get a look at that lock button (as it shows a feature I don't know how to reproduce).

0 Kudos
Message 9 of 21
(117 Views)

@drjdpowell wrote:

Played around with that.  The X and Y icons aren't part of the button, unlike the lock icon which is part of the button.  You can replace the button, but the X/Y (and X.XX/Y.YY) icons appear over them.  I suspect here had to be custom code in the control to use a different icon for X versus Y scales.

 

Note: it seems by making an array of clusters containing a string and three buttons, you can paste in the entire Scale Legend structure at once.


It seems to be a decal that's placed on the button automatically.

 

Even if you can get a reference to the button, controlling decals is hard (not possible). 

0 Kudos
Message 10 of 21
(112 Views)