vue-orgchart icon indicating copy to clipboard operation
vue-orgchart copied to clipboard

Providing examples

Open asbua opened this issue 7 years ago • 5 comments

Congrats on your release. Can you please provide some basic examples? For example how can I zoom and pan, insert data and so on.

asbua avatar Dec 24 '18 00:12 asbua

Hi @asbua . For now, there is only simmple demo on codesandbox - https://codesandbox.io/s/r5kx493mrp. You can zoom in/out chart with mouse wheel.

dabeng avatar Dec 30 '18 23:12 dabeng

Great thanks! :) How can I use ' nodeContent' and 'createNode'?

asbua avatar Jan 03 '19 23:01 asbua

Hello, Great Job.. No have documentation for vue? i need change colors and background. i view examples for js versión but no Vue in https://github.com/dabeng/OrgChart.js. thx and nice job

dimasx010 avatar Jan 04 '19 18:01 dimasx010

Hi @asbua @dimasx010. I have to say sorry. For various reasons, I only spared two days to update vue-orgchart during my Chinese New Year holiday. For now, there is the following available attributes and slot and you can find some new Demos on codesandbox.io.

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.

Scoped Slots

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

dabeng avatar Feb 20 '19 08:02 dabeng

Hi could you please provide an example on how to use Scoped Slots. Thanks. A codesandbox example would be awesome. Thanks.

cardei avatar Aug 24 '23 20:08 cardei