2

您可以在 OrgChart 中显示的主要列数量是否有上限?我似乎不能添加超过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/

4

1 回答 1

1

您需要向正在使用的主题添加更多 textPoints。看到这个小提琴

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

    ...
    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()额外的文本点对象放入您正在使用的主题的数组中。

于 2015-06-24T17:40:27.607 回答