Guest User

Untitled

a guest
Aug 21st, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. <script src="../getorgchart/getorgchart.js"></script>
  2. <link href="../getorgchart/getorgchart.css" rel="stylesheet" />
  3.  
  4.  
  5. </head>
  6. <body>
  7. <div id="people"></div>
  8.  
  9. <script type="text/javascript">
  10. getOrgChart.buttons.add = '<g transform="translate(-60,-255)">' + getOrgChart.buttons.add + '</g>';
  11. getOrgChart.buttons.edit = '<g transform="translate(260,60)">' + getOrgChart.buttons.edit + '</g>';
  12. getOrgChart.buttons.del = '<g transform="translate(60,-255)">' + getOrgChart.buttons.del + '</g>';
  13. getOrgChart.buttons.details = '<g transform="translate(-255,460)">' + getOrgChart.buttons.details + '</g>';
  14.  
  15. getOrgChart.themes.myTheme =
  16. {
  17. size: [500, 500],
  18. toolbarHeight: 46,
  19. textPoints: [
  20. { x: 250, y: 150, width: 230 },
  21. { x: 250, y: 350, width: 230 },
  22. { x: 250, y: 375, width: 180 }
  23. ],
  24. textPointsNoImage: [
  25. { x: 250, y: 240, width: 490 },
  26. { x: 250, y: 270, width: 490 },
  27. { x: 250, y: 300, width: 490 }
  28. ],
  29. expandCollapseBtnRadius: 20,
  30. box: '<path transform="matrix(0.5,0.5,-0.5,0.5,250,0)" class="get-box" d="M0 0 L500 0 L500 500 L0 500 Z"/>',
  31. text: '<text text-anchor="middle" width="[width]" class="get-text get-text-[index]" x="[x]" y="[y]">[text]</text>',
  32. image: '<clipPath id="getMonicaClip"><circle cx="245" cy="245" r="85" /></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#getMonicaClip)" xlink:href="[href]" x="160" y="160" height="170" width="170"/>'
  33.  
  34. };
  35.  
  36. var orgchart = new getOrgChart(document.getElementById("people"), {
  37. theme: "myTheme",
  38. primaryFields: ["name", "title", "phone", "mail"],
  39. photoFields: ["image"],
  40. dataSource: [
  41. { id: 1, parentId: null, name: "Amber McKenzie", title: "CEO", phone: "678-772-470", mail: "lemmons@jourrapide.com", adress: "Atlanta, GA 30303", image: "images/f-1.jpg" },
  42. { id: 2, parentId: 1, name: "Ava Field", title: "Paper goods machine setter", phone: "937-912-4971", mail: "anderson@jourrapide.com", image: "images/f-2.jpg" },
  43. { id: 3, parentId: 1, name: "Evie Johnson", title: "Employer relations representative", phone: "314-722-6164", mail: "thornton@armyspy.com", image: "images/f-3.jpg" },
  44. { id: 4, parentId: 1, name: "Paul Shetler", title: "Teaching assistant", phone: "330-263-6439", mail: "shetler@rhyta.com", image: "images/f-4.jpg" },
  45. { id: 5, parentId: 2, name: "Rebecca Francis", title: "Welding machine setter", phone: "408-460-0589", image: "images/f-5.jpg" },
  46. { id: 6, parentId: 2, name: "Rebecca Randall", title: "Optometrist", phone: "801-920-9842", mail: "JasonWGoodman@armyspy.com", image: "images/f-6.jpg" },
  47. { id: 7, parentId: 2, name: "Spencer May", title: "System operator", phone: "Conservation scientist", mail: "hodges@teleworm.us" },
  48. { id: 8, parentId: 6, name: "Max Ford", title: "Budget manager", phone: "989-474-8325", mail: "hunter@teleworm.us", image: "images/f-8.jpg" },
  49. { id: 9, parentId: 7, name: "Riley Bray", title: "Structural metal fabricator", phone: "479-359-2159", image: "images/f-9.jpg" },
  50. { id: 10, parentId: 7, name: "Callum Whitehouse", title: "Radar controller", phone: "847-474-8775" }
  51. ]
  52. });
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. </script>
Add Comment
Please, Sign In to add comment