
Image::OrgChart - Perl extension for writing org charts

use Image::OrgChart;
use strict;
my $org_chart = Image::OrgChart->new();
$org_chart->add('/manager/middle-manager/employee1');
$org_chart->add('/manager/middle-manager/employee2');
$org_chart->add('/manager/middle-manager/employee3');
$org_chart->add('/manager/middle-manager/employee4');
my $imagedata = $org_chart->as_image();
if ($org_chart->data_type() eq 'gif') {
## write gif file using $imagedata
} elsif ($org_chart->data_type() eq 'png') {
## write png file using $imagedata
}
## or
my $GDObj = $org_chart->gd();
my $imagedata = $GDObj->png();

Image::OrgChart, uses the perl GD module to create OrgChart style images in gif or png format, depending on which is available from your version of GD. There are several ways to add data to the object, but the most common is the $object-add($path)>. The $path can be seperated by any charachter, but the default is a "". See the new() method for that and other configuration options.

Created a new Image::OrgChart object. Takes a hash-like list of configuration options. See list below.
add() command.Add data to the object using a seperated scalar. The seperator can be set in the new() constructor, but defaults to "".
This allows assignment of a hash-of-hashes as the data element of the object. People who have not persons underneath them should have an empty hash-reference as the value. e.g.
$hash{'root'}{'foo'} = {
'bar' => {},
'more foo' => {},
'kung-foo' => {},
};
this plots all of the data from the object and returns the image data.
returns the data type used by the version of GD in use.
None by default.

Original version; created by h2xs with options
-AXC -v 0.01 -n Image::OrgChart
Development version, unreleased
new() options : arrow_heads,file_boxes,indent,shadow,shadow_color
Matt Sanford <mzsanford@cpan.org>

perl(1),GD