This applet generates a searchable, hyperlinked organizational chart based on the data provided in a text file, ocgen6ex1.txt. This applet is a revised version to simplify the data format and is based on an improved layout algorithm. Please note that the indentations in this text file are optional and are shown for illustrating the hierarchy.
- The chart can be arbitrarily dragged with the mouse when the "Translate" checkbox is enabled.
- Each box of the chart can be hyperlinked to a different document. By double-clicking on any of the boxes detailed database of the corresponding employee can be accessed. The target frame for the displayed pages can be specified through the applet param TARGETFRAME.
- The applet has a search feature to search for any text in the chart. The search is case insensitive. (Ex: "name 1.1"). Click on the reset button every time you change the search string. To search for the next occurrence of the same string, however, click on the search button consecutively.
- The search can be extended to include the contents of the hyperlinked documents by enabling the checkbox "Search Docs". Please note that the search will take more time when this option is enabled. (Example: "corba").
- Initial positioning of the chart can be specified with the applet params BASEX and BASEY. Box height/width and box horizontal/vertical spacing can also be specified through the applet params. A fillcolor can be specified for each box through the datafile.
- Here is another example of the applet: example2.
- The algorithm to generate the layout is more robust than that of the previous version. This enables handling charts with highly lopsided tree structures. Here is an example to illustrate this feature, example3.
- The applet enables drawing upto four strings in each box. String spacing can be controlled through the applet param STRINGSPACE. Here is a demo of this feature, example4.
- The applet also has an optimal drawing scheme that enables handling a chart with hundreds of boxes to be dragged nearly as quickly as the the one displaying tens of boxes. A demo of this feature can be seen in this example, example5 where 300 boxes are displayed.
To handle a bug in IE3.0 To handle a bug in IE3.0
If you would like to test the applet locally, here is the zip file with all the files: ocgen6_try.zip. You can display 999 boxes with these files. Each head can have upto 4 tails. The registered version has no limits to the number of tails or boxes.
Data Text File Format
A typical text file woud be:
n:"Jone Doe":"CEO":"email@example.com":"555-1234":ffcc66 url:"ceodoc.html" nn:"Jon Dowe":"Pres., Sales":8fbc8f url:"" nn:"Jonn Doh":"Pres., Human Res.":8fbc8f url:""which will be displayed as shown here. To add two subordinates to "Jon Dowe" use,
n:"Jone Doe":"CEO":"firstname.lastname@example.org":"555-1234":ffcc66 url:"ceodoc.html" nn:"Jon Dowe":"Pres., Sales":8fbc8f url:"" nnn:"Mari Marg":"Sales Assoc, Prod1" url:"" nnn:"Merie Nurg":"Sales Assoc, Prod2" url:"" nn:"Jonn Doh":"Pres., Human Res.":8fbc8f url:""
The data file consists of two kinds of lines.
- Lines starting with n, nn, etc., that specify the name,title of each employee, etc. The header field (n, nn, etc) specifies the hierarchy level of the chart. Example:
The first field (n) specifies that this is the first level. The fields 2 thru 4 are the ones that are actually drawn in the box. The last field (ff6666) specifies whether to "fill" the box with a color. The fill option can be disabled by either simply not specifying this hex color code in the data file or by setting the FILLCOLORBOX param to "no".
- Lines starting with url, that specify the URL of the document for the corresponding box. If there is no URL needed then specify a zero-length string ("").
Home Nalla Senthilnathan