User Interaction

11 Jan 20186 minutes to read

Users can interact with the TreeMap control by selecting either the leaf nodes or the groups.

Selection

Selection support enables you to highlight the items on which the mouse tapping has occurred. You can select the following contents of the TreeMap control:

  • Leaf Nodes
  • Group

Single Selection

To enable the selection of the leaf nodes, the highlight on selection property in treemap is set as true. When the selection occurs, the item is highlighted with a bounding rectangle around the selected leaf node.
The border can be customized with the highlight border brush and highlight border thickness properties.

  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    highlightOnSelection : true,
                    highlightBorderBrush : "#3e3e3e",
                    highlightBorderThickness : 1
                    // ...                
                });
            });
    Caption to image

    Group Selection

    To enable the selection of leaf nodes, the highlight group on selection property in treemap is set as true. When the selection occurs, bounding rectangle highlights the selected group. The border can be customized with the highlight group border brush and highlight group border thickness properties.

  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    highlightGroupOnSelection : true,
                    highlightBorderBrush : "#3e3e3e",
                    highlightBorderThickness : 1
                    // ...                
                });
            });
    Caption to image

    MultiSelection

    This feature enables you to select multiple leaf nodes or groups simultaneously. To enable this feature for leaf nodes, set selectionMode as “multiple” and for groups, set group selection mode as “multiple
    To select multiple items simultaneously, the mouse tap should be done along with a continuous press of the “Control” key.

    Selection (Multiple)
  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    highlightOnSelection : true,
                    selectionMode: "multiple",
                    // ...                
                });
            });
    Caption to image

    Group Selection (Multiple)

  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    highlightGroupOnSelection : true,
                    groupSelectionMode: "multiple",
                    // ...                
                });
            });
    Caption to image

    Drag On Selection

    This feature enables you to highlight/select the leaf nodes or groups by the dragging the mouse pointer over the TreeMap items.

    Dragging On Selection

    To enable this feature, set the draggingOnSelection to “true”.

  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    draggingOnSelection : true,
                    // ...                
                });
            });
    Caption to image

    Dragging Group On Selection

    To enable this feature, set the draggingGroupOnSelection to “true”.

  • JS
  • jQuery(function ($) {
    
                $("#treemapContainer").ejTreeMap({
                    // ...
                    draggingGroupOnSelection : true,
                    // ...                
                });
            });
    Caption to image