<%INIT>
use Imager::Graph::Pie;
use Imager::Font;

my $chart = Imager::Graph::Pie->new;
my $font  = Imager::Font->new( file =>'/usr/local/rt3/var/Foundry/Accounting/tahoma.ttf', aa=>1);

my $img = $chart->draw(
    labels   => $Label,
    data     => $Data,
    style    => 'fount_lin',
    back => '00000000',
    channels => 4,
    features => [qw/labels labelspc pieblur outline dropshadow/],
    width    => $Width,
    height   => $Height,
    font     => $font,
   );

my $imgout;
$img->write(type=>"png",data => \$imgout) || die "oops";

$r->content_type('image/png');
$m->print($imgout);
</%INIT>
<%ARGS>
$Width
$Height
$Label
$Data
</%ARGS>
