E

ClearAreaStrategy

Specifies the strategies for clearing an area within a ClearAreaLayout.

Members

No filters for this type

Constants

A strategy that clears the area by globally partitioning the input into two parts and moving them apart.

The existing layout is divided into two partitions somewhere along the area. The division can be vertical or horizontal. To free up the space, the two components are then moved horizontally (vertical division) or vertically (horizontal division). Edges connecting nodes of different partitions are rerouted by the routing algorithm.

This strategy has a rather global effect on the existing layout because every element is displaced. The edge routes and relative locations between elements that are in the same partition are not changed at all. Compared to other strategies, more unnecessary free space may be generated as not only the exact area is cleared, but a whole vertical or horizontal stripe.

The specified component assignments is considered such that if possible all component nodes are in the same partition.

static

Sample Graphs

ShownSetting: Input graph where the gray area must be cleared.

See Also

Developer's Guide
API
clearAreaStrategy
A strategy that clears the area by trying to minimize the number of moved nodes, changing the layout rather locally.

From the specified area, stripes running from the area border to the graph border in all four directions are considered. The area is now cleared by simply moving all elements inside the stripe in that direction, as far as necessary. If elements are not completely inside the stripe but collide with moved elements, then they are moved along too. This way, the moving stripe can quickly grow in some scenarios.

All edges where at least one node was moved are finally rerouted by the routing algorithm. This also applies for edges that cross the area if property considerEdges is enabled.

This strategy does not consider the component assignment setting.
Specifying an areaGroupNode and a LayoutGrid structure at the same time is not supported by this strategy. In that case the area group node is ignored, i.e. the space will not be created inside any group but the layout grid constraints are preserved. Therefore, it is strongly discouraged to select this strategy for grouped graphs that have a LayoutGrid.
static

Sample Graphs

ShownSetting: Input graph where the gray area must be cleared.

See Also

Developer's Guide
API
clearAreaStrategy
A strategy that clears the area by trying to minimize the number of moved nodes, changing the layout rather locally but moving all necessary nodes by a uniform offset.
This strategy basically works like LOCAL with the difference that nodes that are required to move are moved uniformly, by the same location offset. Therefore, compared to LOCAL this strategy preserves more of the initial relations. On the other hand, results can become less compact. As nodes are uniformly moved, edges where both end nodes were shifted do not need to be rerouted.
This strategy does not consider the component assignment setting.
Specifying an areaGroupNode and a LayoutGrid structure at the same time is not supported by this strategy. In that case the area group node is ignored, i.e. the space will not be created inside any group but the layout grid constraints are preserved. Therefore, it is strongly discouraged to select this strategy for grouped graphs that have a LayoutGrid.
static

Sample Graphs

ShownSetting: Input graph where the gray area must be cleared.

See Also

Developer's Guide
API
clearAreaStrategy
A strategy that clears the area with the goal to preserve the shape of the existing edge paths, moving related elements in common.

Preserving the shapes of the edge paths means that the direction of the edge segments is not changed and no new bends are created. The segment lengths may change in order to generate free space. The effect of this strategy is that the relative routes remain the same. The general aesthetics of a given layout are, ideally, preserved. The layout only becomes sparser to free up the desired space.

This strategy models all graph elements (nodes, edges, bends, labels) the same way and unifies related elements where appropriate. They are then moved in common in order to keep the relation among them as is.

For input graphs with a large number of edges, this strategy as well as PRESERVE_SHAPES_UNIFORM usually require less runtime than the other strategies, because the number of edges that have to be rerouted is smaller (rerouting is often very time consuming).
Compared to the local approaches LOCAL and LOCAL_UNIFORM, this strategy usually needs to move a larger number of nodes to achieve its goal.
With this approach, the best results can be obtained for input graphs with orthogonal edge routes and where the distance between elements does not fall below the specified spacing.
static

Sample Graphs

ShownSetting: Input graph where the gray area must be cleared.

See Also

Developer's Guide
API
clearAreaStrategy
A strategy that clears the area with the goal to preserve the shape of the existing edge paths, moving related elements in common and also moving all elements by a uniform offset.

In addition to the related strategy PRESERVE_SHAPES, this one uses a uniform offset for all elements that are moved. This way the relative locations between all elements in the graph are preserved. On the other hand, unnecessary additional space may be generated.

Preserving the shapes of the edge paths means that the direction of the edge segments is not changed and no new bends are created. The segment lengths may change in order to generate free space. The effect of this strategy is that the relative routes remain the same. The general aesthetics of a given layout are, ideally, preserved. The layout only becomes sparser to free up the desired space.

This strategy models all graph elements (nodes, edges, bends, labels) the same way and unifies related elements where appropriate. They are then moved in common in order to keep the relation among them as is.

For input graphs with a large number of edges, this strategy as well as PRESERVE_SHAPES usually require less runtime than the other strategies, because the number of edges that have to be rerouted is smaller (rerouting is often very time consuming).
Compared to the local approaches LOCAL and LOCAL_UNIFORM, this strategy usually needs to move a larger number of nodes to achieve its goal.
With this approach, the best results can be obtained for input graphs with orthogonal edge routes and where the distance between elements does not fall below the specified spacing.
static

Sample Graphs

ShownSetting: Input graph where the gray area must be cleared.

See Also

Developer's Guide
API
clearAreaStrategy

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: ClearAreaStrategy
The value to convert to an enum constant.

Return Value

ClearAreaStrategy
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: ClearAreaStrategy
The numeric value of an enum constant.

Return Value

string
The name of the enum constant.

Throws

Exception ({ name: 'Error' })
If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.