dabeng / OrgChart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
2.83k stars 767 forks source link

Loading initial chart from selected node #108

Open bexrace opened 7 years ago

bexrace commented 7 years ago

Hello,

I am exploring options for an organisation chart within my organisation and so far think OrgCharts will meet our needs. However, I am a little rusty as a developer after a very long break, I therefore need all the help I can get or pointing in the right direction.

Is it possible to display the initial chart for a chosen node (anywhere within the hierarchy) and then show the children to a specified depth from this point onwards? Can it still drill up and down the data set?

We have an organisation of a few thousand employees and want to link this to the contacts directory within our intranet. The starting point will therefore be user defined.

Thanks for any help you can provide.

dabeng commented 7 years ago

Hi @bexrace , I believe ondemand loading demo is just what you want. In the beginning, you just show a simple chart. Maybe 3 or 4 levels. If users wanna find superior employees or inferior employees, he just need to drill up or down to find the new loading nodes. Unfortunately, plugin orgchart can drill up and down one level every time when user clicks the up/down arrows.

dabeng commented 7 years ago

Additionally, you can encapsulate the logic of appending contact info into the callback createNode. For the details, please refer to this demo -- customize the structure of node

bexrace commented 7 years ago

Thank you for this and your speedy response. I shall look into it and let you know how I get on.