# Layout Strategies

By the end of this help topic, you will learn about the Layout Strategies which are responsible for data tiling in the RadTreeMap control. *Treemap* algorithms represent hierarchical data sets via recursive subdivision of the initial rectangle. The area of each rectangle in the treemap is proportional to the size of that particular node.

> note Layout Strategies are always applied to child nodes.

Currently there are two Layout Strategies to visualize the data:

### Squarified

It creates rectangles with best aspect ratio:

![WinForms RadTreeMap Squarified](https://www.telerik.com/products/winforms/documentation/assets/b1b45f0343951476b40a0b33d9fb8a0b/treemap-layout-strategies001.png)

```C#
SquarifiedAlgorithm squarifiedAlgorithm = new SquarifiedAlgorithm();
this.radTreeMap1.Algorithm = squarifiedAlgorithm;
```

```VB.NET
Dim squarifiedAlgorithm As SquarifiedAlgorithm = New SquarifiedAlgorithm()
Me.radTreeMap1.Algorithm = squarifiedAlgorithm
```

> note The default layout is Squarified.

### Slice and Dice

It creates rectangles with high aspect ratio and displays them sorted either horizontally or vertically:

![WinForms RadTreeMap Slice and Dice](https://www.telerik.com/products/winforms/documentation/assets/98e021105b9fd7b28f01e7a2fa7064bf/treemap-layout-strategies002.png)

For the **Slice and Dice** algorithm you can specify **Orientation** (*Horizontal*, *Vertical* or *Smart*) and **SortDirection** (*Ascending* or *Descending*):

```C#
SliceDiceAlgorithm sliceDiceAlgorithm = new SliceDiceAlgorithm();
sliceDiceAlgorithm.Orientation = SliceDiceOrientation.Horizontal;
sliceDiceAlgorithm.SortDirection = ListSortDirection.Descending;
this.radTreeMap1.Algorithm = sliceDiceAlgorithm;
```

```VB.NET
Dim sliceDiceAlgorithm As SliceDiceAlgorithm = New SliceDiceAlgorithm()
sliceDiceAlgorithm.Orientation = SliceDiceOrientation.Horizontal
sliceDiceAlgorithm.SortDirection = System.ComponentModel.ListSortDirection.Descending
Me.radTreeMap1.Algorithm = sliceDiceAlgorithm
```

Setting the **Orientation** to *Smart* means that the algorithm will automatically choose the most appropriate orientation depending on your data and the available space.

```C#
SliceDiceAlgorithm sliceDiceAlgorithmSmart = new SliceDiceAlgorithm();
sliceDiceAlgorithmSmart.Orientation = SliceDiceOrientation.Smart;
this.radTreeMap1.Algorithm = sliceDiceAlgorithmSmart;
```

```VB.NET
Dim sliceDiceAlgorithmSmart As SliceDiceAlgorithm = New SliceDiceAlgorithm()
sliceDiceAlgorithmSmart.Orientation = SliceDiceOrientation.Smart
Me.radTreeMap1.Algorithm = sliceDiceAlgorithmSmart
```

#### Vertical Slice and Dice

![WinForms RadTreeMap Vertical Slice and Dice](https://www.telerik.com/products/winforms/documentation/assets/5872237d5331f050a230ae2ad8d3596e/treemap-layout-strategies003.png)

## See Also

* [Structure](https://www.telerik.com/products/winforms/documentation/controls/treemap/structure)

* [Getting Started](https://www.telerik.com/products/winforms/documentation/controls/treemap/getting-started)
