JavaScript TreeMap

Invoke the render method of the jqxTreeMap. Author: http://jqwidgets.com

by jqwidgets

HTML

<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<div id="treemap"></div>
<input type="button" style="margin: 50px;" id="jqxbutton" value="Render" />

JavaScript

var data = [{
     label: 'Chrome',
     value: 44.06,
     color: "#37c837"
 }, {
     label: 'Internet Explorer',
     value: 22.08,
     color: "#0066ff"
 }, {
     label: 'Firefox',
     value: 18.17,
     color: "#ed7b0f"
 }, {
     label: 'Others',
     value: 9.07,
     color: "#818181"
 }, {
     label: 'Opera',
     value: 3.38,
     color: "#9a0900"
 }, {
     label: 'Safari',
     value: 3.24,
     color: "#4dbff1"
 }];

 $('#treemap').jqxTreeMap({
     width: 400,
     height: 300,
     source: data
 });
 $("#jqxbutton").jqxButton({
       theme: 'energyblue',
       width: 200,
       height: 30
   });
   $('#jqxbutton').click(function () {
$("#treemap").jqxTreeMap('render')
   });