#Legend

##Legend visibility

The legend shows the value range differences and color occurrence in the respective leaf node while hovering it with the cursor.

NOTE

By default, the legend is visible in the pivot tree map.

You can disable the legend by setting the showLegend property to false. The following code example shows how to disable the legend:

  • html
  • /// <reference path="jquery.d.ts" />
    /// <reference path="ej.web.all.d.ts" />
    
    $(function () {
        var sample = new ej.PivotTreeMap($("#PivotTreeMap1"), { 
            renderSuccess: function (args) {
                let treemapTarget = $('#PivotTreeMap1TreeMapContainer').data("ejTreeMap");
                treemapTarget.model.showLegend = false;
                treemapTarget.refresh();
            }
        });
    });