How to prevent all class elements in the same package from being displayed in a row format

0 votes
asked Feb 6, 2017 in Wanted features by anonymous

Hi, as seen in this example, the elements within the same package are all placed in the same row. Is there a way to get the class elements to be spaced out in a manner that expands the overall diagram both horizontally and vertically  as oppposed to the horizontal placement used in this example? Although the relationship links in this example are visible, it is very difficult to follow relationships links between class elements in the same package in more complicated diagrams. I have also tried experimenting with the 'skinparam linetype ortho' option which did not seem to help. Please advise and thanks.

1 Answer

+1 vote
answered Feb 7, 2017 by plantuml (295,000 points)
You should use --> instead of -> for arrows.

-> forces elements to be horizontally aligned, which is usually not a good idea.

Here is the result:

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhEIImkLaZEpzNBp2ajJmGAwwMa9kSN9PRa5-a5P-OMvAI65ENdv8Ia5fSeL7FLScNcbQGMfIKcf-BI15OELagisOGLEnOK45Rad5EQb9IQWkfSBYAzfgjhHuHBkOYrcdx6uJK856v4EiKXDIy5c200
commented Feb 7, 2017 by fadhelm (120 points)
Very helpful, thanks! Is this documented in the class diagram section? If not, I think others would find it useful as well.
...