line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chart::OFC::Dataset::OutlinedBar; |
2
|
|
|
|
|
|
|
$Chart::OFC::Dataset::OutlinedBar::VERSION = '0.12'; |
3
|
16
|
|
|
16
|
|
104
|
use strict; |
|
16
|
|
|
|
|
36
|
|
|
16
|
|
|
|
|
688
|
|
4
|
16
|
|
|
16
|
|
98
|
use warnings; |
|
16
|
|
|
|
|
35
|
|
|
16
|
|
|
|
|
538
|
|
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
95
|
use Moose; |
|
16
|
|
|
|
|
50
|
|
|
16
|
|
|
|
|
170
|
|
7
|
16
|
|
|
16
|
|
133355
|
use MooseX::StrictConstructor; |
|
16
|
|
|
|
|
44
|
|
|
16
|
|
|
|
|
160
|
|
8
|
16
|
|
|
16
|
|
52363
|
use Chart::OFC::Types; |
|
16
|
|
|
|
|
39
|
|
|
16
|
|
|
|
|
2671
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Chart::OFC::Dataset::Bar'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has outline_color => |
13
|
|
|
|
|
|
|
( is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Color', |
15
|
|
|
|
|
|
|
coerce => 1, |
16
|
|
|
|
|
|
|
default => '#000000', |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub type |
20
|
|
|
|
|
|
|
{ |
21
|
5
|
|
|
5
|
0
|
15
|
return 'filled_bar'; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _parameters_for_type |
25
|
|
|
|
|
|
|
{ |
26
|
9
|
|
|
9
|
|
16
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
9
|
|
|
|
|
416
|
my @p = ( $self->opacity(), $self->fill_color(), $self->outline_color() ); |
29
|
9
|
100
|
|
|
|
391
|
push @p, ( $self->label(), $self->text_size() ) |
30
|
|
|
|
|
|
|
if $self->_has_label(); |
31
|
|
|
|
|
|
|
|
32
|
9
|
|
|
|
|
89
|
return @p; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
16
|
|
|
16
|
|
116
|
no Moose; |
|
16
|
|
|
|
|
35
|
|
|
16
|
|
|
|
|
96
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=for Pod::Coverage type |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
my @numbers = (1, 2, 3); |
49
|
|
|
|
|
|
|
my $bars = Chart::OFC::Dataset::OutlinedBar->new( |
50
|
|
|
|
|
|
|
values => \@numbers, |
51
|
|
|
|
|
|
|
opacity => 60, |
52
|
|
|
|
|
|
|
fill_color => 'purple', |
53
|
|
|
|
|
|
|
label => 'Daily Sales in $', |
54
|
|
|
|
|
|
|
text_size => 12, |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This class contains values to be charted as bars on a grid chart. The |
60
|
|
|
|
|
|
|
bars are filled with the specified color and have a separate outline |
61
|
|
|
|
|
|
|
color. They are styled to give a "glass" look. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This class is a subclass of C<Chart::OFC::Dataset::Bar> and accepts |
66
|
|
|
|
|
|
|
all of that class's attributes. It has one attribute of its own. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 outline_color |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This is the color used to outline the bar. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Defaults to #000000 (black). |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 ROLES |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This class does the C<Chart::OFC::Role::OFCDataLines> role. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |