|
Chapter Contents |
Previous |
Next |
| The GANTT Procedure |
The height of the text characters is controlled by both the HEIGHT= option in the CHART statement and the HTEXT= option specified in a GOPTIONS statement. The text height is set equal to the product of the HEIGHT= and HTEXT= values. The units in which the text height is measured are those of the HTEXT= option. By default, the value of HEIGHT= is 1, which sets the text height to be equal to the HTEXT= value. The default value of HTEXT= is 1 unit, where a unit is defined by the GUNIT= option in a GOPTIONS statement. Thus, in the absence of the HEIGHT=, HTEXT=, and GUNIT= options, the text height is the same as the bar height, namely one cell height. Increasing the value of HEIGHT= is useful when you use the COMPRESS option, particularly when you have a very large chart. Since the chart is scaled as appropriate to fit on one page, the text can be very hard to discern, or even illegible, and would benefit from enlargement. Relative positioning of the font baseline for activity text is controlled by the HTOFF= option in the CHART statement. By default, the font baseline for an activity is at the bottom of the first bar corresponding to the activity.
The color of the text characters is specified using the CTEXT= option in the CHART statement. If CTEXT= is not specified, PROC GANTT uses the value of the CTEXT= option specified in a GOPTIONS statement that has a default value of the first color in the current COLORS= list in the GOPTIONS statement. You can override the text colors for selected columns of activity text at the activity level by using a PATTERN variable in the Schedule data set and specifying the CTEXTCOLS= option in the CHART statement.
The font used for the text characters is specified with the FONT= option in the CHART statement. If FONT= is not specified, PROC GANTT uses the value of the FTEXT= option specified in a GOPTIONS statement that has a default value of the hardware font for your output device. If the hardware font cannot be used, the SIMULATE font is used instead. The default value of the SIMULATE font is the SIMPLEX font.
Global PATTERN statements are used to specify the fill pattern for the different types of bars drawn on the Gantt chart. Each fill pattern can be associated with a color. Patterns can be be used to reflect the status of an activity (normal, critical, supercritical) in the predicted early/late schedule, to indicate the different schedule types (actual, resource-constrained, baseline), and to represent weekends, holidays and breaks on the Gantt chart. See the "Using PATTERN Statements" section for details. In addition, you can override these fill patterns for selected schedules at an activity level by using a PATTERN variable in the Schedule data set and specifying the PATLEVEL= option in the CHART statement. You can use global SYMBOL statements to define the symbols that represent CHART variables in the Gantt chart. The SYMBOL statement enables you to select symbols from different fonts and modify their appearance to suit your requirements. You can specify a color and a height for the symbol in addition to a variety of other options. See the "Using SYMBOL Statements" section for details.
Coordinates specify where graphic elements are to be positioned. A coordinate system, in turn, determines how coordinates are interpreted. There are several different coordinate systems that are used by the Annotate facility. Typically, one of three major drawing areas can be associated with any coordinate system: data area, procedure output area, and graphics output area. This chapter explains the coordinate system that is based on the data area of PROC GANTT.
When annotating a graph produced by any of the graphics procedures, you may find it helpful to use data coordinates that refer to the data values corresponding to the graph that is being annotated. For example, if you want to label a particular activity of a Gantt chart with additional text, you can position the text accurately if you use data coordinates instead of screen coordinates. With respect to PROC GANTT, the Annotate facility uses the time axis and the activity axis of the Gantt chart as the basis for the data coordinate system. To use this feature, create a Annotate data set based on the Schedule data set that is input to the procedure, utilizing Annotate macros whenever possible to simplify the process.
Note: The data coordinate system enables you to annotate the graph even if it spans multiple pages. However, each annotation must be entirely contained within a given page. For example, you cannot annotate a line on the Gantt chart that runs from one page of the chart to another.
In addition to a coordinate system based on the data, you can select a coordinate system based on either the procedure output area or the Graphics output area. You would typically need to use one of these systems, for example, if you want to annotate text outside the chart area.
Any PATTERN statements that you specify are used. If more are needed, default PATTERN statements are used.
You can override any of these patterns at the activity level by using a PATTERN variable in the schedule data set. A PATTERN variable is identified by specifying the PATTERN= option in the CHART statement or by the presence of the default _PATTERN variable.
Table 4.24: PATTERN Statements used by PROC GANTT| PATTERN | Used to Denote |
| 1 | duration of a noncritical activity |
| 2 | slack time for a noncritical activity |
| 3 | duration of a critical activity |
| 4 | slack time for a supercritical activity |
| 5 | duration of a supercritical activity |
| 6 | actual duration of an activity |
| 7 | break due to a holiday |
| 8 | resource-constrained duration of an activity |
| 9 | baseline duration of an activity |
Refer to the SAS/GRAPH documentation for a detailed description of PATTERN statements. Most of the relevant information is reproduced here for the sake of completeness.
PATTERNn options;
where
PATTERN statements are additive; if you specify a C= or V= option in a PATTERN statement and then omit that option in a later PATTERN statement ending in the same number, the option remains in effect. To turn off options specified in a previous PATTERNn statement, either specify all options in a new PATTERNn statement, or use the keyword PATTERNn followed by a semicolon. For example, the following statement turns off any C= or V= option specified in previous PATTERN3 statements:
pattern3;
You can reset options in PATTERN statements to their default values by specifying a null value. A comma can be used (but is not required) to separate a null parameter from the next option.
For example, both of the following statements cause the C= option to assume its default value (the value of the CPATTERN= option or the first color in the COLORS= list):
pattern c=, v=solid;or
pattern c= v=solid;
In the following statement, both options are reset to their default values:
pattern2 c= v=;
You can also turn off options by specifying the RESET= option in a GOPTIONS statement.
pattern1 v=x3 c=red;
You can use the REPEAT= option in the statement to repeat the pattern before going to the next pattern. For example, if you specify the following statements, PATTERN1 is repeated ten times before PATTERN2 is used:
pattern1 v=x3 c=red r=10; pattern2 v=s c=blue r=10;
Remember that if you omit the COLOR= option in the PATTERN statement and you do not specify the CPATTERN= option, SAS/GRAPH software repeats the pattern for each color in the current COLORS= list. If you specify the R= option in a PATTERN statement from which the C= option is omitted, the statement cycles through the COLORS= list the number of times given by the value of the R= option.
For example, if the current device has seven colors, then the following statement results in 70 patterns because each group of seven patterns generated by cycling through the COLORS= list is repeated ten times:
pattern v=x3 r=10;
In a PATTERN statement, if you specify a value for the V= option but not for the C= option, the procedure uses the value you specified for the CPATTERN= option in a GOPTIONS statement. If you omitted the CPATTERN= option, the procedure uses the pattern specified for the V= option with each color in the COLORS= list before it uses the next PATTERN statement. Thus, if you specify the following statements, the PATTERN1 statement is used for the first type of bar, namely, for the duration of a noncritical activity:
pattern1 c=red v=x3; pattern2 v=s; pattern3 c=blue v=l3; pattern4 c=green v=r4; proc gantt data=sched;
The PATTERN2 statement is used for the second type of bar, namely, for the slack time of a noncritical activity. Because a C= value is not specified in the PATTERN2 statement, SAS/GRAPH software uses the PATTERN2 statement and cycles through the colors in the COLORS= list for the device to obtain as many patterns as there are colors in the list. If needed, the PATTERN3 and PATTERN4 values are then used for any remaining types of bars.
See also the "Special Fonts for Project Management and Decision Analysis" section for a description of some typically used Gantt chart symbols that can be specified using a SYMBOL statement.
Refer to the SAS/GRAPH documentation for a detailed description of SYMBOL statements. Most of the relevant information is reproduced here for the sake of completeness.
SYMBOL n options;
where
SYMBOL statements are additive; that is, if you specify a given option in a SYMBOL statement and then omit that option in a later SYMBOL statement ending in the same number, the option remains in effect. To turn off all options specified in previous SYMBOL statements, you can specify all options in a new SYMBOLn statement, use the keyword SYMBOLn followed by a semicolon, or specify a null value. A comma can be used (but is not required) to separate a null parameter from the next option.
For example, both of the following statements cause the C= option to assume its default value (the value of the CSYMBOL= option or the first color in the COLORS= list):
symbol1 c=, v=plus;and
symbol1 c= v=plus;
In the following statement, both options are reset to their default values:
symbol4 c= v=;
You can also turn off options by specifying the RESET= option in a GOPTIONS statement.
For example, this SYMBOL statement
symbol1 c=green v=K f=special h=2;
indicates that the symbol at each data point is the letter K from the SPECIAL font (a filled square), drawn in green, the height being twice the bar height.
+)
from the special symbol table.
Note that if you use the special
symbol comma (,) with the V= option, you must enclose the comma in
quotes as illustrated in the following statement:
symbol1 v=',';
For example, to use a filled yellow "doghouse" symbol to represent milestones on the Gantt chart, specify the options
VMILE="H" FMILE=ORFONT CMILE=YELLLOW
in the CHART statement. If you wish to represent a CHART variable with an empty blue "circled arrow," then specify the following options in the corresponding SYMBOL statement.
V="Q" F=ORFONTE C=BLUE;
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.