File: synopsis_bar_line.pl

package info (click to toggle)
libsvg-tt-graph-perl 0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 444 kB
  • ctags: 154
  • sloc: perl: 5,777; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 567 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
27
28
29
30
use lib qw(lib);
use SVG::TT::Graph::BarLine;

my @fields = qw(Jan Feb Mar);
my @data_sales_02 = qw(12 45 21);
my @data_sales_03 = (24, 55, 61);

my $graph = SVG::TT::Graph::BarLine->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\n\n";
print $graph->burn();

#my $tt = $graph->get_template();
#print "$tt\n";