├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
└── src
├── App.vue
├── components
├── OrganizationChartContainer.vue
├── OrganizationChartNode.vue
└── index.js
└── main.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw*
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Xuebin Dong
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # [jQuery Version](https://github.com/dabeng/OrgChart)
4 | # [ES6 Version](http://github.com/dabeng/OrgChart.js)
5 | # [Web Components Version](http://github.com/dabeng/OrgChart-Webcomponents)
6 | # [Angular Version -- the most space-saving solution](https://github.com/dabeng/ng-orgchart)
7 | # [React Version](https://github.com/dabeng/react-orgchart)
8 |
9 | ## Foreword
10 | - First of all, thanks a lot for [wesnolte](https://github.com/wesnolte)'s great work:blush: -- [jOrgChart](https://github.com/wesnolte/jOrgChart). The thought that using nested tables to build out the tree-like orgonization chart is amazing. This idea is more simple and direct than its counterparts based on svg
11 | - Unfortunately, it's long time not to see the update of jOrgChart. on the other hand, I got some interesting ideas to add, so I choose to create a new repo.
12 |
13 | ## Features
14 | - For now, just static organization chart
15 |
16 | # Installation
17 | ```
18 | npm install vue-organization-chart -S
19 | ```
20 | # [Demos](https://codesandbox.io/dashboard/sandboxes/Vue%20OrgChart)
21 |
22 | # Usage
23 | ```html
24 |
25 |
Name | Type | Required | Default | Description |
---|---|---|---|---|
datasource | json | yes | datasource usded to build out structure of orgchart. It could be a json object. | 76 ||
pan | boolean | no | false | Users could pan the orgchart by mouse drag&drop if they enable this attribute. | 79 |
zoom | boolean | no | false | Users could zoomin/zoomout the orgchart by mouse wheel if they enable this attribute. | 82 |
zoomin-limit | number | no | 7 | Users are allowed to set a zoom-in limit. | 85 |
zoomout-limit | number | no | 0.5 | Users are allowed to set a zoom-out limit. | 88 |
Name | Parameters | Description |
---|---|---|
node-click | node data | triggers when user clicks the node. | 100 |
6 |
7 |
15 |
9 |
10 | {{ datasource.name }}
11 |
12 | {{ datasource.title }}
13 | |
16 | |||
20 | 21 | | 22 ||||
25 | 26 | | 27 | | 28 | 29 | | 30 | |
33 | |
39 |