# vue-organization-chart

> organization chart component based vuejs

Latest version **1.1.6** (published 2019-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-organization-chart
pnpm add vue-organization-chart
yarn add vue-organization-chart
bun add vue-organization-chart
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2019-04-21 |
| First published | 2018-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 303 |
| Author | dabeng |
| Maintainers | dabeng |
| Keywords | vuejs, organization, chart, orgchart, tree, tree-like, tree-view |

## Links

- npm: https://www.npmjs.com/package/vue-organization-chart
- Repository: https://github.com/dabeng/vue-orgchart
- Homepage: https://github.com/dabeng/vue-orgchart#readme
- Issues: https://github.com/dabeng/vue-orgchart/issues
- npm.io page: https://npm.io/package/vue-organization-chart

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.5.17
- [jquery](https://npm.io/package/jquery.md) ^3.3.1

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2019-04-21
- 1.1.5 — 2019-04-19
- 1.1.4 — 2019-04-19
- 1.1.3 — 2019-04-13
- 1.1.2 — 2019-04-13
- 1.1.1 — 2019-04-13
- 1.1.0 — 2019-02-18
- 1.0.1 — 2018-12-30
- 1.0.0 — 2018-12-21
- 0.5.0 — 2018-12-21
- 0.4.3 — 2018-12-15
- 0.4.2 — 2018-12-15
- 0.4.1 — 2018-12-15
- 0.4.0 — 2018-12-15
- 0.3.2 — 2018-12-15
- … 34 more at https://npm.io/package/vue-organization-chart/versions

## README

![OrgChart](http://dabeng.github.io/OrgChart/img/orgchart-heading.png)

# [jQuery Version](https://github.com/dabeng/OrgChart)
# [Native JavaScript(ES6) Version](http://github.com/dabeng/OrgChart.js)
# [Web Components Version](http://github.com/dabeng/OrgChart-Webcomponents)

## 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
<template>
  <div>
    <organization-chart :datasource="ds"></organization-chart>
  </div>
</template>

<script>
  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' }
          ]
        }
      }
    }
  }
</script>
```

# Attributes
<table>
  <thead>
    <tr><th>Name</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr>
  </thead>
  <tbody>
    <tr>
      <td>datasource</td><td>json</td><td>yes</td><td></td><td>datasource usded to build out structure of orgchart. It could be a json object.</td>
    </tr>
    <tr>
      <td>pan</td><td>boolean</td><td>no</td><td>false</td><td>Users could pan the orgchart by mouse drag&drop if they enable this attribute.</td>
    </tr>
    <tr>
      <td>zoom</td><td>boolean</td><td>no</td><td>false</td><td>Users could zoomin/zoomout the orgchart by mouse wheel if they enable this attribute.</td>
    </tr>
    <tr>
      <td>zoomin-limit</td><td>number</td><td>no</td><td>7</td><td>Users are allowed to set a zoom-in limit.</td>
    </tr>
    <tr>
      <td>zoomout-limit</td><td>number</td><td>no</td><td>0.5</td><td>Users are allowed to set a zoom-out limit.</td>
    </tr>
  </tbody>
</table>

# Events
<table>
  <thead>
    <tr><th>Name</th><th>Parameters</th><th>Description</th></tr>
  </thead>
  <tbody>
    <tr>
      <td>node-click</td><td>node data</td><td>triggers when user clicks the node.</td>
    </tr>
  </tbody>
</table>

# Scoped Slots
```html
<template slot-scope="{ nodeData }">
  <!-- feel free to customize the internal structure of node -->
</template>
```

---
_Source: https://npm.io/package/vue-organization-chart · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
