在浏览器上显示组织结构图时,如何使用GetOrgChart实现以下布局。这将有助于长组织结构图向下增长(通过滚动查看),但允许根节点(组织负责人)最初始终可见。
问问题
1455 次
3 回答
2
GetOrgChart 已发布 v1.2,它在其API中支持此方向。
getOrgChart.RO_LEFT_PARENT_TOP
于 2014-04-10T18:39:24.317 回答
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>
于 2014-10-15T10:19:18.763 回答