ComponentOne TreeMap for ASP.NET WebForms
Features / Type
In This Topic
    Type
    In This Topic

    The regions of a TreeMap can be displayed as squareshorizontal rectangles or vertical rectangles. This can be changed with the help of Type property of the TreeMap. This topic uses the sample created in the Quick Start topic.

    In the Designer

    1. Right click the TreeMap control and select Properties to open the Properties Window.
    2. Set the Type property as per your requirement. The property is set to Squarified by default.
    3. In the Tooltip property, set the text that you want to display when you hover the mouse over the titles in the control.
    4. Press F5 to run the project.

    In Source View

    Set the Type property inside the <c1:C1TreeMap> tag, to change the type of TreeMap:

    Source View
    Copy Code
    <c1:c1treemap id="C1TreeMap2" runat="server" height="300px" width="500px" showbackbutton="True" viewstatemode="Enabled" Type="Vertical" >   
    

    In Code

    Add the following code to the Page_Load event, to set the ShowTooltips property to true and to set the tooltip text.

    C#
    Copy Code
    C1TreeMap1.Type = C1.Web.Wijmo.Controls.C1TreeMap.TreeMapType.Vertical;
    

    VB
    Copy Code
    C1TreeMap1.Type = C1.Web.Wijmo.Controls.C1TreeMap.TreeMapType.Vertical
    

    What You've Accomplished

    When you run the project, notice that the area of the TreeMap is divided in vertical rectangular regions, instead of square regions.