Skip to content
.NET, WinForms, XtraTreeMap
Branch: 16.1.4+
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Files to look at:

How to: provide flat data to TreeMap

This example demonstrates how to visualize flat data using TreeMap and color it using Group Gradient Colorizer.


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

Finally, to color each tree map group using similar colors, use the TreeMapGroupGradientColoriezer class. The Palette property specifies colors assigned to groups. The Max and Min properties configure the maximum and minimum portion of palette colors in colors assigned to items. The GradientColor property sets a color with which palette colors are mixed.

You can’t perform that action at this time.