May 23, 2009 / yuml ~ uml ~ misc
yUML Direction Control and Scaling

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:;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;scale:200/class/[Customer]+1->*[Order]

yUML Scaling

Another example is this:;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.;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...