LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph legend width change - Left aligned or right aligned

Hello all,

 
when I place an XY-Graph with Plot-Legend shown in LV2012, the text of the plot name is left aligned, wich is, what I want. With this behaviour the little pictures, representing the plot attributes, are fixed. After migrating to LV2014 I realized, that the text is now right aligned, which means, that the little pictures are moving to left & right, depending on the plot name length.
I found no property controlling this behaviour.
As a workaround I could set the plot legend position depending on its width, when the plot name is changed, but there is no event, firing when the plot name is changed by the user. So I would have to poll the plot names in the timeout case of my event structure. Btw. I have to show six XY- graphs on my FP, so polling can cause a remarkable CPU load (when I do it 1000 times / s Smiley Very Happy).
Any suggestions?

Greets, Dave
0 Kudos
Message 1 of 5
(2,884 Views)

Now I found out, that if the whole of the plot legend is right to the graph area (without overlapping), the legend is right aligned, but when it is overlapping, it's left aligned. I suppose, this is not a bug, this is a feature Smiley Very Happy
But this doesn't help, if the user types in a very short name, so the legend is not longer overlapping. Then it looses its left-align behaviour.

 

So, what to do?

Greets, Dave
0 Kudos
Message 2 of 5
(2,878 Views)

Hallo Dave,

 

can you please post two screenshots of the two XY Graphs in the different LabVIEW Versions?

 

So you made an XY Graph in LabVIEW 2012 saved it and than opened it with LabVIEW 2014 is that right? After that the Plot name changed from left to right?

 

Kind regards

 

Dominik 

0 Kudos
Message 3 of 5
(2,848 Views)

Hello Dominik,

 

thank you for your reply.

I'd like to show you the problem with some pictures:

 

LV2012 - 1.png LV2012 - 2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The left picture shows the original situation, the right picture demonstrates the behaviour with LV2012, the legend is right aligned.


 

 

LV2014 - 1.pngLV2014 - 2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The same situation in LV2014, the legend is right aligned.

Greets, Dave
0 Kudos
Message 4 of 5
(2,840 Views)

Part 2:

 

LV2014 - 3.pngLV2014 - 4.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Left picture: the upper graph has an overlapped legend, when the plot name is shortened, it shows "right aligned" behaviour.

But when the plot name becomes to short to overlap, the next time the name is changed, the legend is left- aligned again.

 

Best would be, to be able to set the behaviour to left or right aligned via property node or to have an event, firing when the plot name is changed.

Another idea would be to have a reference to the plot names to create a dynamic user event from it.

 

 

Greets, Dave
0 Kudos
Message 5 of 5
(2,838 Views)