The GANTT Procedure

Example 6.7: Using the MINDATE= and MAXDATE= Options

In this example, the SAVE data set from Example 6.6 is used to display the schedule of the project over a limited time period. The start date and end date are specified by the MINDATE= and MAXDATE= options, respectively, in the CHART statement. As in Example 6.5, the COMPRESS option is used to ensure that the region of the Gantt chart lying between January 1, 2004, and February 2, 2004, fits on a single page. The specification REF='5JAN04'D TO '2FEB04'D BY WEEK causes PROC GANTT to draw reference lines at the start of every week. Further, the reference lines are labeled using the REFLABEL option. The CREF= and LREF= options are specified in the CHART statement to indicate the color and line style, respectively, of the reference lines. The CFRAME= option is used to specify the color of the frame fill. The resulting Gantt chart is shown in Output 6.7.1.

  
    title 'Gantt Example 7'; 
    title2 'Using the MINDATE= and MAXDATE= Options'; 
  
    goptions vpos=40 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 */
 
  
    * plot the schedule; 
  
    proc gantt data=save; 
       chart / mindate='1jan04'd maxdate='2feb04'd 
               ref='5jan04'd to '2feb04'd by week 
               reflabel cref=black lref=2 
               cframe=cyan 
               dur=days nojobnum 
               compress; 
       id task; 
       run;
 

Output 6.7.1: Using the MINDATE= and MAXDATE= Options in Graphics Mode
ga07.gif (15136 bytes)

Previous Page | Next Page | Top of Page