0

我正在使用 getOrgchart 并尝试更改 getOrgChart 中的颜色和字体大小,以便框中的名称不会被截断。我还想更改页面背景颜色和框颜色

谢谢

4

1 回答 1

1

下面的代码片段更改了字体大小、框颜色和背景颜色

	$("#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>

于 2014-10-28T20:16:06.977 回答