Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Are text alignments in labels possible?

+1 vote


it seems that the only way to format text in a label (for a node or an edge) is to have it "centric". Have I missed the parameter where I can align it to "right" or "left" - just to make make the diagrams even more neat?

Moreover, is there a "wrap text" option somewhere. Currently I am doing the line feed manually sich that the label text keeps into the label box.


Thanks for any hint,

in Help by

1 Answer

+2 votes
Hi Andreas,

by default, a label has its own size and that size fits the size of the label's contents. Therefore, the 'Alignment' property of (node) labels doesn't seem to have an effect.

For node labels, change the 'Size' to another option than 'Fit Content' to see the effect of the 'Alignment'. Text wrapping is available, too, and can be enabled by setting the 'Configuration' to 'Cropping' (stupid name, I know).

Unfortunately, these two settings are not available for edge labels. Please add a feature request for this if you like.
by [yWorks] (26.8k points)
Perfect. Thanks a lot! Andreas
I came late to the party, tried the suggestion, and it works for horizontal text, but vertical ones seem to be aligned if the 270 degree angle wasn't set. Which is not the desired behaviour.
Version with Java Version: 1.8.0_162 Java VM: Java HotSpot(TM) 64-Bit Server VM, Oracle Corporation running on linux mint 18.02

I am afraid I do not really understand your problem. Can you upload a screenshot with the bad alignment marked as well as the corresponding GraphML file?
Please see How to upload files to yEd Q&A? for information on uploading files here.

Legal Disclosure | Privacy Policy