我正在使用getOrgchart并尝试在getOrgChart中更改颜色和字体大小,因此框中的名称不会被截断。 我还想更改页面背景颜色和框颜色
感谢
答案 0 :(得分:0)
下面的代码段会更改字体大小,框颜色和背景颜色
$("#people").getOrgChart({
theme: "monica",
primaryColumns: ["name", "title"],
gridView: true,
dataSource: [
{ id: 1, parentId: null, name: "Amber McKenzie Field", title: "CEO", phone: "678-772-470", mail: "lemmons@jourrapide.com", adress: "Atlanta, GA 30303" },
{ id: 2, parentId: 1, name: "Ava Field", title: "Paper goods machine setter", phone: "937-912-4971", mail: "anderson@jourrapide.com" },
{ id: 3, parentId: 1, name: "Evie Johnson", title: "Employer relations representative", phone: "314-722-6164", mail: "thornton@armyspy.com"}
]
});
html, body {margin: 0px; padding: 0px;height: 100%; overflow: hidden; }
#people {width: 100%;height: 100%; }
div.get-org-chart.get-darkred
{
background-color: white;
}
div.get-org-chart .get-text
{
font-size: 20px !important;
}
div.get-org-chart.get-darkred .get-oc-c .get-box
{
fill: blue;
stroke: darkblue;
}
<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>
<link rel="stylesheet" type="text/css" href="//www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.css">
<script type='text/javascript' src="//www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.js"></script>
<div id="people"></div>