Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Collapse]TreeMap Control
   [Expand]Getting Started
   [Expand]Providing Data
   [Collapse]Layout Algorithms
    [Expand]Examples
   [Expand]Colorizers
   [Expand]End-User Interaction
   [Expand]Visual Elements
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Layout Algorithms

This topic describes the layout algorithms used by the TreeMap control, and consists of the following sections.

Expanded Overview

The TreeMap control allows you to specify the algorithm used to layout tree map items. The Squarified algorithm is used by default.

To change the algorithm used to arrange tree map items, assign the required ITreeMapLayoutAlgorithm class descendant object to the TreeMapControl.LayoutAlgorithm property.

After that, customize algorithm settings. For example, all predefined algorithms support fill direction customization. To do this, use the TreeMapLayoutAlgorithmBase.Direction property.

The following sections describe predefined algorithm behavior.

Expanded Slice and Dice Layout Algorithm

This layout algorithm divides the space between items, slicing it in the specified direction depending on item value.

The following image demonstrates the country GDP tree map with a layout calculated using this algorithm.

To learn more about this algorithm, refer to the Tree Visualization with Tree-Maps: a 2D Space-Filling Approach paper.

Expanded Squarified Layout Algorithm

The Squarified algorithm lays out items, so that the width/height ratio will be closer to 1. In other words, this algorithm tries to square the layout.

The following image demonstrates the tree map layout calculated using this algorithm.

For more information about this algorithm, refer to the Squarified Treemaps paper.

Expanded Striped Layout Algorithm

This algorithm is a modified version of the Squarified algorithm. The main distinction of the Striped algorithm consists in preserving tree map item orientation, e.g., item width, calculated using this algorithm, is larger than height.

The following image demonstrates the layout calculated using this algorithm.

To learn more about this layout algorithm, refer to the Ordered and Quantum Treemaps: Making Effective Use of 2D Space to Display Hierarchies paper.

Expanded Custom Layout Algorithm

In addition to the predefined layout algorithms, it is possible to implement a custom layout algorithm. To do this, design a class derived from the ITreeMapLayoutAlgorithm and implement the ITreeMapLayoutAlgorithm.Calculate method.

Refer to the How to: Implement a Custom Layout Algorithm example to learn more.

Expanded See Also

How would you rate this topic?​​​​​​​