Gossamer Forum
Home : General : Perl Programming :

Image::GD::pie, make the edges look nicer?

Quote Reply
Image::GD::pie, make the edges look nicer?
Hi,

I'm just trying to work out how to make the edges of the attached pie chart nicer :/ They seem really "jagged" to me, anyone else?

Code is (only the needed);


Code:
my @data = (
['#1 Rating','#2 Rating','#3 Rating','#4 Rating','#5 Rating'],
[ $ratings->{1},$ratings->{2},$ratings->{3},$ratings->{4},$ratings->{5}],
);


my $graph = new GD::Graph::pie(250, 250);

$graph->set(
title => 'Review Ratings',
label => '',
axislabelclr => 'black',
'3d' => 1,
start_angle => 30,
suppress_angle => 3,
)
or warn $graph->error;

$graph->set_title_font("$CFG->{admin_root_path}/tahoma.ttf", 15);
$graph->set_value_font("$CFG->{admin_root_path}/tahoma.ttf",10);
$graph->set_label_font("$CFG->{admin_root_path}/tahoma.ttf",14);

$graph->plot(\@data) or die $graph->error;


open(GRAPH,">$CFG->{build_root_path}/pie_images/$linkid.jpg") || die "Cannot open graph5.jpg: $!\n";
print GRAPH $graph->gd->jpeg(100);
close(GRAPH);

Any suggestions are welcome. I can live with the jagged edges, but ideally would like to fix it so it looks nicer =)

CHTIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!