Example 4.25: Zoned Gantt Charts
Example 4.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 4.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 4.25.1. You can customize the color,
linestyle 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='02dec91'd data=widgetn;
activity task;
duration days;
successor succ1 succ2 succ3;
id dept;
run;
proc sort;
by dept e_start;
run;
title2 f=swiss 'Zoned Gantt Chart';
proc gantt split='/';
chart / pcompress scale=1 dur=days
mindate='02dec91'd maxdate='12feb92'd
font=swiss
zone=dept onezoneval;
id task;
run;
Output 4.25.1: Gantt Charts Zoned By Department
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.