The GANTT Procedure |
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 6.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. The resulting Gantt chart is displayed in Output 6.17.1.
title 'Gantt Example 17'; title2 '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=blue v=s; /* duration of a noncrit. activity */ pattern2 c=blue v=e; /* slack time for a noncrit. act. */ pattern3 c=red v=s; /* duration of a critical activity */ pattern4 c=red v=e; /* slack time for a supercrit. act. */ pattern5 c=red v=r2; /* duration of a supercrit. act. */ pattern6 c=cyan v=s; /* actual duration of an activity */ pattern7 c=blue v=r1; /* break due to a holiday */ pattern8 c=red v=x1; /* res. constrained dur of an act. */ pattern9 c=blue v=s; /* baseline duration of an activity */
proc sort data=spltschd; by e_start; run; * draw Gantt chart using height and htoff equal to 2; proc gantt data=spltschd holidata=holdata; chart / holiday=(hol) dur=days cmile=green height=2 htoff=2 compress; id task; run;Output 6.17.1: Using the HEIGHT= and HTOFF= options
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.