Treemap Demo

by amrutaJgtp

HTML

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


<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/heatmap.js"></script>
<script src="https://code.highcharts.com/modules/treemap.js"></script>
<div id="container"></div>

JavaScript

Highcharts.chart('container', {
  "chart": {
    "inverted": false,
    "backgroundColor": "rgba(255,255,255,0)",
    "plotBackgroundColor": "rgba(255,255,255,0)",
    "type": "treemap"
  },
  "title": {
    "text": ".",
    "style": {
      "color": "rgba(255, 255, 255, 0)",
      "fontSize": "1px"
    }
  },
  "tooltip": {
    "enabled": true,
    "shared": false,
    "borderWidth": 1,
    "borderRadius": 1,
    "backgroundColor": "#ffffff",
    "style": {
      "color": "#000000",
      "fontSize": "1rem",
      "fontFamily": "Lucida Sans Unicode,Verdana,Helvetica,Arial",
      "fontWeight": "normal",
      "fontStyle": "normal",
      "textDecoration": "none"
    },
    "crosshairs": [null, null]
  },
  "plotOptions": {
    "treemap": {
      "animation": {
        "duration": 700
      },
      "cursor": "pointer",
      "allowPointSelect": true,
      "showInLegend": true,
      "turboThreshold": 0,
      "stickyTracking": true,
      "events": {},
      "point": {
        "events": {}
      }
    }
  },
  "legend": {
    "enabled": true,
    "item": {},
    "borderWidth": 0,
    "layout": "horizontal",
    "eQLegendPlacement": "CHART",
    "backgroundColor": "rgba(255,255,255,0)",
    "itemStyle": {
      "color": "#000000",
      "fontSize": "1rem",
      "fontFamily": "Lucida Sans Unicode,Verdana,Helvetica,Arial",
      "fontWeight": "normal",
      "fontStyle": "normal",
      "textDecoration": "none"
    },
    "align": "center",
    "verticalAlign": "bottom",
    "margin": 12,
    "padding": 8
  },
  "credits": {
    "enabled": false
  },
  "exporting": {
    "enabled": true
  },
  "lang": {
    "noData": ""
  },
  "series": [{
    "layoutAlgorithm": "squarified",
    "levels": null,
    "alternateStartingDirection": true,
    "name": "Sales",
    "internalName": "Geomap__Geomap__Msr_Sales",
    "data": [{
      "eQCategoryValue": "United States",
      "name": "United States",
      "value": 14888,
      "colorValue": 14888
    }, {
     ...