<< back to blog

yUML Direction Control and Scaling

May 23, 2009, yuml ~ uml ~ misc

I really need to give yUML it's own blog or news page or something :)

Until then, a few things that are new with yUML.

Class Diagram Direction Control

By default, class diagrams switch from horizontal layout to vertical if there are 4 or more classes in the diagram. If you don't want this behavior, you can override it by tweaking the URL adding a dir:lr or dir:td, where td is Top Down and lr is Left Right. Example of use:

http://yuml.me/diagram/scruffy;dir:lr/class/[Customer]+1->*[Order], [Order]++1-items >*[LineItem], [Order]-0..1>[PaymentMethod], [PaymentMethod]^[Card], [PaymentMethod]^[Cash], [PaymentMethod]^[Cheque].

Diagram Scaling

Sometimes you want a bigger or smaller diagram. yUML lets you do this if you add a scale:120 to the image URL (120 being the % size you want to scale). Here's an example


yUML Scaling

Another example is this:

http://yuml.me/diagram/scruffy;dir:lr;scale:75/class/[Customer]+1->*[Order], [Order]++1-items >*[LineItem], [Order]-0..1>[PaymentMethod], [PaymentMethod]^[Card], [PaymentMethod]^[Cash], [PaymentMethod]^[Cheque].

yUML Direction Control


You can combine these effects to make some interesting diagrams, here's how you might bolt together an org chart.

http://yuml.me/diagram/plain;scale:200;dir:td/class/[My Company{bg:green}]->[Research{bg:yellow}], [My Company]->[Marketing{bg:lightblue}], [My Company]->[Sales{bg:orange}], [Sales]-[note:Outsourced to Blah inc]


You may also like...

blog comments powered by Disqus