Click to See Complete Forum and Search --> : laying out an organisational chart


jpmoriarty
02-21-2003, 07:06 AM
one of the things i'd like to include on my intranet site is an organisational chart - it would use the employees database, and construct the chart (using PHP) based on each employee having a "reports to" field.

I'm thinking that i should use a dynamically generated table (I think it's fairly tabular data, so i should be safe, and it's on an intranet so i know that everyone will be using IE 6), but was just wondering if anyone had tried something like this or knew of another solution out there. I did at one time think of dynamically generating a gif or something, but thought that mighnt be too sensible. Then again, it may be easier to do that than arrange the tables to get the right hierarchical structure....

Any thoughts?

Vladdy
02-21-2003, 11:13 AM
Table, huh? I thought a tree-view type control would be a more logical choice for an organizational chart...

jpmoriarty
02-21-2003, 04:47 PM
...par example?

Vladdy
02-21-2003, 07:10 PM
The closest I have is the DOM Tree Viewer. (http://www.vladdy.net/webdesign/DOM_TreeViewer.html)
The tree structure is generated on the fly based on the document hierarchy. You can use a predefined array (or better set of objects) that is pulled from a js file. If you do not want to rely on js, same structure can be generated server side.
In my example the tree is initially collapsed. Simple change can make it show all expanded.
All the styles can be customized so you put borders to make it all look boxy as an org-chart would.