Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2003
    Posts
    9

    Smile Unanswered: is there any sample code to build an Oraganization chart?

    im looking for some sample code to draw,build or generate an organiztion chart, cause im not very good at algorithm
    and all i found is just a binary tree so it's not much useful for an organization chart.
    thanks in advance,

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Perhaps search here:

    HotScripts.com
    http://www.hotscripts.com

    Planet Source Code
    http://www.planet-source-code.com

    The ASP Resource Index
    http://www.aspin.com
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Jun 2003
    Posts
    9
    i've searched all of those web site but never found anything close to what im looking for. i found one component(not free) with a powerful tools to create an organization chart on the web(just only one that i've found) but i just want a sample code to learn , not a complete package.
    i wonder that there is no a sample code about organization chart?

    my database is just look like this

    id name parent_id
    1 A null <--------root
    2 B 1
    3 C 1
    4 D 1
    5 E 2
    6 F 2
    7 G 3
    8 H 4
    9 I 4
    10 J 4
    11 K 9

    and the result should look like this (with link line)

    A
    |
    |------------------|-----------------|
    B C D
    |----------| | |----|---------|
    E F G H I J
    |
    K

    that's it =)
    and by the way,this post will cut all space ,so my result chart may look not very right.
    thanks,

  4. #4
    Join Date
    Jul 2003
    Location
    Ohio/Chicago
    Posts
    75
    pehaps it would help if you provided a link to a page where you could control how the chart should look

  5. #5
    Join Date
    Jun 2003
    Posts
    9

  6. #6
    Join Date
    Aug 2003
    Location
    Kayseri-Turkiye
    Posts
    7

    Recursion

    You can do it with recursive functions, with tree graphs.

    If you were using Oracle, you would be able to use CONNECT BY statement to do this.

    You can read Mr. Celko 's articles @:

    http://www.dbmsmag.com/9603d06.html
    http://www.dbmsmag.com/9604d06.html
    http://www.dbmsmag.com/9605d06.html
    http://www.dbmsmag.com/9606d06.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •