LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plot legend overlapping text

I have an xygraph (from silver controls palette) (LabVIEW 2012 (SP1 12.0.1f5). I have encountered a problem where the plot legend text overlaps with plot graphic icon image. I don't know the cause of it but it always starts at my boss's end and the only solution that I have is to replace the xygraph with a new one (by right clicking the graph and selecting replace and then a new xygraph from the silver controls paltete. Is there a solution to this problem (autosize legend is turned on).

This is how it should be (and this is how it starts)

Image 2.png

But this is how it ends up (after inderterminate time)

Image 3.png

Any fixes?

Thanks in advance

0 Kudos
Message 1 of 10
(4,538 Views)

Did you try to enter a name with letters more than 2 times of the present one (Its just we hit the keyboard and endup having a large text)? Also what happens when you try to enable the "Plot Visibility checkbox"? Did you set the graph to scale with the pane?

-----

The best solution is the one you find it by yourself
Message 2 of 10
(4,531 Views)
And now I can't reproduce the bug (to check and see if any of the above might help).
Regarding long text, plot legend text is dynamically created and depending on the choices user has made, could grow quiet lengthy). I have just tried settings where legend text varies from short to long and the problem is not resurfacing. (As I wrote earlier, it happens at my boss's end and then I can reproduce it at my end too)
I have enabled the Plot Visibility Check-box and the problem did not recurr. Also I have enabled the graph's setting scale with pane, and still no overlapping. Strange bug this one.
0 Kudos
Message 3 of 10
(4,518 Views)

Just try to do the same way by taking the code from your boss and see what happens (Without doing anything just try to reporoduce, may be post it here). This will help to understand why it happened.

-----

The best solution is the one you find it by yourself
Message 4 of 10
(4,509 Views)
Okay thanks a lot for your kind replies. I would have to wait till tomorow for code exchange to happen between us to see if the problem reappears (though it may not as it strikes randomly).
A very pleasant day to you
0 Kudos
Message 5 of 10
(4,505 Views)

Keep the thread updated if you find a solution/re-produce the bug.

 

Thanks ! Have a good one!

-----

The best solution is the one you find it by yourself
Message 6 of 10
(4,502 Views)

Here is a VI with two graph controls. The one above is fine but the one below has text and graph icon reverted (mirror image of the one above). How did that happen, no idea whatsoever. So how can one code a solution, that is, check if the legend has reverted text and graph icon and fix such cases. I don't have the case where legend text overlaps with graph icon at the moment and would post it as soon as that is available. I am posting the VI so that someone can come up with a programmatic solution. Further, both graphs are from the same front panel, but for some unknown reason, one has correct orientation, the other not.

0 Kudos
Message 7 of 10
(4,347 Views)

Right-click on the graph and go to Advanced->Customize.  You will now have the control editor open.  Click on the wrench in the toolbar.  It should now look like tweezers.  You can now move individual peices around.  This is how you can switch the legend text and icon.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(4,340 Views)

And here is the same VI with third graph, onw with overlapped text and graph icon.

0 Kudos
Message 9 of 10
(4,339 Views)

Thanks for the info crossrulz, yes this works but isn't there a programmatic solution.

0 Kudos
Message 10 of 10
(4,338 Views)