Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dabeng/vue-orgchart
It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
https://github.com/dabeng/vue-orgchart
chart organization orgchart tree tree-like tree-view vue vuejs
Last synced: 1 day ago
JSON representation
It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
- Host: GitHub
- URL: https://github.com/dabeng/vue-orgchart
- Owner: dabeng
- License: mit
- Created: 2018-10-21T02:17:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T05:34:24.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T04:50:09.270Z (15 days ago)
- Topics: chart, organization, orgchart, tree, tree-like, tree-view, vue, vuejs
- Language: Vue
- Homepage:
- Size: 736 KB
- Stars: 290
- Watchers: 10
- Forks: 89
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![OrgChart](http://dabeng.github.io/OrgChart/img/heading.svg)
# [jQuery Version](https://github.com/dabeng/OrgChart)
# [ES6 Version](http://github.com/dabeng/OrgChart.js)
# [Web Components Version](http://github.com/dabeng/OrgChart-Webcomponents)
# [Angular Version -- the most space-saving solution](https://github.com/dabeng/ng-orgchart)
# [React Version](https://github.com/dabeng/react-orgchart)## Foreword
- 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
- 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.## Features
- For now, just static organization chart# Installation
```
npm install vue-organization-chart -S
```
# [Demos](https://codesandbox.io/dashboard/sandboxes/Vue%20OrgChart)# Usage
```html
import Vue from 'vue'
import OrganizationChart from 'vue-organization-chart'
import 'vue-organization-chart/dist/orgchart.css'export default {
components: {
OrganizationChart
},
data () {
return {
ds: {
'id': '1',
'name': 'Lao Lao',
'title': 'general manager',
'children': [
{ 'id': '2', 'name': 'Bo Miao', 'title': 'department manager' },
{ 'id': '3', 'name': 'Su Miao', 'title': 'department manager',
'children': [
{ 'id': '4', 'name': 'Tie Hua', 'title': 'senior engineer' },
{ 'id': '5', 'name': 'Hei Hei', 'title': 'senior engineer',
'children': [
{ 'id': '6', 'name': 'Pang Pang', 'title': 'engineer' },
{ 'id': '7', 'name': 'Xiang Xiang', 'title': 'UE engineer' }
]
}
]
},
{ 'id': '8', 'name': 'Hong Miao', 'title': 'department manager' },
{ 'id': '9', 'name': 'Chun Miao', 'title': 'department manager' }
]
}
}
}
}```
# Attributes
NameTypeRequiredDefaultDescription
datasourcejsonyesdatasource usded to build out structure of orgchart. It could be a json object.
panbooleannofalseUsers could pan the orgchart by mouse drag&drop if they enable this attribute.
zoombooleannofalseUsers could zoomin/zoomout the orgchart by mouse wheel if they enable this attribute.
zoomin-limitnumberno7Users are allowed to set a zoom-in limit.
zoomout-limitnumberno0.5Users are allowed to set a zoom-out limit.
# Events
NameParametersDescription
node-clicknode datatriggers when user clicks the node.
# Scoped Slots
```html
```