Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i will render the OrgChart from dynamic array data #71

Open
vuvanly opened this issue Dec 11, 2015 · 3 comments
Open

How do i will render the OrgChart from dynamic array data #71

vuvanly opened this issue Dec 11, 2015 · 3 comments

Comments

@vuvanly
Copy link

vuvanly commented Dec 11, 2015

I get organization data from database and save to an array like below:

Array ( 
[0] => Array ( [hierarchy_id] => 1 [layer] => 1 [parent_id] => [manage_flag] => 1 [pschool_id] => 1 [pschool_name] => Organization ) 
[1] => Array ( [hierarchy_id] => 4 [layer] => 2 [parent_id] => 1 [manage_flag] => 1 [pschool_id] => 9 [pschool_name] => Headerquarter ) 
[2] => Array ( [hierarchy_id] => 6 [layer] => 3 [parent_id] => 4 [manage_flag] => 1 [pschool_id] => 11 [pschool_name] => Kantou branch ) 
[3] => Array ( [hierarchy_id] => 7 [layer] => 3 [parent_id] => 4 [manage_flag] => 1 [pschool_id] => 12 [pschool_name] => Kansai branch ) 
[4] => Array ( [hierarchy_id] => 8 [layer] => 3 [parent_id] => 4 [manage_flag] => 1 [pschool_id] => 13 [pschool_name] => Kyushu branch ) 
[5] => Array ( [hierarchy_id] => 9 [layer] => 4 [parent_id] => 7 [manage_flag] => 1 [pschool_id] => 14 [pschool_name] => Osaka branch ) 
[6] => Array ( [hierarchy_id] => 10 [layer] => 4 [parent_id] => 7 [manage_flag] => 1 [pschool_id] => 15 [pschool_name] => Kyoto branch ) 
[7] => Array ( [hierarchy_id] => 12 [layer] => 5 [parent_id] => 9 [manage_flag] => 0 [pschool_id] => 17 [pschool_name] => osaka shop 1 ) 
[8] => Array ( [hierarchy_id] => 11 [layer] => 5 [parent_id] => 9 [manage_flag] => 0 [pschool_id] => 16 [pschool_name] => Osaka shop 2 ) 
)

How can i render OrgChart from hierarchy data like that?

@dabeng
Copy link

dabeng commented May 8, 2016

Hi @vuvanly . I'm in charge of a repo OrgChart that is derived from jOrgChart. You can regard it as 2nd-generation of jOrgChart. This plugin can take json object as datasource for orgchart, so I'm sure it can cover your demand. This is a demo. Good luck! 😊

@vuvanly
Copy link
Author

vuvanly commented May 14, 2016

Hi @dabeng . Thanks for you info. The new jOrgchart is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants