Sets the layout method used to layout the child nodes.
The layout method is specified by using the following predefined constants as the layoutMethod
|TreeMapSquarify||1||The nodes will be layout so that they are as close to a square as possible. This method may sort the nodes, so the ordering of the nodes on the chart may be different from the ordering in the data array.
|TreeMapStrip||2||The nodes will flow according to the layoutDirection argument. The default is TopLeft, which means the nodes will flow from left to right and top to bottom like text. The number of nodes in each row will be such that on average, they are as close to squares as possible.
|TreeMapBinaryBySize||3||Without changing the ordering of the nodes, the nodes will be partitioned into two groups so that their sizes are as equal as possible. The two groups will then become two rectangular region. If the width of the plot area is not smaller than its height, the two groups will be placed at the left and right sides of plot area, otherwise they will be placed at the top and bottom sides of the plot area. The splitting then recursively apply to each group to partition them, until each subgroup contains only one node and can no longer be partitioned.
|TreeMapBinaryByCount||4||Same as TreeMapBinaryBySize except that the nodes will be partitioned so that the count of nodes are as equal as possible.
|TreeMapSliceAndDice||5||This method is intended for multi-level tree maps. Assume the layout direction is TopLeft, the first level nodes will flow from left to right. The second level nodes will flow from top to bottom. If there are more levels, they will alternate between left/right and top/bottom flow directions. The layoutDirection argument can be used to specify other layout directions.
If a layout method argument is not specified, it will be obtained from the prototype node (see TreeMapChart.getLevelPrototype
). If it is still not specified, the parent node will be used. If the node is the root node with no parent, the default is to use TreeMapSquarify with TopLeft
layout direction and without swapXY.
© 2021 Advanced Software Engineering Limited. All rights reserved.