
ishaan
Novice
Jun 22, 2011, 2:38 PM
Post #3 of 4
(4894 views)
|
Re: [miller] Chart in perl : different color codes
[In reply to]
|
Can't Post
|
|
I am using the sample listed at: http://linuxgazette.net/issue83/padala.html use CGI ':standard'; use GD::Graph::bars; use strict; my @itemdata = (["Item1", "Item2", "Item3"], [80,90,100]); my $mygraph = GD::Graph::bars->new(500, 300); $mygraph->set( x_label => 'Item Data', y_label => 'Item Name', title => 'Sample Graph' ) # Set colors for datasets dclrs => ['blue'], my $myimage = $mygraph->plot(\@itemdata) or die $mygraph->error; print "Content-type: image/png\n\n"; print $myimage->png; It sets the color to blue for all the items. What I am looking for is if I can set different color code to the data in the dataset ? For example: 80 Red 90 Red 100 Green Can this be possible even? Is there any other module that can support this?
|