Direction Congruency

Property Value
Type: advanced
Identifier: org.eclipse.elk.layered.directionCongruency
Meta Data Provider: options.LayeredMetaDataProvider
Value Type: org.eclipse.elk.alg.layered.options.DirectionCongruency (Enum)
Default Value: DirectionCongruency.READING_DIRECTION (as defined in org.eclipse.elk.layered)
Applies To: parents


Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.

Additional Documentation

Internally, we map any desired layout direction to the variant of creating a left-to-right drawing. This is done by transforming the input graph’s coordinates in various ways. Depending on the way this transformation is performed, one can either preserve a reading direction or rotation.

When preserving reading direction, the vertical reading direction of a left-to-right or right-to-left layout (and thus the node, edge, and edge label order) corresponds to the horizontal reading direction of a top-to-bottom or bottom-to-top layout. When preserving rotation, the four possible drawings are simply rotated versions of the left-to-right variant. This might be of interest if one wants to preserve a clockwise orientation of feedback loops.

The following drawings illustrate the different behaviors.

Reading Direction