|
NAMEProject::Gantt - Create Gantt charts to manage project scheduling SYNOPSIS #!/usr/bin/perl -w
# a fun, imaginary wednesday
use strict;
use Project::Gantt;
use Project::Gantt::Skin;
my $skin= new Project::Gantt::Skin(
doTitle => 0);
my $day = new Project::Gantt(
file => 'hourly.png',
skin => $skin,
mode => 'hours',
description => 'A day in the life');
my $al = $day->addResource(
name => 'Alex');
$day->addTask(
description => 'Finish sleep',
resource => $al,
start => '2004-07-21 00:00:00',
end => '2004-07-21 08:30:00');
$day->addTask(
description => 'Breakfast/Wakeup',
resource => $al,
start => '2004-07-21 08:30:00',
end => '2004-07-21 10:00:00');
my $sub = $day->addSubProject(
description => 'Important Stuff');
$sub->addTask(
description => 'Contemplate my navel',
resource => $al,
start => '2004-07-21 10:00:00',
end => '2004-07-21 11:00:00');
$day->addTask(
description => 'Lunch',
resource => $al,
start => '2004-07-21 11:00:00',
end => '2004-07-21 12:30:00');
$sub->addTask(
description => 'Wonder about life',
resource => $al,
start => '2004-07-21 11:00:00',
end => '2004-07-21 11:22:00');
$day->addTask(
description => 'Code for a while',
resource => $al,
start => '2004-07-21 12:30:00',
end => '2004-07-21 17:00:00');
$day->addTask(
description => 'Sail',
resource => $al,
start => '2004-07-21 17:00:00',
end => '2004-07-21 20:30:00');
$day->display();
DESCRIPTIONProject::Gantt provides the ability to easily draw Gantt charts for managing the schedules of projects and many other things. Gantt charts provide a simple, easy to comprehend visual representation of a schedule. The code above creates a simple chart to display the hour-by-hour breakdown of a sample day. Notice the Project::Gantt::Skin object in use. This allows the look and feel of a Gantt chart to be customized. Also note that tasks are divided into two main categories: those that fall directly under the project, and those which are members of the subproject "Important Stuff". Note also that the chart itself will be written to a file in the current working directory called "hourly.png". This filename attribute may be set to something such as "png:-" to send output directly to STDOUT. As can be seen from the example, the methods that will be called by a user of this module include: addResource,addTask, addSubProject, and display. The names of these methods suggest their purpose, but they will be further explained.
SKIN OBJECTSProject::Gantt::Skin objects allow users to customize the color scheme of a chart. The skin object is passed to Project::Gantt during construction. All aspects of the skin are set during its construction as well. The following facets of the chart may be modified:
AUTHORAlexander Christian Westholm, <awestholm AT verizon.net> CHANGESAugust, 2004: Original Version January 2005: Modifications made by Peter Weatherdon (peter.weatherdon AT us.cd-adapco.com), including various bug fixes, and nested sub-projects. SEE ALSOImage::Magick, Class::Date COPYRIGHTCopyright 2005, Alexander Christian Westholm. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. POD ERRORSHey! The above document had some coding errors, which are explained below:
|