Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GANTT Procedure

Example 4.17: Using the HEIGHT= and HTOFF= Options

The following example illustrates two options that control the height and positioning of all text produced by PROC GANTT. The data used for this example come from Example 4.13, which illustrates plotting of the resource-constrained schedule. PATTERN statements are specified in order to identify the fill patterns for the different schedule types and holidays. The resource-constrained schedule is drawn using the fill pattern from the eighth PATTERN statement. The HEIGHT= option is set to 2, indicating that the height of all text produced by PROC GANTT be equal to the height of two activity bars. This text includes activity text, legend text, and axis labeling text. The HTOFF= option is also set to 2, which drops the font baseline of the activity text by the height of one schedule bar causing the font baseline to be positioned at the bottom of the resource-constrained schedule bar.

   title f=swiss 'Gantt Example 17';
   title2 f=swiss 'Using the HEIGHT= and HTOFF= options';

   * set vpos to 50 and hpos to 100;

   goptions vpos=50 hpos=100;

    * set up required pattern statements;

   pattern1 c=green v=s;  /* duration of a noncrit. activity  */
   pattern2 c=green v=e;  /* slack time for a noncrit. act.   */
   pattern3 c=red   v=s;  /* duration of a critical activity  */
   pattern4 c=green v=s;  /* slack time for a supercrit. act. */
   pattern5 c=green v=e;  /* duration of a supercrit. act.    */
   pattern6 c=cyan v=s;   /* actual duration of an activity   */
   pattern7 c=black v=x1; /* break due to a holiday           */
   pattern8 c=blue v=s;   /* res. constrained dur of an act.  */
   pattern9 c=brown v=s;  /* baseline duration of an activity */


   proc sort data=spltschd;
      by e_start;


   goptions cback=cyan;


   * draw Gantt chart using height and htoff equal to 2;

   proc gantt data=spltschd holidata=holdata;
      chart / holiday=(hol) font=swiss
              dur=days cmile=green
              height=2
              htoff=2
              compress;
      id task;
   run;

Output 4.17.1: Using the HEIGHT= and HTOFF= options
ga17.gif (6419 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.