ChartDirector 7.1 (.NET Edition)

TreeMapNode.setLayoutMethod


Usage

[C#]public void setLayoutMethod(int layoutMethod [, int layoutDirection [, int swapXY ]]);
[VB]Public Sub setLayoutMethod(layoutMethod As Integer [, layoutDirection As Integer [, swapXY As Integer ]])

Description

Sets the layout method used to layout the child nodes.

The layout method is specified by using the following predefined constants as the layoutMethod argument.

ConstantValueDescription
TreeMapSquarify1The 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.
TreeMapStrip2The 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.
TreeMapBinaryBySize3Without 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.
TreeMapBinaryByCount4Same as TreeMapBinaryBySize except that the nodes will be partitioned so that the count of nodes are as equal as possible.
TreeMapSliceAndDice5This 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.

Arguments

ArgumentDefaultDescription
layoutMethod(Mandatory)The layout method used to layout the child nodes. A value of 0 means the layout method is not specified.
layoutDirection(Optional)The layout direction. Must be one of TopLeft, TopRight, BottomLeft and BottomRight. By default, the horizontal direction will be applied first, followed by the vertical direction.
swapXY(Optional)If set to true, the vertical direction will be applied first, followed by the horizontal direction. A false value means the opposite.

Return Value

None