How to Reuse the PLANdora Gantt Chart in my Project
The most important goal of an open source project is share with the technical public around the world, source-codes,
frameworks or ideas. The PLANdora tool was planned and designed to be used partially or fully. One of those "fragments" is the Gantt chart.
It was built as an applet and can be recycled in whatever web project (not necessarily a Java project) because all the data loaded by the chart, uses the
<PARAM> tag of HTML standard (see the box bellow).
Into the <APPLET> tag, the attributes "code" and "archive" will contain the name of the "Gantt.jar" library.
See bellow the list of mandatory fields and all the features included into the PLANdora Gantt Chart.
See bellow the list of mandatory fields and all the features included into the PLANdora Gantt Chart.
- TIMEUNIT: It is the number (in miliseconds) of the smaller time unit of the Gantt chart. The PLANdora uses "60000" (1 minute).
- SLOTSIZE: It is the number of "TimeUnits" for a Gantt slot. A slot represents the smaller part of a Job in Gantt. In PLAndora this field contain the value "1440" because for task planning purposes a slot represents 1 day (=1440 minutes).
- PARENTSLOTSIZE: Is the of SlotSize but used to make groups of slots. Notice that the time line of Gantt Chart contain two layers. PLANdora uses "10080" for this fields because it groups the slots by week (SLOTSIZE * 7 = 10080).
- EDITABLE: If "TRUE", allow the manipulation of Gantt by the user, otherwise, freeze the chart, and allow only the visualization.
- HZOOM: It is the initial value (in pixels) for the horizontal zoom.
- VZOOM: It is the initial value (in pixels) for the vertical zoom.
- ROWHEIGHT: It is the height (in pixels) of a row of chart.
- SLOTWIDTH: It is the width (in pixels) of a job slot of chart.
- INITIALDATE: It is the date of the first slot (the earliest slot of chart). The format of date will depends the locale configured in "LANGUAGE" and "COUNTRY" fields. For example: for "pt-BR" locale, the date format used should be "DD/MM/YYYY".
- SLOTS: The total number of slots of chart.
- LANGUAGE: The language used for i18N purposes. It should contain a standard value (two charactes in lower case). For example: pt=Portuguese, en=English, es=Espanish.
- COUNTRY: The country used for i18N purposes. It should contain a standard value (two characted in upper case). For example: BR=Brazil, US=USA, FR=France
- The Resource List (to populate the left list of chart);
- The Layer List (to separate each resource in layers);
- The Job List (to create the Jobs though each resource);
- The Alloc Unit List (to set the specific data for each slot or a group of slots of jobs).
- RESNUM:Total number of resources. Each "RES_" parameter bellow should be unique and should contain the same number of elements specificied by RESNUM.
- RES_?:Each element is a data structure divided by a separator (pipe) that contains: unique ID|a name of resource|a description of resource|the id of parent resource|number of layer.
- LAYERNUM:Total number of layers.
- LAYER_?:Each element is a data structure divided by pipe that contains: unique ID|position of layer on GUI|Name of Layer|Description of Layer|color (RGB format)|capacity (in minutes).
- JOBNUM:Total number os Jobs.
- JOB_?:Each element is a data structure divided by pipe that contains: unique ID|resource ID|Job ID|Description of Job|layer ID|mark type (0-none; 1-Dash Block; 2-Cross; 3-Dash).
- AUNITNUM:Total number os alloc units.
- AUNIT_?:Each element is a data structure divided by pipe that contains: job id|resource id|value of slot (to be used for any purposes)|initial slot|final slot|mark type (not implemented yet)
- For empty fields in RES_?, LAYER_?, JOB_?, etc, use a space between the two pipes. Otherwise, the parser fail.
- Click here to download the example bellow.
