javascript-ej1-demos/treemap/customization.html

51 строка
2.1 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../content/bootstrap.min.css" rel="stylesheet">
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
<link href="../content/default.css" rel="stylesheet" />
<link href="../content/default-responsive.css" rel="stylesheet" />
<!--[if lt IE 9]>
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
<!--<![endif]-->
<!--[if gte IE 9]><!-->
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
<!--<![endif]-->
<script src="../scripts/treemapdata.js"></script>
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
<script src="../scripts/properties.js" type="text/javascript"></script>
<script src="../scripts/jsrender.min.js"></script>
</head>
<body>
<div class="content-container-fluid">
<div class="row">
<div class="cols-sample-area">
<label style="color:gray;font-size:x-large;font-family:'Segoe UI';font-weight:normal;" id="Label2">US Olympic Medals FY2012</label>
<br />
<div style="width: 100%; height: 320px;" id="container"></div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(function ($) {
$("#container").ejTreeMap({
dataSource: medal_data,
weightValuePath: "TotalMedals",
colorValuePath: "GoldMedals",
borderBrush: "white",
borderThickness: 1,
uniColorMapping: { color: "#D73028" },
leafItemSettings: { showLabels: true, labelPath: "GameName", itemTemplate: "imageTemplate" }
});
});
</script>
<script id="imageTemplate" type="application/jsrender">
<div style="border:1px solid white;background:url({{:Data.GameImage}}) no-repeat center center;height:{{:ItemHeight}}px;width:{{:ItemWidth}}px;" />
</script>
</body>
</html>