【问题标题】:GetOrgChart: How to allign top level boxes and make orgchart grow downGetOrgChart:如何对齐顶级框并使组织结构图向下增长
【发布时间】:2014-05-15 18:03:34
【问题描述】:

在浏览器上显示组织结构图时,如何使用GetOrgChart 实现以下布局。这将有助于长组织结构图变长(通过滚动查看),但允许根节点(组织负责人)最初始终可见。

【问题讨论】:

    标签: javascript jquery css orgchart


    【解决方案1】:

    试试这个:

    <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>   
    

    【讨论】:

      【解决方案2】:

      GetOrgChart 有八个方向选项。您可以阅读以下blog postonline demo

      【讨论】:

        【解决方案3】:

        GetOrgChart 已发布 v1.2,在其 API 中支持此方向。

        getOrgChart.RO_LEFT_PARENT_TOP

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2020-10-03
          • 2019-06-28
          • 2016-06-15
          • 1970-01-01
          • 2018-12-30
          • 2020-02-20
          相关资源
          最近更新 更多