Piped

extends:
Jump To: Members

A piped edge style draws its edges using only vertical or horizontal lines. It is ideal for tree-type layouts such as org-charts, site maps, and activity diagrams.

Piped Edges have a from and to direction. These values can be either x, y or a function that returns x or y on each redraw. By default, a piped edge has a from and to direction of x.

If both directions are x or y, then a pct is used to determine when the lines should change directions. By default, this is 50%. For example, if both directions are x, then a pct value of .5 means don't change directions (in this case, it would be y) until you have traveled 50% of the distance in the x direction of the two nodes. If the directions from and to are not the same, then this value is ignored.

Piped Edges also have a corner radius when changing directions. This value can be either a number or a function that returns a number on each call.

Piped Edges, by default, use the midpoint anchor (thinkmap.display.anchor.midpoint())

Examples:

The easiest way to declare a piped edge: display.template('edge').as(thinkmap.display.edgestyle.piped())
If you wish to have a piped edge style where the from direction is x and the two direction is y (This makes the edge an elbow shape): display.template('edge').as( thinkmap.display.edgestyle .piped() .fromDir('x') .toDir('y') );
If you want to change the radius use a percentage of 50% for x,x: display.template('edge').as( thinkmap.display.edgestyle .piped() .radius(5) .pct(.5) );

Instance Methods

Defined in Piped: