在浏览器上显示组织结构图时,如何使用GetOrgChart实现以下布局。这将有助于长期组织图表的增长(通过滚动看到),但允许根节点(组织的负责人)始终最初可见。
答案 0 :(得分:2)
GetOrgChart发布了v1.2,支持API中的此方向。
getOrgChart.RO_LEFT_PARENT_TOP
答案 1 :(得分:1)
GetOrgChart有八个方向选项。您可以阅读以下blog post和online demo
答案 2 :(得分:0)
试试这个:
<script type="text/ecmascript">
function redrawChart (){
$("#people").getOrgChart({
scale: 1,
primaryColumns: ["name", "title", "phone", "mail"],
imageColumn: "image",
orientation: parseInt($("input[name=orientation]:checked").val()),
dataSource: [
{ id: 1, parentId: "", name: "Mary D. Barnes", title: "Founder", phone: "765-386-5597", image: "images/f-57.jpg" },
{ id: 2, parentId: 1, name: "Larry B. Welborn", title: "Podiatrist", phone: "516-922-7920", image: "images/f-56.jpg" },
{ id: 3, parentId: 1, name: "John D. Blakely", title: "Ballet master", phone: "617-361-4327", mail: "john.blakely@dom.com" },
{ id: 4, parentId: 1, name: "Megan F. Borg", title: "Botanist", phone: "205-324-9284", image: "images/f-54.jpg" }
]
});
}
redrawChart();
$("input[name=orientation]").on("click", redrawChart);
</script>