I am using PlantUML API to generate Activity Diagram.
I have used GraphViz before and used rank parameter to define layout
rank=LR [for left to right]
I am trying to find similiar thing in PlantUML where I can change its orientation to "Left to Right" instead of existing layout i.e. "Top to Bottom".
When we want to text to be center aligned we simply use the new-line character \n . If we want to have our text left aligned we use \l instead of \n . And to right align the text we use \r . Written with PlantUML 1.2017.
There doesn't appear to be a direct way of including a color-coded legend in a PlantUML diagram, but I figured out a workaround which is close enough. Declare classes TypeA , TypeB , TypeC inside a package LEGEND . Hide the circle, methods and members for each class. Attach "hidden" connectors between the classes.
(Note: PlantUML uses Graphviz/DOT for layout of UML diagrams anyway.) This allows you to use Graphviz/DOT with all tools that support PlantUML. You can use @startdot/@enddot or @startuml/@enduml to delineate the diagram, and then the very first line has to be: digraph XYZ { .
File created by PlantUML, a UML diagram creator used within programs like Sublime Text Editor or programming language like HTML; same as the . PU file; contains code referenced by PlantUML to create diagram images that can be generated as .
You can use the following command with State, Class, Component or Usecase diagrams:
left to right direction
(see https://plantuml.com/use-case-diagram#d551e48d272b2b07)
Edit: This comment from 2012 originally claimed that the feature was scheduled for the next release. It's been available forever now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With