76 строки
2.6 KiB
HTML
76 строки
2.6 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/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
<script src="../scripts/Sunburst_Data.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="content-container-fluid">
|
|
<div class="row">
|
|
<div class="cols-sample-area">
|
|
<div id="container">
|
|
</div>
|
|
</div>
|
|
<div id="sampleProperties">
|
|
<div class="prop-grid">
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
Enable Zooming
|
|
</div>
|
|
<div class="col-md-3 aligntop">
|
|
<input type="checkbox" checked="checked" id="zooming" onchange="zooming()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#container").ejSunburstChart({
|
|
dataSource: default_DataSource,
|
|
palette: ["#002e4d", "#005c99", "#008ae6", "#33adff", "#80ccff"],
|
|
valueMemberPath: "EmployeesCount",
|
|
levels: [
|
|
{ groupMemberPath: "Country" },
|
|
{ groupMemberPath: "JobDescription" },
|
|
{ groupMemberPath: "JobGroup" },
|
|
{ groupMemberPath: "JobRole" }
|
|
],
|
|
dataLabelSettings: { visible: true },
|
|
tooltip: { visible: true},
|
|
innerRadius: 0.2,
|
|
title: { text: "Employees Count" },
|
|
size: { height: "600" },
|
|
enableAnimation: true,
|
|
zoomSettings: { enable: true },
|
|
load: "loadSunBurstTheme",
|
|
});
|
|
|
|
$("#sampleProperties").ejPropertiesPanel();
|
|
|
|
function zooming()
|
|
{
|
|
var sunburst = $("#container").ejSunburstChart("instance");
|
|
if ($("#zooming").is(":checked"))
|
|
sunburst.model.zoomSettings.enable = true;
|
|
else {
|
|
sunburst.model.zoomSettings.enable = false;
|
|
}
|
|
sunburst.redraw();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|