Tooltips

  • 2 min to read

The Tree Map control allows you to customize tooltips that should be displayed for leaf and group tree map items. This topic describes in detail how this can be done and consists of the following sections.

ToolTips Text Customization

The simplest way to customize tooltips is configure the text pattern used to build the tooltip's text.

The TreeMap contains the TreeMapControl.ToolTipPattern and TreeMapControl.ToolTipGroupPattern properties allowing you to specify patterns used for leaf item and group item tooltips respectively.

The following placeholders are supported.

Placeholder Description
{L} Displays a tree map item label.
{V} Displays a tree map item value.
NOTE

Values can be formatted.

The following image demonstrates the TreeMap with a tooltip pattern that equals to {L}: {V:C0} millions.

ToolTipPattern

ToolTip Content Customization

The other way of customizing tooltip content is to specify content template used by tooltips.

The TreeMap control allows you to specify content templates for group and leaf items separately. Use the TreeMapControl.ToolTipContentTemplate and TreeMapControl.ToolTipGroupContentTemplate properties for that.

Note that available to tooltip data is stored in a ToolTipInfo object.

The following image demonstrates a tooltip with custom content.

TreeMap_TooltipContentTemplate

ToolTip Appearance Customization

In addition to tooltip content customization, it is possible to customize the tooltip appearance. To do this, assign a custom data template to the TreeMapControl.ToolTipTemplate property. The following image demonstrates a tooltip with a custom appearance.

TreeMap_ToolTipTemplate

See Also