The GANTT Procedure

Example 6.25: Zoned Gantt Charts

Example 6.15 illustrated the use of BY processing with the GANTT procedure to present separate Gantt charts for each department. Alternatively, you can use a zoned Gantt chart to display each of the departmental schedules on the same chart with the different department schedules separated by horizontal zone lines running across the chart. The ZONE variable divides the Activity axis into distinct zones. Activities with the same value of the ZONE variable belong to the same zone. This example produces a zoned Gantt chart using the schedule data from Example 6.15. The ZONE=DEPT specification in the CHART statement identifies the DEPT variable as the ZONE variable. The ONEZONEVAL option specifies that the value of the ZONE variable be displayed only when beginning new zones. The resulting Gantt chart is shown in Output 6.25.1. You can customize the color, style and width of the zone line by using the CZONE=, LZONE=, and WZONE= options, respectively. You can also control the span and offset of the zone line by specifying the ZONESPAN= and ZONEOFF= options, respectively, in the CHART statement.

  
    title1 'Gantt Example 25'; 
    proc cpm date='01dec03'd data=widgetn; 
       activity task; 
       duration days; 
       successor succ1 succ2 succ3; 
       id dept; 
       run; 
  
    proc sort; 
       by dept e_start; 
       run; 
  
    title2 'Zoned Gantt Chart'; 
  
    proc gantt split='/'; 
       chart / pcompress scale=1 dur=days 
               mindate='01dec03'd maxdate='11feb04'd 
               zone=dept onezoneval; 
       id task; 
       run;
 

Output 6.25.1: Gantt Charts Zoned by Department
ga25.gif (13572 bytes)

Previous Page | Next Page | Top of Page