You can display a region's Label and Value on hovering the mouse over a region by simply setting the ShowTooltip property to true. This topic uses the sample created in
This topic uses the sample created in the Quick Start topic and displays the area covered by each country (in square miles) when you hover the mouse over a country.
Set the ShowTooltip property to true and set the the tooltip text inside the <c1:C1TreeMap> tag, to display tooltips:
Source View |
Copy Code
|
---|---|
<c1:c1treemap id="C1TreeMap1" runat="server" height="300px" width="500px" showbackbutton="True" viewstatemode="Enabled" ShowTooltip="True" ToolTip="Area covered (in square miles)"> |
Add the following code to the Page_Load event, to set the ShowTooltip property to true and to set the the tooltip text.
C# |
Copy Code
|
---|---|
C1TreeMap1.ShowTooltip = true; C1TreeMap1.ToolTip = "Area covered(in square miles)"; |
VB |
Copy Code
|
---|---|
C1TreeMap1.ShowTooltip = True C1TreeMap1.ToolTip = "Area covered (in square miles)" |
When you run the project, hover the mouse over a region, notice that the Label and Value of the region are displayed in the tooltip, as shown below:
Hover the mouse over the titles, notice that the tooltip text that you entered is displayed in the tooltip, as shown below: