Treemap legend

by Black Label

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/treemap.js"></script>

<div id="container"></div>

CSS

#container {
    width: 300px;
    width: 600px;
    margin: 0 auto;
}

JavaScript

$(function () {
var H = Highcharts;

H.addEvent(H.Legend, 'afterGetAllItems', function (e) {
	e.allItems.splice(1,1)
})


    $('#container').highcharts({
        'chart': {
            type: 'treemap'
        },

        series: [{
    
            data: [{
                'name': 'Americas',
                    'value': 52976,
                'color': 'rgba(47,126,216,1)'
            }, {
                'name': 'Australia',
                    'value': 41219,
                    'color': 'rgba(13,35,58,1)'
            }, {
                'name': 'Europe',
                    'value': 62756,
                    'color': 'rgba(139,188,33,1)'
            }, {
                'name': 'Asia',
                    'value': 14577,
                    'color': 'rgba(145,0,0,1)'
            }],
            legendType: 'point',
            showInLegend: true
        }]


    });
});