We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The WinForms TreeMap control provides a simple and effective way to visualize flat or hierarchical data as clustered rectangles with a specific, weighted attribute determining the size of each rectangle. This control has highly customizable features such as the ability to display hierarchical and flat-level data, legends, different layouts, and color mapping.


Tree map levels

The levels of WinForms TreeMap can be categorized into two types to visualize data: TreeMapFlatLevel and TreeMapHierarchicalLevel.

WinForms TreeMap shows flat data example.

Flat levels

Visualize the levels for a flat data collection. The items source set to the tree map must be a flat data collection.

WinForms TreeMap shows hierarchical data example.

Hierarchical levels

Visualize the levels for a hierarchical data collection that contains tree-structured data. The items source set to the tree map must be a hierarchical data collection.


Leaf nodes

The WinForms TreeMap contains groups of data collections and each group has one or more leaf nodes. Each leaf node is displayed as a rectangle, sized and colored according to values assigned.

WinForms TreeMap shows customized leaf node border.

Border customization

Customize the leaf node borders to enhance readability.

WinForms TreeMap shows customized gap for leaf node.

Gap customization

Customize gaps within the group of leaf nodes to enhance readability.

WinForms TreeMap custom view support for nodes.

Custom view

The WinForms TreeMap control provides template support for tree map nodes, which allow any type of custom template to be created with any type of view element.


Color mapping

Color mapping supports categorizing the nodes by customizing their colors based on the underlying values.

Colors applied in WinForms TreeMap by range color mapping support.

Range color mapping

Apply colors to nodes by comparing their values with a desired numeric range. For example, apply colors to countries based on their population growth.

Colors applied in WinForms TreeMap by desaturation color mapping support.

Desaturation color mapping

Apply colors to nodes by comparing their values with desaturation color order. For example, apply transparent color to the countries based on their population variation from higher to lower.

Single color applied in WinForms TreeMap.

Uni-color mapping

Apply a single color to the all the nodes.

Colors applied in WinForms TreeMap by palette color mapping support.

Palette color mapping

Colors each node with the color specified in palette color mapping.


Layouts

The WinForms TreeMap provides different types of layout options to view child nodes in effective ways.

WinForms TreeMap shows layout using squarified algorithm.

Squarified

In this layout, the data is visualized in the form of square-like rectangles with the best aspect ratio.

 WinForms TreeMap shows layout using SliceAndDiceAuto algorithm.

SliceAndDiceAuto

The data is visualized in this layout in the form of long, thin rectangles, which can be displayed either vertically or horizontally with high aspect ratio.

 WinForms TreeMap shows layout using SliceAndDiceHorizontal algorithm.

SliceAndDiceHorizontal

This layout creates rectangles with high aspect ratio and displays them horizontally.

 WinForms TreeMap shows layout using SliceAndSizeVertical algorithm.

SliceAndSizeVertical

This layout creates rectangles with high aspect ratio and displays them vertically.


Legend

A legend is used to add additional information for interpreting a tree map with various colors, shapes, or other identifiers.

WinForms TreeMap shows different types of legend icons.

Icon types

Change the type of legend icon to built-in shapes such as circles, rectangles, or custom shapes.

WinForms TreeMap shows customized legend icons.

Icon customization

Change or move the position of a legend to any place inside a tree map.


WinForms TreeMap Code Example

Easily get started with the WinForms TreeMap using a few simple lines of C# code example as demonstrated below. Also explore our WinForms TreeMap Example that shows you how to render and configure the WinForms TreeMap.

using Syncfusion.Windows.Forms.TreeMap;
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        TreeMap TreeMap1 = new TreeMap();
        public Form1()
        {
            InitializeComponent();
            TreeMap1.Size = new System.Drawing.Size(880, 585);
            this.ClientSize = new System.Drawing.Size(880, 585);
            TreeMap1.ItemsSource = this.GetPopulationDetails();
            TreeMap1.WeightValuePath = "Population";
            TreeMap1.ColorValuePath = "Growth";
            TreeMap1.ItemsLayoutMode = Syncfusion.Windows.Forms.TreeMap.ItemsLayoutModes.Squarified;
            TreeMapFlatLevel treeMapFlatLevel1 = new TreeMapFlatLevel();
            treeMapFlatLevel1.GroupPath = "Continent";
            treeMapFlatLevel1.ItemsGap = 2;
            TreeMap1.Levels.Add(treeMapFlatLevel1);
            TreeMapFlatLevel treeMapFlatLevel2 = new TreeMapFlatLevel();
            treeMapFlatLevel2.GroupPath = "Country";
            treeMapFlatLevel2.HeaderHeight = 25;
            TreeMap1.Levels.Add(treeMapFlatLevel2);
            this.Controls.Add(TreeMap1);
        }
        private DataTable GetPopulationDetails()
        {
            DataTable PopulationDetails = new DataTable();
            PopulationDetails.Columns.Add("Continent", typeof(string));
            PopulationDetails.Columns.Add("Country", typeof(string));
            PopulationDetails.Columns.Add("Growth", typeof(double));
            PopulationDetails.Columns.Add("Population", typeof(double));
            PopulationDetails.Columns.Add("StrPopulation", typeof(string));
            PopulationDetails.Rows.Add("Asia", "Indonesia", 3, 237641326, "237.6 M");
            PopulationDetails.Rows.Add("Asia", "Russia", 2, 152518015, "152.5 M");
            PopulationDetails.Rows.Add("Asia", "Malaysia", 1, 29672000, "29.7 M");
            PopulationDetails.Rows.Add("North America", "United States", 4, 315645000, "315.6 M");
            PopulationDetails.Rows.Add("North America", "Mexico", 2, 112336538, "112.3 M");
            PopulationDetails.Rows.Add("North America", "Canada", 1, 35056064, "35.1 M");
            PopulationDetails.Rows.Add("South America", "Colombia", 1, 47000000, "47 M");
            PopulationDetails.Rows.Add("South America", "Brazil", 3, 193946886, "193.9 M");
            PopulationDetails.Rows.Add("Africa", "Nigeria", 2, 170901000, "170.9 M");
            PopulationDetails.Rows.Add("Africa", "Egypt", 1, 83661000, "83 M");
            PopulationDetails.Rows.Add("Europe", "Germany", 1, 81993000, "82 M");
            PopulationDetails.Rows.Add("Europe", "France", 1, 65605000, "65.6 M");
            PopulationDetails.Rows.Add("Europe", "UK", 1, 63181775, "63.2 M");
            return PopulationDetails;
        }
    }
}



95+ WINDOWS FORMS CONTROLS

Frequently Asked Questions

  • A simple and effective way to visualize flat or hierarchical data as clustered rectangles with a specific, weighted attribute determining the size of each rectangle.
  • Highly customizable features such as legends, different layouts, and color mapping.
  • One of the best WinForms TreeMap in the market that offers feature-rich UI to interact with the software.
  • Simple configuration and API.
  • Extensive demos and documentation to let you learn quickly and get started with the WinForms TreeMap control.

You can find our WinForms TreeMap demo on

GitHub location.

No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version Download Free Trial

Syncfusion Windows Forms Resources

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon
Live Chat Icon For mobile