Skip to main content

TreeMap

Namespace: Wisej.Web.Ext.Syncfusion2

Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)

The tree map 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.

public class TreeMap : ej2Base

Constructors​

Instance member TreeMap()​

Constructs a new instance of the TreeMap class.

Example:

The following example creates a tree map where the size of each rectangle is given by the number of orders, configured through the Options object.

var treeMap = new TreeMap();
treeMap.Options.weightValuePath = "orders";
treeMap.Options.leafItemSettings = new { labelPath = "product" };
treeMap.Options.dataSource = new[]
{
new { product = "Chai", orders = 120 },
new { product = "Chang", orders = 85 },
new { product = "Tofu", orders = 40 }
};
treeMap.Dock = DockStyle.Fill;
this.Controls.Add(treeMap);

Instance member TreeMap(options)​

Constructs a new instance of the TreeMap class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a tree map that groups the countries by continent and shows a tooltip.

var treeMap = new TreeMap(new
{
weightValuePath = "population",
tooltipSettings = new { visible = true },
levels = new[] { new { groupPath = "continent" } },
leafItemSettings = new { labelPath = "country" },
dataSource = new[]
{
new { continent = "Europe", country = "Germany", population = 84 },
new { continent = "Europe", country = "Italy", population = 59 },
new { continent = "Asia", country = "Japan", population = 124 }
}
});
treeMap.Dock = DockStyle.Fill;
this.Controls.Add(treeMap);

Implements​