TreeMapControl Class

Displays flat and hierarchical data by using nested rectangles. See TreeMap Control.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v20.1.dll

Declaration

[ComVisible(true)]
public class TreeMapControl :
    HierarchicalChartControlBase
<ComVisible(True)>
Public Class TreeMapControl
    Inherits HierarchicalChartControlBase

Related API Members

The following members accept/return TreeMapControl objects:

Remarks

The DevExpress WinForms TreeMap Control provides all the functionality required to display tree maps in your WinForms applications. You are free to use a data source representing flat data and group it, or the hierarchical data source for visualization.

The control has built-in item highlighting, selection and tooltips.

The following image demonstrates a TreeMapControl.

TreeMapControl

To get acquainted with using the TreeMapControl, please refer to the Getting Started section.

Examples

To provide flat data to a TreeMap, create a TreeMapFlatDataAdapter object and assign it to the TreeMapControl.DataAdapter property. Then, specify the adapter's TreeMapFlatDataAdapter.DataSource, TreeMapFlatDataAdapter.LabelDataMember and TreeMapFlatDataAdapter.ValueDataMember to configure the data source object and which data members should be used to generate tree map items. If you need to group generated items, add the name of a data member whose values should be used to group items, to the TreeMapFlatDataAdapter.GroupDataMembers collection.

void ConfigureTreeMapDataAdapter() {
    TreeMapFlatDataAdapter adapter = new TreeMapFlatDataAdapter {
        DataSource = CreateBillionaireInfos(),
        LabelDataMember = "Name",
        ValueDataMember = "NetWorth"
    };
    adapter.GroupDataMembers.Add("Residence");
    treeMap.DataAdapter = adapter;
}

Implements

See Also