Socket
Socket
Sign inDemoInstall

vue-organization-chart

Package Overview
Dependencies
11
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-organization-chart

organization chart component based vuejs


Version published
Weekly downloads
1.9K
decreased by-7.32%
Maintainers
1
Install size
6.20 MB
Created
Weekly downloads
 

Readme

Source

OrgChart

jQuery Version

Native JavaScript(ES6) Version

Web Components Version

Foreword

  • First of all, thanks a lot for wesnolte's great work:blush: -- 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

Usage

<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

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

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

Keywords

FAQs

Last updated on 21 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc