Gantt Class Methods
These methods are used by the Gantt class. The methods are described in alphabetic order.
Syntax
Refresh()
Description
Use the Refresh method if the underlying data of the chart has changed, and you want to update the chart.
Note: This method has been deprecated and remains for backward compatibility only. Use the SetTaskAppData method or SetTaskData method instead.
You don’t need to refresh after setting a property or method of the chart itself, such as setting the starting point or changing colors. When a method or property is used, the chart is automatically refreshed.
Parameters
None.
Returns
None.
Example
&MyChart.Refresh();
Syntax
Reset()
Description
Use the Reset method to clear all existing chart settings and data.
Parameters
None.
Returns
None.
Syntax
SetActualEndDate(RecordName.FieldName)
Description
Use the SetActualEndDate method to specify the field in the record that defines the actual end date. This is an optional method, and is used in conjunction with the SetPlannedEndDate method. If an actual end date is specified, then an actual start date must also be specified. When defined, the actual or baseline tasks are visually shown as a separate task bar and are layered beneath the planned task if the two overlap.
Note: For any task that has a bad date format (from either SetActualEndDate or SetActualStartDate), any overlaid baseline information is not displayed in the chart section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that contains the value used to define the actual end date. This field must be of DateTime or Date type. |
Returns
None.
Syntax
SetActualStartDate(RecordName.FieldName)
Description
Use the SetActualStartDate method to specify the field in the record that defines the actual start date. This is an optional method, and is used in conjunction with the SetPlannedStartDate method. If an actual start date is specified, then an actual end date must also be specified. When defined, the actual or baseline tasks are visually shown as a separate task bar and are layered beneath the planned task if the two overlap.
Note: For any task that has a bad date format (from either SetActualEndDate or SetActualStartDate), any overlaid baseline information is not displayed in the chart section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that contains the value used to define the actual start date. This field must be of DateTime or Date type. |
Returns
None.
Syntax
SetActualTaskBarColor(RecordName.FieldName)
Description
Use the SetActualTaskBarColor method to specify the field in the record that defines the colors for either the actual task bar or the actual milestone glyph.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the task bar color. This field must be of type number, which means you can only use the numeric value for the color. |
Returns
None.
Syntax
SetChartArea(Percentage)
Description
Use the SetChartArea method to specify what percentage of the Gantt chart is allocated to displaying the chart section. By default, both the task and chart sections are allocated 50% of the available space provided by the Gantt chart.
Parameters
Field or Control |
Definition |
---|---|
Percentage |
Specify the percentage of the page space for a Gantt chart that is allocated for displaying the chart area. Oracle recommends setting this value above .20 or 20%. Any point below .20 may cause the task bars and task dependency lines to become compressed and hard to read. If the percentage is set less than 0, this method uses a value of 0, enabling the table area to occupy the entire Gantt chart area. This parameter takes a float value. |
Returns
None.
Syntax
SetDayFormat(Format)
Description
Use the SetDayFormat method to specify the format of the day on a time line axis.
Parameters
Field or Control |
Definition |
---|---|
Format |
Specify the format the day should display in. The values are: |
Value |
Description |
---|---|
%Chart_DayFormat |
Display the day in a one- or two-digit format. Note: This is the default format. |
%Chart_DayFormat_2Digit |
Note: This constant has been deprecated; if specified, it defaults to %Chart_DayFormat. |
%Chart_DayFormat_Name |
Display the day using the full name, such as Monday, Tuesday, and so on. |
%Chart_DayFormat_DOY |
Display the day of the year in a numeric format, that is 1–366. |
%Chart_DayFormat_DOY_ 2Digit |
Note: This constant has been deprecated; if specified, it defaults to %Chart_DayFormat. |
%Chart_DayFormat_ShortName |
Display the day using the short name, such as Mon, Tue, and so on. |
Returns
None.
Syntax
SetHourFormat(Format)
Description
This method has been deprecated and is ignored. The hour format is determined by a user's personalization settings.
Syntax
SetMinuteFormat(Format)
Description
This method has been deprecated and is ignored. The minute format is determined by a user's personalization settings.
Returns
None.
Syntax
SetMonthFormat(Format)
Description
Use the SetMonthFormat method to specify the format of months on a time line axis.
Parameters
Field or Control |
Definition |
---|---|
Format |
Specify the format of how the month should be displayed. Values are: |
Value |
Description |
---|---|
%Chart_MonthFormat |
Display the month using a one- or two-digit number. Note: This is the default format. |
%Chart_MonthFormat_2Digit |
Note: This constant has been deprecated; if specified, it defaults to %Chart_MonthFormat. |
%Chart_MonthFormat_ FullName |
Display the month using the full name. |
%Chart_MonthFormat_ShortName |
Display the month using the short name, such as Jan, Feb, and so on. |
Returns
None.
Syntax
SetPlannedEndDate(RecordName.FieldName)
Description
Use the SetPlannedEndDate method to specify the field in the record that defines the planned end date. If planned versus actual dates are not used, this method specifies the end date of the task.
This method is required when creating a Gantt chart.
Note: For any task that has a bad date format (from either SetPlannedEndDate or SetPlannedStartDate), any overlaid baseline information is not displayed in the chart section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that contains the value used to define the planned end date. This field must be of DateTime or Date type. |
Returns
None.
Syntax
SetPlannedStartDate(RecordName.FieldName)
Description
Use the SetPlannedStartDate method to specify the field in the record that defines the planned start date. If planned versus actual dates are not used, this method specifies the start date of the task.
This method is required when creating a Gantt chart.
Note: For any task that has a bad date format (from either SetPlannedEndDate or SetPlannedStartDate), any overlaid baseline information is not displayed in the chart section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that contains the value used to define the planned start date. This field must be of DateTime or Date type. |
Returns
None.
Syntax
SetPlannedTaskBarColor(RecordName.FieldName)
Description
Use the SetPlannedTaskBarColor method to specify the field in the record that defines the colors for either the planned task bar or the planned milestone glyph.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the task bar color. This field must be of type number, which mean you can only use the numeric values for specifying color. |
Returns
None.
Syntax
SetSecondFormat(Format)
Description
This method has been deprecated and is ignored. The second format is determined by a user's personalization settings.
Syntax
SetTableXScrollbar(Scroll_ArrowAmount)
Description
This method has been deprecated and is ignored.
Syntax
SetTaskAppData(RecordName.FieldName1 [, RecordName.FieldName2 [,RecordName.FieldName3. . .]])
Description
Use the SetTaskAppData method to specify the fields in the record that define the application data to be viewed in the table section.
In the table section, column one (or the left-most column) always displays the work breakdown structure (WBS) numbering (if given) and name of the task (or task ID if the name is not given). This method allows applications to define additional task data columns to be displayed in the right-most columns of the table section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldNames |
Specify the fields and their associated record that defines one or more application specific fields to be displayed as a column in the table section. The order in which the fields are given as parameters defines their column order in the table section. Because the task name (or task ID if the name is not given) is always shown in column one, the first record field value is displayed in column two. |
Returns
None.
Syntax
SetTaskAppDataTitles(&TitleArray)
Description
Use the SetTaskAppDataTitles method to specify the column titles to be displayed in the table section, starting with column two. The title for column one (that is, the left-most column) in the table section is set using the SetTaskTitle method.
The length of the array should match the number of application data fields specified with the SetTaskAppData method. Additional strings beyond the number of application data fields are not displayed. If the number of strings in the array specified by this method is less than the number of application data fields, the blanks are displayed in these title columns.
Parameters
Field or Control |
Definition |
---|---|
&TitleArray |
Specify an array of strings containing the column titles to be displayed in the table section. |
Returns
None.
Syntax
SetTaskBarURL(RecordName.FieldName)
Description
Use the SetTaskBarURL method to specify the field in the record which defines the URL the browser redirects to when the user clicks on a task bar.
By default, the FieldChange event on the planned end date field of the Gantt task data record is triggered if the image map based interactivity is turned on (using the IsDrillable property). This can be overridden by specifying a URL that is triggered when the task bar is clicked.
Use the SetTaskDependencyURL method to specify the URL to be used when the user clicks on a dependency line in the chart section.
Parameters
Field or Control |
Definition |
---|---|
Record.Fieldname |
Specify the field, and its associated record, that defines the URL the browser is redirected to when the task bar is clicked. This field must be of type character. The URL must be an absolute URL. |
Returns
None.
Syntax
SetTaskData({Record.RecordName | &Rowset})
Description
Use the SetTaskData method to specify from where the task data is to be populated, either from a record or an already instantiated rowset.
Note: If you specify a rowset, the data in the rowset must be provided in the correct display order.
This method is required when you're creating a Gantt chart.
Parameters
Field or Control |
Definition |
---|---|
RecordName | &Rowset |
Specify the record or rowset that contains the task data. If you specify a record, you must prefix the record name with the keyword Record. |
Returns
None.
Syntax
SetTaskDependencyChildID(RecordName.FieldName)
Description
The dependent task is the task where the dependency arrow ends. Use the SetTaskDependencyChildID method to specify the field in the record that defines the task ID for the dependent task.
The ID must match up to an ID in the Task data set.
This method is required if you specify dependency data.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the task ID for the dependant task. This field must be of type number. |
Returns
None.
Syntax
SetTaskDependencyData({RecordName | &Rowset})
Description
Use the SetTaskDependencyData method to specify either a record, or an already instantiated rowset, that contains the dependency data.
Note: If you specify a rowset, the data in the rowset must be provided in the correct display order.
Parameters
Field or Control |
Definition |
---|---|
RecordName | &Rowset |
Specify the record or rowset that contains the task data. If you specify a record, you must prefix the record name with the keyword Record. |
Returns
None.
Syntax
SetTaskDependencyParentID(RecordName.FieldName)
Description
The depender task is the task where the dependency arrow originates. Use the SetTaskDependencyParentID method to specify the field in the record that defines the task ID for the depender task.
The ID must match up to an ID in the Task data set.
This method is required if you specify dependency data.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that defines the task ID for the depender task. This field must be of type number. |
Returns
None.
Syntax
SetTaskDependencyType(RecordName.FieldName)
Description
Use the SetTaskDependencyType method to specify the type of dependency relationship between predecessor and successor tasks.
The values for type are as follows:
Type |
Description |
---|---|
Finish-to-Start |
The arrow starts at the end of the predecessor task bar and ends at the start of the successor task bar. This is the default value |
Finish-to-Finish |
The arrow starts at the end of the predecessor task bar and ends at the end of the successor task bar. |
Start-to-Start |
The arrow starts at the start of the predecessor task bar and ends at the start of the successor task bar. |
Start-to-Finish |
The arrow starts at the start of the predecessor task bar and ends at the end of the successor task bar. |
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the type of dependencies between predecessor and successor tasks. This field must be of type integer, and one of the following values: |
Value |
Description |
---|---|
0 or any value greater than 3 |
Finish-to-Start |
1 |
Finish-to-Finish |
2 |
Start-to-Start |
3 |
Start-to-Finish |
Returns
None.
Syntax
SetTaskDependencyURL(RecordName.FieldName)
Description
Use the SetTaskDependencyURL method to specify the field in the record that defines the URL the browser redirects to when the user clicks on a task bar.
By default, the FieldChange event on the child ID field of the task dependency record is triggered if the image map based interactivity is turned on (using the IsDrillable property). This can be overridden by specifying a URL that is triggered when the task bar is clicked.
Use the SetTaskBarURL method to specify the URL to be used when the user clicks on a task bar in the chart section.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the URL the browser is redirected to when the dependency arrow is clicked. This field must be of type character. The URL must be an absolute URL. |
Returns
None.
Syntax
SetTaskDrill(Recordname.FieldName)
Description
Use the SetTaskDrill method to specify for which field PeopleCode FieldEdit and FieldChange events will execute when the user clicks the task bar.
The field can be any field that is loaded in the component buffer.
The system does not change the value in the field when the user clicks the field. Any changes or other processing for the field must be done within the PeopleCode program.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the record name and the field name of the field to be used for field change processing. The field must be available in the component buffer. |
Returns
None.
Syntax
SetTaskExpanded((RecordName.FieldName)
Description
This method has been deprecated and is ignored.
Syntax
SetTaskID(RecordName.FieldName)
Description
Use the SetTaskID method to specify the field that defines the unique task identifier. The task ID is used to support task linking and dependencies.
Note: The field must be of type number.
This method is required when you're creating a Gantt chart.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the record name and the field name of the field that defines the unique task identifier. Note: The field must be of type number. |
Returns
None.
Syntax
SetTaskLabel(RecordName.FieldName)
Description
Use the SetTaskLabel method to specify the field in the record that defines the task label. The label is displayed alongside its corresponding task bar in the chart area. If a task label is not provided, the task name is used instead. If a task name is not provided, the task id is used.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that contains the task label. This field must be of type character. |
Returns
None.
Syntax
SetTaskLevel(RecordName.FieldName)
Description
Use the SetTaskLevel method to specify the field in the record that defines the level for the task. The outermost summary tasks are always defined as task level one. Tasks with task levels greater than one are subtasks. Subtasks may also contain other subtasks.
If a field is not provided to define the level, all tasks are defined at level 1. A maximum of 32 levels are supported.
The following table shows an example of the different levels that could be used, as well as what the parent task level is.
Note: The parent task is not actually part of the data.
Task Name |
Task Level |
Parent Level |
---|---|---|
Phase I |
1 |
None |
Evaluation |
2 |
Phase I |
Research |
3 |
Evaluation |
Report Findings |
3 |
Evaluation |
Create Budget |
2 |
Phase I |
Approve Budget |
3 |
Create Budget |
Phase II |
1 |
None |
Code and Test |
2 |
Phase II |
Phase III |
1 |
None |
Training |
2 |
Phase III |
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that contains the information about the task level. This field must be of type number. Up to 32 levels are supported. |
Returns
None.
Syntax
SetTaskMilestone(RecordName.FieldName)
Description
Use the SetTaskMilestone method to specify the field in the record that defines whether the task should be treated as a milestone.
The fields specified by the SetPlannedStartDate and SetActualStartDate methods are used for determining the dates for the planned and actual milestones. The other date fields in the rowset are ignored
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field and its associated record that defines whether the task should be treated as a milestone. The field must be of type Character, and be one character long. The possible values for this field are Y, used to specify that this task is a milestone, or N, if not. |
Returns
None.
Syntax
SetTaskName(RecordName.FieldName)
Description
Use the SetTaskName method to specify the field in the record that defines the task name. If you do not specify a task name, the task ID is used in the table section of the Gantt chart.
Although this method is not required, Oracle recommends using it to display meaningful information in the table section of the Gantt chart.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field name and its associated record that defines the task name. The field must be of type character. |
Returns
None.
Syntax
SetTaskProgress(RecordName.FieldName)
Description
Use the SetTaskProgress method to specify the field in the record that defines the length of the progress bar for this task as shown in the chart area of the Gantt chart.
The value in the field must be between 0 and 100, inclusive. Zero indicates no progress bar is shown, 100 indicates that the progress bar should cover the entire length of the task bar. Values greater than 100 are automatically converted to 100.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the length of the progress bar for this task. This field must be of type number. The value in the field must be between 0 and 100, inclusive. You must not specify a value greater than 100. |
Returns
None.
Syntax
SetTaskProgressBarColor(RecordName.FieldName)
Description
Use the SetTaskProgressBarColor method to specify the field in the record that defines the color for the progress bar.
For the progress bar to be visible, its color must contrast with the task bar color. No borders are drawn around the progress bar.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field, and its associated record, that defines the task progress bar color. This field must be of type numeric, which means that you can only use the numeric value for the chart colors, not the constant. |
Returns
None.
Syntax
SetWBSNumbering(RecordName.FieldName)
Description
Use the SetWBSNumbering method to specify the field in the record that defines the WBS numbering to be displayed for each task row in the table section of the Gantt chart.
A WBS is very similar in structure and layout to a document outline. Each item at a specific level of a WBS is numbered consecutively (that is, 10, 20, 30, 40, 50). Each item at the next level is numbered within the number of its parent item (that is, 10.1, 10.2, 10.3, 10.4). For example:
1.
1.1
1.1.1
1.1.2
1.1.3
1.2
1.2.1
1.2.2
2.
. . .
If no field name is provided, WBS numbering is not displayed along with the tasks.
Regardless if WBS numbering is provided, child tasks are indented to the right of their parent task.
Parameters
Field or Control |
Definition |
---|---|
RecordName.FieldName |
Specify the field name and its associated record that defines the WBS numbering to be displayed. The field must be of type character. |
Returns
None.
Syntax
SetYearFormat(Format)
Description
Use the SetYearFormat method to specify the format of years on the time line axis.
Parameters
Field or Control |
Definition |
---|---|
Format |
Specify the format of how the year should be displayed. Values are: |
Value |
Description |
---|---|
%Chart_YearFormat |
Display the year in a numeric one- or two-digit format. |
%Chart_YearFormat_2Digit |
Note: This constant has been deprecated; if specified, it defaults to %Chart_YearFormat _4Digit. |
%Chart_YearFormat_4Digit |
Display the year in a numeric four-digit format. Note: This is the default format. |
Returns
None.