open(IMG, '>svg-pie.svg') or die $!;
binmode IMG;
my $svggraph = SVGGraph::Pie->new;
print IMG $svggraph->CreateGraph(
{
imageheight => 400, imagewidth => 400,
centertop => 200, centerleft => 200,
radius => 150, title => 'A graph',
titlestyle => 'font-size:24;fill:#000000;',
borderwidth => 4, label => 'true',
labeltop => '10', labelleft => '350',
},
[
{value => 1, label => '1st', color => 'red'},
{value => 2, label => '2nd', color => 'blue'},
{value => 3, label => '3rd', color => 'green'},
{value => 4, label => '4th', color => 'yellow'},
],
);
close IMG;