use SVG::TT::Graph::BarHorizontal; use CGI::Carp qw/fatalsToBrowser/; my @fields = qw(Jan Feb Mar); my @data_sales_02 = qw(12 45 21); my $graph = SVG::TT::Graph::BarHorizontal->new({ 'height' => '500', 'width' => '300', 'fields' => \@fields, }); $graph->add_data({ 'data' => \@data_sales_02, 'title' => 'Sales 2002', }); open my $G, '>', 'graph.svg'; print $G $graph->burn(); close $G; print "Content-type: image/svg+xml\n\n"; print $graph->burn();