Treemap Demo

author(s): Jon Arild Nygård

by austinnoronha

HTML

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

CSS

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

JavaScript

$(function () {
	var data = {
		"South-East Asia": {
			"Sri Lanka": {
				"Communicable & other Group I": "75.5",
					"Injuries": "89.0",
					"Noncommunicable diseases": "501.2"
			},
				"Bangladesh": {
				"Noncommunicable diseases": "548.9",
					"Injuries": "64.0",
					"Communicable & other Group I": "234.6"
			},
				"Myanmar": {
				"Communicable & other Group I": "316.4",
					"Injuries": "102.0",
					"Noncommunicable diseases": "708.7"
			},
				"Maldives": {
				"Injuries": "35.0",
					"Noncommunicable diseases": "487.2",
					"Communicable & other Group I": "59.2"
			},
				"Democratic People's Republic of Korea": {
				"Injuries": "91.9",
					"Noncommunicable diseases": "751.4",
					"Communicable & other Group I": "117.3"
			},
				"Bhutan": {
				"Injuries": "142.2",
					"Noncommunicable diseases": "572.8",
					"Communicable & other Group I": "186.9"
			},
				"Thailand": {
				"Injuries": "72.8",
					"Communicable & other Group I": "123.3",
					"Noncommunicable diseases": "449.1"
			},
				"Nepal": {
				"Noncommunicable diseases": "678.1",
					"Injuries": "88.7",
					"Communicable & other Group I": "251.8"
			},
				"Timor-Leste": {
				"Injuries": "69.2",
					"Noncommunicable diseases": "670.5",
					"Communicable & other Group I": "343.5"
			},
				"India": {
				"Communicable & other Group I": "253.0",
					"Injuries": "115.9",
					"Noncommunicable diseases": "682.3"
			},
				"Indonesia": {
				"Injuries": "49.3",
					"Noncommunicable diseases": "680.1",
					"Communicable & other Group I": "162.4"
			}
		},
			"Europe": {
			"Hungary": {
				"Communicable & other Group I": "16.8",
					"Noncommunicable diseases": "602.8",
					"Injuries": "44.3"
			},
				"Poland": {
				"Communicable & other Group I": "22.6",
					"Noncommunicable diseases": "494.5",
					"Injuries": "48.9"
			},
				"Israel": {
				"Communicable & other Group I": "31.2",
					"Noncommunicable diseases": "311.2",
					"Injuries": "20.8"
			},
				"France":...