Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GANTT Procedure

Example 4.4: Marking Milestones and Special Dates

The widget manufacturing project described in Example 4.3 has two activities with zero duration, namely 'Production' and 'Marketing'. By default, PROC GANTT pads finish times by a padding unit, thus these two activities are represented on the Gantt chart as having a duration equal to one day (see the "Specifying the PADDING= Option" section for further information on padding). In other words, based on start and finish times alone, PROC GANTT cannot distinguish between activities that are one day or zero days long; it needs knowledge of the activity duration variable, which is specified using the DUR= option in the CHART statement, in order to represent zero duration activities by a milestone symbol. Now, suppose that the Engineering department would like to finish writing up the specifications before Christmas and have the prototype ready by mid-January. In addition, the Marketing department would like to develop a marketing concept by the year's end. The data set, TARGET, contains the target dates for these activities. This data set is merged with the WIDGET data set to produce the WIDGETT data set. The WIDGETT data set is then input to the CPM procedure, which is invoked with an ID statement to ensure that the variable TARGET is passed to the Schedule data set. After sorting the Schedule data set by the early start time, PROC GANTT is used to produce a Gantt chart of the resulting schedule.

Before invoking PROC GANTT, you specify the required fill patterns and symbols using PATTERN and SYMBOL statements. Specifying the variable TARGET in the CHART statement causes target dates to be marked on the chart with the symbol specified in the SYMBOL statement, a PLUS symbol in black. Specifying the DUR= option in the CHART statement causes zero duration schedules to be represented on the chart by the default milestone symbol, a filled diamond. To use a different milestone symbol, use the FMILE= and VMILE= options in the CHART statement. The duration and slack time of the activities are indicated by the use of the appropriate fill patterns as explained in the legend.

Colors for the milestone, axis, frame fill, and text are specified using the options CMILE=, CAXIS=, CFRAME=, and CTEXT=, respectively. The SIMPLEX font is used for all text by specifying the FONT= option in the CHART statement. The global options HPOS= and VPOS= are set to 120 and 40, respectively.

   options ps=60 ls=100;

   title f=swiss 'Gantt Example 4';
   title2 f=simplex 'Marking Milestones and Special Dates';


   proc cpm data=widget date='2dec91'd;
      activity task;
      successor succ1-succ3;
      duration days;
   run;


   * sort the schedule by the early start date ;

   proc sort;
      by e_start;
   run;


   goptions hpos=120 vpos=40;


   * set up required pattern and symbol 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 */

   symbol   c=black v=plus;


   * plot the schedule;

   proc gantt;
      chart target / dur=days cmile=cyan
                     font=simplex ctext=blue
                     caxis=cyan cframe=white;
      id task;
   run;

Output 4.4.1: Marking Milestones and Special Dates in Graphics Mode
ga04p1.gif (4749 bytes)

ga04p2.gif (4582 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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