documentationfor yFiles for HTML 3.0.0.3

RemoveOverlapsStage

This ILayoutStage removes node overlaps and guarantees a certain minimum distance between nodes.

Inheritance Hierarchy
LayoutStageBase
RemoveOverlapsStage
Implemented Interfaces

Remarks

Layout Style

This stage only removes overlaps between nodes of the input graph. To do so, overlapping nodes will be moved apart. Before removing the node overlaps, an optional coreLayout is applied.

A graph containing overlaps (left) and the result after the overlap removal

Features

There are two strategies offered for removing overlaps:

  • SHUFFLE: The fast and default policy. Results often look like a stretched version of the original graph.
  • PRESERVE_RELATIVE_LOCATIONS: A more involved strategy which can generate higher quality results and tries to preserve the relative locations of neighboring elements as they are given in the input. This is especially suitable for undirected graph drawings with straight-line edges, as produced by organic layout approaches.

It is possible to define a minimum distance between nodes. This feature allows to not only remove overlaps but forces nodes to keep a specified distance to other nodes.

Default Values of Properties

horizontalOverlapCriterionLESS_MOVEMENT
overlapRemovalPolicySHUFFLE
stopDurationMAX_VALUE

Type Details

yFiles module
algorithms
Overlaps between nodes and edges are not removed by this stage.
This stage does not directly support group nodes. However, if the graph contains groups, this stage can be applied as core layout algorithm of the RecursiveGroupLayout.

Constructors

Properties

Methods

Constants