By default FoamTree lays out the input groups as polygons in the order of increasing weights. Sometimes, however, it may be desirable to preserve the order of groups presented in the input data object.
One way to preserve the input order is to set the
layout option to
ordered, which will cause FoamTree to lay out the groups as polygons in the left-to-right,
Alternatively, to lay out the groups as polygons approximately in the left-to-right
ordered. How closely
the original order will be preserved depends on how imbalanced group weights are. The lower the variance
of the weights, the better the order will be preserved.
Using the experiments section below, you can see how well the original order of groups will be preserved
with different layout and initializer settings. To make order preservation judgments easier, this example sets
groupColorDecorator to vary the
lightness of the polygon depending on the position in the data object.
Generating ordered rectangular layout by setting the
Varying the lightness of the group's color depending on its position in the data object using a custom