Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Multiple GD::graphs in one web page

by SciDude (Friar)
on Apr 06, 2005 at 20:41 UTC ( #445438=note: print w/ replies, xml ) Need Help??


in reply to Multiple GD::graphs in one web page

For a recent customer service data project, I needed several GD::Graphs and simply duplicated my call to individual code for each graph:

print "<img src=http://www.url.com/cgi/custsvcgr.pl>";
Replicate the above link for each graph needed. Each graph can then be customized by code, for example:
#!/usr/bin/perl -w use GD::Graph::bars; ...get data here... my $mygraph = GD::Graph::bars->new( 600, 350 ); $mygraph->set( dclrs => [qw(green pink blue cyan)] ); $mygraph->set( x_label => 'Section', y_label => 'Satisfaction', title => 'Customer Service By Question', bar_spacing => '5', ) or warn $mygraph->error; my $myimage = $mygraph->plot( \@graph )->png; print "Content-type: image/png\n\n"; print $myimage;

I think you will find other examples similiar to this one with a super search.


SciDude
The first dog barks... all other dogs bark at the first dog.


Comment on Re: Multiple GD::graphs in one web page
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://445438]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-07-28 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls