Start angle
If you want to rotate a balloon layout, you can modify the start
angle of the layout. This is the angle where the first child node
is placed at the root. All subtrees rotate with this start angle.
The angle spacing value FAST_PROPORTIONAL
is not stable with respect to the start angle: the layout can
change considerably when you change the start angle. The other
angle spacing values are stable: they rotate the entire layout.
The start angle must be 0° - 360°.
To change the start angle:
In CSS
In CSS, specify:
balloonStartAngle: "90";
In Java
In Java™ , call:
layout.setBalloonStartAngle(90);
Angle range
Normally, child nodes are placed all
around their parent node; they occupy an angle range of 360°
around the parent. It is possible to limit the angle range
available for child nodes. In the following figure, the angle
range for child nodes is 360° degrees on the left, 270° in the
middle and 180° on the right. You can specify a different angle
range for the root, for nodes that have only leaves, and for
inner nodes of the tree.
To change the angle ranges:
In CSS
In CSS, specify:
balloonRootChildrenAngle: "270"; balloonInnerChildrenAngle: "270"; balloonLeafChildrenAngle: "270";
In Java
In Java™ , call:
layout.setBalloonRootChildrenAngle(270); layout.setBalloonInnerChildrenAngle(270); layout.setBalloonLeafChildrenAngle(270);
Disconnected trees
Multiple disconnected trees can be laid out together by the
balloon layout mode. By default, they are arranged in a sequence
according to the flow direction of the layout. As an alternative,
you can choose the generic disconnected graph spacing. For
details, see Layout of connected components (TL).
Another alternative, as for radial layout mode, is to introduce
an invisible root. In this case, the balloons are arranged around
the invisible root.
To add an invisible root to the layout:
In CSS
In CSS, specify:
layoutOfConnectedComponentsEnabled: "false"; invisibleRootUsed: "true";
In Java
Call:
layout.setLayoutOfConnectedComponentsEnabled(false); layout.setInvisibleRootUsed(true);