File: synopsis_line.pl

package info (click to toggle)
libsvg-tt-graph-perl 1.04-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 488 kB
  • sloc: perl: 5,717; makefile: 7
file content (26 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use lib qw(lib);
use SVG::TT::Graph::Line;

my @fields = qw(Jan Feb Mar);
my @data_sales_02 = qw(12 45 21);
my @data_sales_03 = qw(15 30 40);
  
my $graph = SVG::TT::Graph::Line->new({
      'height'   => '500',
      'width'    => '300',
      'fields'   => \@fields,
      'compress' => 0,
});
  
$graph->add_data({
      'data' => \@data_sales_02,
      'title' => 'Sales 2002',
});

$graph->add_data({
      'data' => \@data_sales_03,
      'title' => 'Sales 2003',
});
  
#print "Content-type: image/svg+xml\r\n\r\n";
print $graph->burn();