edge attributes setting

NAME

Attribute settings of edges.

SYNOPSIS

node_A -> node_B -> … [ attribute ];

node_A -> node_B -> … [ attribute = value ];

node_A -> node_B -> … [ attribute = value , attribute = value , … ];

DESCRIPTION

Set attributes related to edges.

Separate by ‘,’ to use multiple attributes. If strings which is used to specify attributes include white-spaces or symbols, quotation is needed.

ATTRIBUTES

label = String

Show short strings on the edge.

style = Type of edge line

Specify type of edge line. Default is solid.

dotted

Dotted line.

dashed

Dashed line.

none

Edge is not shown.

Number, Number, …

Specify line length and space length alternately with comma separated.

New in version 0.9.6.

hstyle = Type of head shape

Specify head shape of edge.

New in version 0.7.3.

generalization

generalization

composition

composition

aggregation

aggregation

color = #RRGGBB or colorname

Specify edge color. Default is black. If none is specified, draw a transparent arrow.

dir = direction

Specify direction of edge arrow.

none

Not draw an arrow, just connect nodes.

This is equivalent for A -- B.

forward

Draw an arrow from left node to right node or upside node to downside node.

This is equivalent for A -> B.

back

Draw an arrow from right node to left node or downside node to upside node.

This is equivalent for A <- B.

both

Draw arrows at both side.

This is equivalent for A <-> B.

folded

Fold the edge.

New in version 0.7.5.

textcolor = #RRGGBB or colorname

Specify edge label color. Default is black.

New in version 0.9.2.

thick

Make the edge thick.

New in version 0.9.7.

fontsize = Integer

Specify edge label font size. Default is 11.

New in version 0.9.7.

EXAMPLES

label attribute to edges

blockdiag {
   // Set labels to edges. (short text only)
   A -> B -> C [label = "foo"];
   C -> A [label = "bar"];
}

style attribute to edges

blockdiag {
   // Set style to edges.
   A -> B [style = dotted];
   B -> C [style = dashed];
   C -> D [style = none];
   D -> E [style = "3,3,3,3,15,3"];
}

hstyle attribute to edges

blockdiag {
   // Set head shapes to edges.
   A -> B [hstyle = generalization];
   B -> C [hstyle = composition];
   C -> D [hstyle = aggregation];
}

color attribute to edges

blockdiag {
   // Set color to edges.
   A -> B [color = "#0000FF"];
   B -> C [color = "red"];
}

dir attribute to edges

blockdiag {
   // Set arrow direction to edges.
   A -> B [dir = none];
   B -> C [dir = forward];
   C -> D [dir = back];
   D -> E [dir = both];

   // Same meaning
   F -- G -> H <- I <-> J;
}

folded attribute to edges

blockdiag {
   A -> B -> C -> D -> E;

   // fold edge at C to D (D will be layouted at top level; left side)
   C -> D [folded];
}

text color attribute to edges

blockdiag {
   A -> B[label=foo, textcolor=pink];
}

font size attribute to edges

blockdiag {
   A -> B [label='text', fontsize=16];
}

thick attribute to edges

blockdiag {
   A -> B -> C;
        B -> D[thick];
}