LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph Legend Text Font Size

I created a utility that plots multiple curves on an XY Graph and exports the image so it can be used for presentation.  Sometimes we have very long descriptors for the individual plots, and I have been trying to add a control for the text font size of plots in the legend in run-time.

 

I have added these controls for all other aspects of the graph (X & Y labels, scales, titles) but cannot find the property to control specifically the font size of the legend entries.

 

Is it true what I have been told by family members, and just don't look very hard for some things that are clear and obvious???

0 Kudos
Message 1 of 6
(573 Views)
A quick search and all I've found is others trying to do something similar, but there's no property node to do it.

https://forums.ni.com/t5/LabVIEW/Mixed-signal-graph-plot-legend-font-size/td-p/2313868
0 Kudos
Message 2 of 6
(557 Views)

Hi,

 

Add this key to your LabVIEW.ini and restart LabVIEW:

AdvancedPlotLegendMenu=True

 

Then you can right-click your legend and create a reference / property node / invoke node to it:

 

raphschru_0-1719502920268.png

 

If you create a reference, you will get an unnamed Array reference.

By inspecting its element, then the cluster elements, you can get the ref to the plot name string:

 

raphschru_1-1719503340752.png

 

See this thread for more infos:

https://forums.ni.com/t5/LabVIEW/Graph-How-to-keep-quot-Legend-Number-of-Rows-Property-quot/m-p/4271...

 

Regards,

Raphaël.

Message 3 of 6
(523 Views)

Thank you very much!  This worked perfectly, but what a lot of work just to change a font size.  I am really surprised that this has not ever been addressed before.

0 Kudos
Message 4 of 6
(484 Views)

@Blocks wrote:

Thank you very much!  This worked perfectly, but what a lot of work just to change a font size.  I am really surprised that this has not ever been addressed before.


Usually you just select the text and change it through the font dialog. Having to change it as it's running is uncommon.

Yamaeda_0-1719910286157.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 6
(458 Views)

Agree, LabVIEW often has these kind of limitations when you try to do "too specific" things, especially for GUI customization.

 

As said by Yamaeda, doing it at edit-time is sufficient 99% of the time. If you really try to have a dynamic GUI that adapts to screen resolution, be ready to hit other limitations of this kind, because LabVIEW was really not designed to make responsive GUIs.

 


@Blocks wrote:

what a lot of work just to change a font size.


Generally, I'm happy that a solution exists at all, and actually not so complicated.

 

Don't forget to "Accept as solution" if a comment solves your problem and/or "Kudo" comment(s) that are helpful.

 

Regards,

Raphaël.

0 Kudos
Message 6 of 6
(445 Views)