This applet generates a searchable, hyperlinked organizational chart based on the data provided in the applet tag CHARTDATA.
- The chart can be arbitrarily dragged with the mouse.
- 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 can display upto four strings in each box. The boxes can have disparate number of strings.
- 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").
- A fillcolor can be specified for each box through the CHARTDATA applet tag.
- Initial positioning of the chart can be specified with the applet params BASEX and BASEY.
- Box height/width, box horizontal/vertical spacing and the spacing between the strings drawn in the box can also controlled through the applet params.
- Colors for the box lines and mouseover effect can also be specified through the applet params.
- Font size, name and style can be controlled through the applet params.
- More examples of this applet can be seen here: Example2 and Example3.
- Default position of the chart can be controlled either through BASEX, BASEY or through the DEFAULTSEARCHSTRING params.
- Optionally the applet can also read data from an external text file as illustrated in Example4.
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: ocgen7_try.zip (23K). You can display 300 boxes with these files. This demo version displays the author name in the first box. The registered version has no limits to the number of boxes.
- Unzip the archive, say to a local directory "C:\test".
- Access the browser from the desktop icon.
- Enter "file:///C:/test/ocgen7.html"
CHARTDATA param value
A typical CHARTDATA param value woud look like:1;Name 1;Position 1;0;0;ffcc66;empldb0.html| 2;Name 1.1;Position 1.1;0;0;dbdb70;empldb1.htmlwhere each line corresponds to data for one box in the chart. One box data is separated from the other using the "vertical slash " character '|'. Each box data itself consists of seven fields separated by the semicolon character ';'. The indentations are optional. The meaning of each field is explained in the following table:
1 Name 1 Position 1 0 0 ffcc66 empldb0.html This field refers to the hierarchy level. The top level being 1 and the next branch level being 2 etc. First string in the box. Second string in the box. Third string. Specify 0 if a third string is not required. Fourth string. Specify 0 if a fourth string not required. Fill color code for the box. URL for the box. This can be either relative or fully qualified. Specify 0 if URL not available.
Other Applet params
BGCOLOR Background color for the applet, hex code. TEXTCOLOR The color for the fonts, box outline and connecting lines, hex code. BASEX, BASEY These pixel coordinates determine where the first box is displayed. BOXWIDH, BOXHEIGHT Specifies the width and height of the boxes in pixels. BOXHSPACE, BOXVSPACE Horizontal and vertical spacing between the boxes in pixels. STRINGSPACE Spacing between the strings drawn inside the box in pixels. HIGHLIGHTCOLOR Mouseover highlighting color for the fonts and box outline, hex code. FILLCOLORBOX "yes" or "no". Value "yes" will make use of all the color codes specified in all the datalines in CHARTDATA param. TARGETFRAME This can be a user-defined name or any one of the JDK defined keywords (_self, _parent, _blank, _top)