/    Sign up×
Community /Pin to ProfileBookmark

laying out an organisational chart

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?

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@VladdyFeb 21.2003 — Table, huh? I thought a tree-view type control would be a more logical choice for an organizational chart...
Copy linkTweet thisAlerts:
@jpmoriartyauthorFeb 21.2003 — ...par example?
Copy linkTweet thisAlerts:
@VladdyFeb 22.2003 — The closest I have is the [URL=http://www.vladdy.net/webdesign/DOM_TreeViewer.html]DOM Tree Viewer.[/URL]

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.
×

Success!

Help @jpmoriarty spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...