Radial Tree Layout (formerly: Balloon Layout)
This chapter describes the major API changes to the RadialTreeLayout (formerly called BalloonLayout
)
introduced with yFiles for HTML 3.0 and how to migrate from the older version.
Like all major layout algorithms, the class no longer inherits from MultiStageLayout
, but implements
ILayoutAlgorithm directly.
The layout stages are now managed by a LayoutStageStack, which can be obtained via
the layoutStages property; see the migration chapter Layout Stages and Multi-Stage Layouts for more details.
Renamed, Moved, and Removed Classes and Members
The following table lists the renamed, moved, and removed classes and members of the major classes of the RadialTreeLayout.
yFiles for HTML 2.6 | yFiles for HTML 3.0 | Remarks |
---|---|---|
Changed Default Values and Behavior Changes
If non-tree graphs are provided as input, the layout algorithm now temporarily reduces them to trees by applying the TreeReductionStage. The non-tree edges are then routed using the router specified via the TreeReductionStage.nonTreeEdgeRouter. The TreeReductionStage used by the RadialTreeLayout is accessible via the property RadialTreeLayout.treeReductionStage.
The from-sketch mode (ordering policy FROM_SKETCH) does no longer take precedence over orders specified via layout data properties childOrder or nodeTypes.
Node labels are now considered by default. To change this behavior, set the nodeLabelPlacement property to the desired value. It is now also easier to place the node labels with GenericLabeling by setting the value to GENERIC.
Edge labels are now placed by default using an integrated edge labeling algorithm. To change this behavior set the edgeLabelPlacement property to the desired value. It is now also easier to place the edge labels with GenericLabeling by setting the value to GENERIC.
The default component arrangement style has been changed to PACKED_CIRCLE. The style can be specified via the ComponentLayout.style property. The ComponentLayout used by the RadialTreeLayout is accessible via the componentLayout property.
The compactnessFactor is now interpreted differently. Larger values now produce more compact layouts. The range of the compactness factor has been changed to the interval between 0 and 1.
Major Changes to Expert API
The changes described in this chapter only affect users who work directly with the LayoutGraph API, such as when writing custom layout algorithms.
Several methods for advanced customization of the layout result have been removed from the API, including
calculateChildArrangement
and calculateAngles
. Overriding these methods should not have been necessary.
To customize the preferred sector angles, the
callback method getPreferredChildSectorAngle is still
available.
The helper class BalloonLayoutNodeInfo
has also been removed. It was only necessary and useful during
the layout process and when overriding advanced methods that have now been removed.