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.

Categories

How can I wrap the text in one node, in order to prevent the graph becoming too wide?

+3 votes
in Help by
I need help with this too.  I have found that the techniques for getting text to wrap within the node doesn't work with the flowchart shapes.  Please advise.

1 Answer

+4 votes
There are two possible solutions:

1. Simply enter line breaks. By default, line breaks are entered using SHIFT+ENTER. If your labels tend to need many line breaks and you'd prefer to use ENTER over SHIFT+ENTER, you can change this in yEd's preferences ("File" -> "Preferences", switch to tab "Editor" and choose "[Enter] creates new line, [Shift+Enter] closes editor" for option "Label Editor").

2. Select the label (by pressing and holding CTRL while left-clicking on the label). Set the property "Size" to "Fit Node Width" and property "Configuration" to "Cropping". (The properties are displayed in yEd's Properties View that is usually located in the lower right corner of yEd.)
by [yWorks] (161k points)
But this is not 100% satisfying. It is easy to imagine a situation where node-width is too narrow, and so you end up doing manually inserted lineshifts which is really bad data-discipline - because there is no way for a machine to know if the lineshift is there for a meaningful or a visual reason.

I propose two things:

1. stop calling it 'cropping' in yEd - it's called 'wrapping', cropping means leaving something out.

2. introduce arbitrary label-sizes rather than bind it to the node-size.
Re 1.: The cropping configuration does both, cropping and wrapping. (Try "Fit Node Size" as "Size" and "Cropping" as "Configuration".)

Re 2.: You can use a trick to get arbitrary label sizes:
1. Create a simple rectangular node (first template from section "Shape Nodes"). Set the width and height of the node to the desired value.
2. Change the "Size" property of the node's default label to "Fit Node Size".
3. Change the "Configuration" property of the node's default label to "Cropping".
4. Move your labeled node over another node.
5. Right-click the labeled node to open its context menu and choose "Convert to Label".
Great! Thank you :)
Excellent ... Thank you!
~Ajmal
Ah lol ... And I was searching for wrapping all the time. Really a bad idea to call it cropping! Make it two attributes instead.
Legal Disclosure | Privacy Policy
...