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
   [Collapse]Providing Data
    [Expand]Examples
   [Expand]Layout Algorithms
   [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]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]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Providing Data

This topic describes Data Adapters that can specify data for visualization using the TreeMap control, and consists of the following sections.

Expanded Overview

The TreeMap control allows you to specify how provide groups and leafs that should be visualized. To do this, assign an object of a class implementing the ITreeMapDataAdapter interface to the TreeMapControl.DataAdapter property.

All Data Adapters shipped with the TreeMap control are described below.

Expanded Create Tree Map Items Manually

The TreeMapItemStorage is used to provide map items manually. To display an item, add it to the TreeMapItemStorage.Items collection. To manually provide a group to the TreeMap, add a tree map item to the storage items collection and populate the item’s TreeMapItem.Children collection.

The following image shows a TreeMap populated with items manually.

Refer to the How to: Manually Add Items to a TreeMap example to learn more.

Expanded Adapt Flat Data

To visualize flat data, use the TreeMapFlatDataAdapter adapter. This adapter converts data members specified using the TreeMapFlatDataAdapter.DataMember property to tree map items with values obtained from a data member specified using the TreeMapFlatDataAdapter.ValueDataMember property, and labels obtained from a data member specified using the TreeMapFlatDataAdapter.LabelDataMember property.

The flat data adapter allows you to aggregate generated tree map items into groups. To do this, add a data member name whose values should be used to group items in the TreeMapFlatDataAdapter.GroupDataMembers collection.

The following image demonstrates the use of the data adapter.

Refer to the How to: Provide Flat Data to a TreeMap example to learn more.

Expanded Adapt Hierarchical Data

It is possible to visualize hierarchical data using the TreeMapHierarchicalDataAdapter adapter. Using the TreeMapHierarchicalDataAdapter.Mappings collection, it is possible to specify which data members should be used as item labels, values or children items.

The following image shows hierarchical data visualized using the TreeMap.

Refer to the How to: Provide Hierarchical Data to a Tree Map example to learn more.

Expanded See Also

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