我的源代码是一个xml文件,我愿意使用布局MIXED_HIERARCHY_RIGHT_LINKS。
默认布局保留行顺序,但MIXED_HIERARCHY_RIGHT_LINKS不保留:第一行显示在顶部,然后行被枚举为bottom-up。因此,字母顺序被打破。
你能纠正这种行为吗?提前感谢!
index.html
<!DOCTYPE html><html>
<head>
<script src="getorgchart/getorgchart.js"></script>
<link href="getorgchart/getorgchart.css" rel="stylesheet" />
</head>
<body>
<div id="people">
<script type="text/javascript">
var peopleElement = document.getElementById("people");
var orgChart = new getOrgChart(peopleElement, {
primaryFields: ["name", "service", "title", "phone"],
layout: getOrgChart.MIXED_HIERARCHY_RIGHT_LINKS,
dataSource: "init-from-xml.xml",
expandToLevel: 4
});
</script>
</div>
</body>
</html>init-from-xml.xml
<?xml version="1.0" encoding="utf-8" ?>
<people>
<person name="Met" title="" phone="" image="" service="">
<person name="Jamez" title="" phone="" image="" service=""></person>
<person name="Kirk" title="" phone="" image="" service=""></person>
<person name="Lars" title="" phone="" image="" service=""></person>
<person name="Rob" title="" phone="" image="" service=""></person>
</person>
</people>

发布于 2018-02-09 18:57:24
请下载最新版本2.4.6该问题已得到解决
https://stackoverflow.com/questions/48691553
复制相似问题