-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
647 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Organization Chart Plugin</title> | ||
<link rel="icon" href="img/logo.png"> | ||
<link rel="stylesheet" href="css/jquery.orgchart.css"> | ||
<link rel="stylesheet" href="css/style.css"> | ||
<style type="text/css"> | ||
#chart-container { | ||
height: 500px; | ||
} | ||
.orgchart { | ||
background: unset; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="chart-container"></div> | ||
|
||
<script type="text/javascript" src="js/jquery.min.js"></script> | ||
<script type="text/javascript" src="js/jquery.orgchart.js"></script> | ||
<script type="text/javascript" src="js/json-digger.js"></script> | ||
<script type="text/javascript"> | ||
$(function() { | ||
|
||
var datasource = { | ||
'name': 'Lao Lao', | ||
'title': 'general manager', | ||
'children': [ | ||
{ 'name': 'Bo Miao', 'title': 'department manager', 'compact': true, | ||
'children': [ | ||
{ 'name': 'Fei Xuan', 'title': 'engineer' }, | ||
{ 'name': 'Er Xuan', 'title': 'engineer' }, | ||
{ 'name': 'San Xuan', 'title': 'engineer' }, | ||
{ 'name': 'Si Xuan', 'title': 'engineer', 'compact': true, | ||
'children': [ | ||
{ 'name': 'Feng Shou', 'title': 'engineer' }, | ||
{ 'name': 'Er Shou', 'title': 'engineer' }, | ||
{ 'name': 'San Shou', 'title': 'engineer' }, | ||
{ 'name': 'Si Shou', 'title': 'engineer' } | ||
] | ||
}, | ||
{ 'name': 'Wu Xuan', 'title': 'engineer' } | ||
] | ||
}, | ||
{ 'name': 'Su Miao', 'title': 'department manager', | ||
'children': [ | ||
{ 'name': 'Tie Hua', 'title': 'senior engineer' }, | ||
{ 'name': 'Hei Hei', 'title': 'senior engineer', | ||
'children': [ | ||
{ 'name': 'Dan Dan', 'title': 'engineer' }, | ||
{ 'name': 'Er Dan', 'title': 'engineer' }, | ||
{ 'name': 'San Dan', 'title': 'engineer' }, | ||
{ 'name': 'Si Dan', 'title': 'engineer' }, | ||
{ 'name': 'Wu Dan', 'title': 'engineer' }, | ||
{ 'name': 'Liu Dan', 'title': 'engineer' }, | ||
{ 'name': 'Qi Dan', 'title': 'engineer' }, | ||
{ 'name': 'Ba Dan', 'title': 'engineer' }, | ||
{ 'name': 'Jiu Dan', 'title': 'engineer' }, | ||
{ 'name': 'Shi Dan', 'title': 'engineer' } | ||
] | ||
}, | ||
{ 'name': 'Pang Pang', 'title': 'senior engineer' } | ||
] | ||
}, | ||
{ 'name': 'Hong Miao', 'title': 'department manager' } | ||
] | ||
}; | ||
|
||
$('#chart-container').orgchart({ | ||
'data' : datasource, | ||
'nodeContent': 'title', | ||
'compact': function(data) { | ||
return data?.children?.length >=10; | ||
} | ||
}); | ||
|
||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.