You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,35 +40,35 @@ $ npm install orgchart
40
40
```
41
41
require('orgchart') will load orgchart plugin onto the jQuery object. The orgchart module itself does not export anything.
42
42
43
-
## [Demos on github](https://rawgit.com/dabeng/OrgChart/master/demo/index.html) [Demos on codepen.io](https://codepen.io/collection/AWxGVb/)
43
+
## [Demos on github pages](https://dabeng.github.io/OrgChart/) [Demos on codepen.io](https://codepen.io/collection/AWxGVb/)
44
44
### online demos
45
-
-[using ul datasource](https://rawgit.com/dabeng/OrgChart/master/demo/ul-datasource.html)(this feature comes from [Tobyee's good idea:blush:](https://github.com/dabeng/OrgChart/issues/1))
45
+
-[using ul datasource](https://dabeng.github.io/OrgChart/ul-datasource.html)(this feature comes from [Tobyee's good idea:blush:](https://github.com/dabeng/OrgChart/issues/1))
46
46
47
-
-[using local datasource](https://rawgit.com/dabeng/OrgChart/master/demo/local-datasource.html)
47
+
-[using local datasource](https://dabeng.github.io/OrgChart/local-datasource.html)
48
48
49
-
-[I wanna pan&zoom the orgchart](https://rawgit.com/dabeng/OrgChart/master/demo/pan-zoom.html)
49
+
-[I wanna pan&zoom the orgchart](https://dabeng.github.io/OrgChart/pan-zoom.html)
50
50
51
51
- I wanna align orgchart with different orientation**(this feature comes from [the good idea of fvlima and badulesia :blush:](https://github.com/dabeng/OrgChart/issues/5))
52
52
53
53
Top to Bottom -- default direction, as you can see all other examples on this page.
54
54
55
-
[Bottom to Top](https://rawgit.com/dabeng/OrgChart/master/demo/bottom2top.html)
55
+
[Bottom to Top](https://dabeng.github.io/OrgChart/bottom2top.html)
56
56
57
-
[Left to Right](https://rawgit.com/dabeng/OrgChart/master/demo/left2right.html)
57
+
[Left to Right](https://dabeng.github.io/OrgChart/left2right.html)
58
58
59
-
[Right to Left](https://rawgit.com/dabeng/OrgChart/master/demo/right2left.html)
59
+
[Right to Left](https://dabeng.github.io/OrgChart/right2left.html)
-[I wanna load datasource through ajax](https://rawgit.com/dabeng/OrgChart/master/demo/ajax-datasource.html)
63
+
-[I wanna load datasource through ajax](https://dabeng.github.io/OrgChart/ajax-datasource.html)
64
64
65
-
-[I wanna load data on-demand](https://rawgit.com/dabeng/OrgChart/master/demo/ondemand-loading-data.html)
65
+
-[I wanna load data on-demand](https://dabeng.github.io/OrgChart/ondemand-loading-data.html)
66
66
67
67
Note: when users use ajaxURL option to build orghchart, they must use json datasource(both local and remote are OK) and set the relationship property of datasource by themselves. All of these staff are used to generate the correct expanding/collapsing arrows for nodes.
68
68
69
-
-[I wanna customize the structure of node](https://rawgit.com/dabeng/OrgChart/master/demo/option-createNode.html)
69
+
-[I wanna customize the structure of node](https://dabeng.github.io/OrgChart/option-createNode.html)
70
70
71
-
-[I wanna export the organization chart as a picture](https://rawgit.com/dabeng/OrgChart/master/demo/export-chart.html)
71
+
-[I wanna export the organization chart as a picture](https://dabeng.github.io/OrgChart/export-chart.html)
72
72
73
73
Here, we need the help from [html2canvas](https://github.com/niklasvh/html2canvas).
74
74
@@ -80,49 +80,49 @@ Here, we need the help from [html2canvas](https://github.com/niklasvh/html2canva
80
80
81
81
(3) Besides, if you wanna export a pdf format or your orgchart includes picture, you have to introduce [jspdf](https://github.com/MrRio/jsPDF) and set "exportFileextension" option to "pdf".
82
82
83
-
-[I wanna itegrate organization chart with geographic information](https://rawgit.com/dabeng/OrgChart/master/demo/integrate-map.html)
83
+
-[I wanna itegrate organization chart with geographic information](https://dabeng.github.io/OrgChart/integrate-map.html)
84
84
85
85
Here, we fall back on [OpenLayers](https://github.com/openlayers/ol3). It's the most aewsome open-source js library for Web GIS you sholdn't miss.
With the help of exposed core methods(addParent(), addSiblings(), addChildren(), removeNodes()) of orgchart plugin, we can finish this task easily.
90
90
91
-
-[I wanna drag & drop the nodes of orgchart](https://rawgit.com/dabeng/OrgChart/master/demo/drag-drop.html)
91
+
-[I wanna drag & drop the nodes of orgchart](https://dabeng.github.io/OrgChart/drag-drop.html)
92
92
93
93
Users are allowed to drag & drop the nodes of orgchart when option "draggable" is assigned to true(**Note**: this feature doesn't work on IE due to its poor support for HTML5 drag & drop API).
94
94
95
95
Furthermore, users can make use of option dropCriteria to inject their custom limitations on drag & drop. As shown below, we don't want an manager employee to be under a engineer under no circumstance.
96
96
97
-
-[I want a method that can describe the hierarchy of orgchart](https://rawgit.com/dabeng/OrgChart/master/demo/get-hierarchy.html)
97
+
-[I want a method that can describe the hierarchy of orgchart](https://dabeng.github.io/OrgChart/get-hierarchy.html)
98
98
99
99
That's where getHierarchy() comes in.
100
100
101
-
-[I want a color-coded chart](https://rawgit.com/dabeng/OrgChart/master/demo/color-coded.html)
101
+
-[I want a color-coded chart](https://dabeng.github.io/OrgChart/color-coded.html)
102
102
103
103
It's a so easy task, we just need to append id or className property to node data.
104
104
105
-
-[I want a multiple-layers chart](https://rawgit.com/dabeng/OrgChart/master/demo/multiple-layers.html)
105
+
-[I want a multiple-layers chart](https://dabeng.github.io/OrgChart/multiple-layers.html)
106
106
107
107
In fact, this is a wonderful solution to display a orgchart which includes a huge number of node data.
108
108
109
-
-[I want a hybrid(horizontal + vertical) chart](https://rawgit.com/dabeng/OrgChart/master/demo/vertical-level.html)
109
+
-[I want a hybrid(horizontal + vertical) chart](https://dabeng.github.io/OrgChart/vertical-level.html)
110
110
111
111
This feature is inspired by the issues([Aligning Children Vertical](https://github.com/dabeng/OrgChart/issues/46), [Hybrid(horizontal + vertical) OrgChart](https://github.com/dabeng/OrgChart/issues/61)). Thank [mfahadi](https://github.com/mfahadi) and [Destructrix](https://github.com/Destructrix) for their constructive suggestions:blush: Special thanks to [tedliang](https://github.com/tedliang) for his wonderful hybrid mode solution.
112
112
113
113
From now on, users never have to worry about how to align a huge of nodes in one screen of browser. The option "verticalLevel" allows users to align child nodes vertically from the given level.
114
114
115
115
**Note**: currently, this option is incompatible with many other options or methods, like direction, drag&drop, addChildren(), removeNodes(), getHierarchy() and so on. These conflicts will be solved one by one in the later versions.
116
116
117
-
-[I want to collapse some nodes by default](https://rawgit.com/dabeng/OrgChart/master/demo/default-collapsed.html)
117
+
-[I want to collapse some nodes by default](https://dabeng.github.io/OrgChart/default-collapsed.html)
118
118
119
119
No problem. You just need to adjust a little detail of datasource with the help of option "collapse" and className "slide-up".
120
120
121
-
-[I want to refresh orgchart base on new options or datasource](https://rawgit.com/dabeng/OrgChart/master/demo/reload-data.html)
121
+
-[I want to refresh orgchart base on new options or datasource](https://dabeng.github.io/OrgChart/reload-data.html)
122
122
123
123
It's not a big deal. You just turn to the method init().
124
124
125
-
-[I want to use complex template to customize the internal structure of every node](https://rawgit.com/dabeng/OrgChart/master/demo/custom-template.html)
125
+
-[I want to use complex template to customize the internal structure of every node](https://dabeng.github.io/OrgChart/custom-template.html)
126
126
127
127
No problem. With the help of ES6 Template literals, we can customize the any complex node structure rather than the common title and content sections.
0 commit comments