File: bars_6.t

package info (click to toggle)
libchart-perl 2.4.10ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,900 kB
  • ctags: 245
  • sloc: perl: 11,697; makefile: 6
file content (48 lines) | stat: -rw-r--r-- 1,146 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/perl -w

use Chart::Bars;
use strict;

print "1..1\n";

my $g = Chart::Bars->new( 580, 300 );

my @data  = ( 200202, 200203, 200204, 200205, 200206, 200207, 200208, 200209, 200210, 200211, 200212, 200301 );
my @data1 = ( 6626,   7662,   7580,   7671,   8064,   8664,   6343,   5518,   6257,   5391,   5401,   6002 );

$g->add_dataset(@data);
$g->add_dataset(@data1);

my @legend_keys = ( "Actual ", "Goal" );

$g->set(
    colors          => { dataset0 => [ 25, 220, 147 ], },
    graph_border    => 0,
    grey_background => 'false',
    grid_lines      => 'true',

    #   integer_ticks_only => 'true',
    legend => 'none',

    #   min_val            => 0,
    #   include_zero       =>  'true',
    png_border     => 4,
    precision      => 1,
    skip_int_ticks => 1000,
    spaced_bars    => 'true',
    text_space     => 3,
    title          => "Tickets",
    title_font     => GD::Font->Giant,
    transparent    => 'false',
    x_ticks        => 'vertical',
    y_axes         => 'both',
    y_label        => '# Tickets',

    #    max_val            => 9000,
);

$g->png("samples/bars_6.png");
print "ok 1\n";

exit(0);