【问题标题】:GetOrgChart: maximum allowed primaryColumnsGetOrgChart:允许的最大primaryColumns
【发布时间】:2015-09-10 23:59:42
【问题描述】:

您可以在 OrgChart 中显示的 primaryColumns 数量是否有上限。 我似乎不能添加超过 4。如果您查看下面的示例,则不会呈现电子邮件地址。这是正确的行为吗?有没有办法覆盖这个设置?

     $("#people").getOrgChart({         
        primaryColumns: ["name", "title","department", "phone", "email"],
                dataSource:[{"id":1,"parentId":null,"name":"John Doe","positionId":"771","title":"Vice-President","location":"Location","department":"IT-Dallas","phone":"(333)-444-6363","email":"john.doe@domain.com","image":""}]
    });  

这是一个 jsfiddle http://jsfiddle.net/w9Ax8/17/

【问题讨论】:

    标签: orgchart


    【解决方案1】:

    您需要为您正在使用的主题添加更多 textPoints。 See this fiddle.

    在主题对象中,我添加了一个自定义主题对象,并在其中添加了额外的文本点:

        ...
        textPointsNoImage: [{
                x: 20,
                y: 30,
                width: 330
            }, {
                x: 20,
                y: 50,
                width: 330
            }, {
                x: 20,
                y: 75,
                width: 330
            }, {
                x: 20,
                y: 95,
                width: 330
            }, {
                x: 20,
                y: 115,
                width: 330
            }, {
                x: 20,
                y: 125,
                width: 330
            }],
    

    您需要对 textPointsNoImagetextPoints 数组执行此操作。

    或者作为替代方案,.push() 将额外的文本点对象添加到您正在使用的主题的数组中。

    【讨论】:

    • 修复了它。谢谢特德
    猜你喜欢
    • 2022-10-12
    • 2023-03-24
    • 2011-02-26
    • 2011-01-23
    • 2013-04-06
    • 1970-01-01
    • 1970-01-01
    • 2013-04-22
    • 2014-09-02
    相关资源
    最近更新 更多