我正在使用GetOrgChart来显示2500多个节点,并且我面临很多我在下面提到的问题。
请参见下图
下面是我的代码
<!DOCTYPE html>
<html>
<head>
<title>OrgChart | First Look</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="getorgchart.js"></script>
<link href="getorgchart.css" rel="stylesheet" />
<style type="text/css">
html, body {
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
overflow: hidden;
}
#people {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="people"></div>
<script type="text/javascript">
var peopleElement = document.getElementById("people");
var orgChart = new getOrgChart(peopleElement, {
primaryFields: ["name", "title"],
dataSource: myData
});
</script>
</body>
</html>
答案 0 :(得分:1)
您可以添加此选项以欣赏美丽的景色。
boxSizeInPercentage: {
minBoxSize: {
width: 5,
height: 5
},
boxSize: {
width: 15,
height: 75
},
maxBoxSize: {
width: 100,
height: 100
}
},