我正在研究组织结构图,并注意到我们的顾客的标题被省略号截断。
有没有办法更改 CSS 或文件以换行?
我正在使用“夏娃”主题。如果您不熟悉 GetOrgChart,以下是相关代码:
$("#people").getOrgChart({
theme: "eve",
primaryColumns: ["Name", "Title"],
imageColumn: "Image",
linkType: "M",
editable: false,
dataSource: s
});
.
eve: {
size: [500, 220],
toolbarHeight: 46,
textPoints: [{
x: 5, //Name Text
y: 200,
width: 490
}, {
x: 150, //Title Text
y: 40,
width: 350
}, {
x: 210,
y: 65,
width: 290
}, {
x: 210,
y: 90,
width: 290
}, {
x: 210,
y: 115,
width: 290
}, {
x: 210,
y: 140,
width: 290
}],
textPointsNoImage: [{
x: 10,
y: 200,
width: 490
}, {
x: 10,
y: 40,
width: 490
}, {
x: 10,
y: 65,
width: 490
}, {
x: 10,
y: 90,
width: 490
}, {
x: 10,
y: 115,
width: 490
}, {
x: 10,
y: 140,
width: 490
}],
box: '<path class="get-box" d="M0 0 L500 0 L500 220 L0 220 Z"/>',
text: '<text width="[width]" class="get-text get-text-[index]" x="[x]" y="[y]"}">[text]</text>',
image: '<image xlink:href="[href]" x="10" y="-20" height="170" preserveAspectRatio="xMidYMid slice" width="130"/>'
我还将 CSS 缩小为标题文本的此属性:
.get-org-chart .get-oc-c .get-text {
fill:#fff;
font-size:20px;
}
我试过width
了,word-wrap: break-word
但没有帮助。任何建议都会很棒,谢谢。