documentationfor yFiles for HTML 2.6

CompactDiskLayout

This layout algorithm arranges a graph on a disk packing the nodes as dense as possible.

Inheritance Hierarchy
MultiStageLayout
CompactDiskLayout
Implemented Interfaces

Remarks

Layout Style

The nodes are arranged on a disk such that the disk's radius is minimized. The layout mostly optimizes the dense placement of the nodes, while edges play a minor role. Hence, the compact disk layout is mostly suitable for graphs with small components whose loosely connected nodes should be grouped and packed in a small area.

Concept

The CompactDiskLayout arranges the nodes on a disk from the inside out packing them as dense as possible. During this iterative process it avoids node overlaps and label overlaps (if activated; see integratedNodeLabeling and considerNodeLabels). In particular, to keep the layout compact the CompactDiskLayout may decide to place a single node or multiple nodes in the center of the disk.

Features

Connected Components

By default, the CompactDiskLayout takes the connected components for the placement of the nodes into account. In that case the nodes of the same component are placed sequentially in the iterative placement process ensuring that they form a visual component. Input graph consisting of multiple components. Compact disk layout.

Node Types

If node types are defined, the CompactDiskLayout takes these into account instead of the connected components. In particular, nodes of the same type are placed closely together forming a visual component. Input graph with node types 'A', 'B' and 'C'. Compact disk layout taking the node types for the placement of the nodes into account.

From Sketch

Use fromSketchMode to take the coordinates of the input diagram into account when arranging the nodes on the disk. Input graph where the nodes are roughly placed on circles. Compact disk layout taking the coordinates of the input diagram into account.

Node Labeling

The CompactDiskLayout allows for integrated node labeling. Node labels are placed automatically without generating overlaps with other labels or graph elements. There are different ways to place node labels.

Default Values of Properties

considerNodeLabelsfalseNode labels are not considered.
fromSketchModefalseThe layout algorithm does not consider the initial coordinates of the nodes.
integratedNodeLabelingfalseNode labels are not placed by this algorithm.
minimumNodeDistance0
nodeLabelingPolicyRAY_LIKE_LEAVES

Type Details

yfiles module
layout-organic
yfiles-umd modules
layout-multipage, layout-organic, layout
Legacy UMD name
yfiles.circular.CompactDiskLayout

See Also

This layout is mostly suitable for (sub-)graphs with few edges or small components, as edges may easily cross the center of the disk producing a cluttered appearance. In particular, it is suitable for winding paths around a center.
The layout is optimized for nodes whose shapes are circles (preferably of unit size). In case that the shapes of the nodes are not circles, add a node halo (possibly of size 0) to the nodes in order to avoid node overlaps: this lets the layout algorithm consider the circumcircle of the halo. Rectangular nodes without halos may partly overlap. Circular nodes cannot overlap.

Constructors

Properties

Methods