Methods and Events in EJ 1 ASP.NET MVC TreeMap

20 Jun 2018 / 9 minutes to read

Method

Refresh()

refresh() method is used to reload the treemap with updated values.

Returns: void

  • cshtml
  • @(Html.EJ().TreeMap("treemap"))
    
        <script type="text/javascript">
            $("#treemap").ejTreeMap();
            var treemapObj = $("#treemap").data("ejTreeMap");
            treemapObj.refresh();
        </script>

    Events

    TreeMapItemSelected

    TreeMapItemSelected event will trigger when treemap item is selected.

    Name Type Description
  • html
  • originalEvent
    object Returns selected treeMapItem object.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .TreeMapItemSelected("itemSelected")
        )
        function itemSelected(sender) { 
            // do something
        }

    DrillStarted

    DrillStarted event will fire, when the drilldown action is started in the treemap control.

    Name Type Description
  • html
  • originalEvent
    object Returns selected drilled treeMap object.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .DrillStarted("onDrillStarted")
        )
        function onDrillStarted(sender) { 
            // do something
        }

    DrillDownItemSelected

    If the treemap drilldown item is selected, then DrillDownItemSelected event will fire.

    Name Type Description
  • html
  • originalEvent
    object Returns selected drilldown treeMap object.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .DrillDownItemSelected("drillDownItemSelected")
        )
        function drillDownItemSelected(sender) { 
            // do something
        }

    HeaderTemplateRendering

    HeaderTemplateRendering event will fire before rendering the treemap drilldown header template.

    Name Type Description
  • html
  • originalEvent
    object Returns drilldown header.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .HeaderTemplateRendering("loadTemplate")
        )
        function loadTemplate(sender) { 
            // do something
        }

    Refreshed

    Refreshed event will trigger after refreshing the treemap control with updated values.

    Name Type Description
  • html
  • originalEvent
    object Refresh and load the treemap.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .Refreshed("onRefreshed")
        )
        function onRefreshed(sender) { 
            // do something
        }

    TreeMapGroupSelected

    TreeMapGroupSelected event will fired when the group selection is performed on treemap items.

    Name Type Description
  • html
  • originalEvent
    object Returns the selected group of treeMapItems as object.
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .TreeMapGroupSelected("groupSelected")
        )
        function groupSelected(sender) { 
            // do something
        }

    ItemRendering

    ItemRendering event will trigger while rendering each item in treemap.

    Name Type Description
  • html
  • originalEvent
    object Returns each leaf items in treemap
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .ItemRendering("itemRendering")
        )
        function itemRendering(sender) { 
            // do something
        }

    LegendItemRendering

    LegendItemRendering event will trigger while rendering each legend item in treemap.

    Name Type Description
  • html
  • originalEvent
    object Returns each legend item in treemap
  • cshtml
  • @(Html.EJ().TreeMap("treemap")
            .LegendItemRendering("legendItemRendering")
        )
        function legendItemRendering(sender) { 
            // do something
        }

    Click

    Click event will trigger while clicking an item in the treemap.

  • cshtml
  • @(Html.EJ().TreeMap("treemap")
    
    .Click("click")
    
    )
     
    function click(){
        // Do Something
    }

    DoubleClick

    DoubleClick event will trigger while double clicking an item in the treemap

  • cshtml
  • @(Html.EJ().TreeMap("treemap")
    
    .DoubleClick("doubleClick")
    
    )
    
    function doubleClick(){
        // Do Something
    }

    RightClick

    RightClick event will trigger while right clicking an item in the treemap.

  • cshtml
  • @(Html.EJ().TreeMap("treemap")
    
    .RightClick("rightClick")
    
    )
     
    function rightClick(){
        // Do Something
    }