my @data = ( ["1st","2nd","3rd","4th","5th","6th"], [ 4, 2, 3, 4, 3, 3.5] ); my @hrefs = ["http://www.perl.org", "http://www.cpan.org", "http://freshmeat.net", "javascript:alert('Example of using JavaScript');","http://www.perl.org","http://www.perl.org"] my $my_graph = new GD::Graph::pie(); $my_graph->set( title => 'A Pie Chart', label => 'Label', axislabelclr => 'black', pie_height => 36, ); open (PNG, ">essai.png"); binmode PNG; #only for Windows like platforms print PNG $my_graph->plot(\@data)->png; close PNG; my $map = new GD::Graph::Map($my_graph,hrefs => \@hrefs); my $HTML_Map_tests = $map->imagemap("essai.png", \@data); my $html; $html = "\n"; $html .= "\n"; $html .= " essai\n"; $html .= " \n"; $html .= "\n"; $html .= "\n"; $html .= "$HTML_Map_tests "; $html .= ""; open (FILE,">essai.html"); print FILE $html; print " ...File essai.html has been generated\n"; close (FILE);