line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chart::OFC::AxisLabel; |
2
|
|
|
|
|
|
|
$Chart::OFC::AxisLabel::VERSION = '0.12'; |
3
|
19
|
|
|
19
|
|
28905
|
use strict; |
|
19
|
|
|
|
|
94
|
|
|
19
|
|
|
|
|
827
|
|
4
|
19
|
|
|
19
|
|
123
|
use warnings; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
654
|
|
5
|
|
|
|
|
|
|
|
6
|
19
|
|
|
19
|
|
2476
|
use Moose; |
|
19
|
|
|
|
|
682262
|
|
|
19
|
|
|
|
|
165
|
|
7
|
19
|
|
|
19
|
|
104351
|
use MooseX::StrictConstructor; |
|
19
|
|
|
|
|
29454
|
|
|
19
|
|
|
|
|
270
|
|
8
|
19
|
|
|
19
|
|
69998
|
use Chart::OFC::Types; |
|
19
|
|
|
|
|
50
|
|
|
19
|
|
|
|
|
3224
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Chart::OFC::Role::OFCDataLines'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has label => |
13
|
|
|
|
|
|
|
( is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'Str', |
15
|
|
|
|
|
|
|
required => 1, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has text_color => |
19
|
|
|
|
|
|
|
( is => 'ro', |
20
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Color', |
21
|
|
|
|
|
|
|
coerce => 1, |
22
|
|
|
|
|
|
|
default => '#000000', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has text_size => |
26
|
|
|
|
|
|
|
( is => 'ro', |
27
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Size', |
28
|
|
|
|
|
|
|
default => 20, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _ofc_data_lines |
32
|
|
|
|
|
|
|
{ |
33
|
26
|
|
|
26
|
|
53
|
my $self = shift; |
34
|
26
|
|
|
|
|
39
|
my $name = shift; |
35
|
|
|
|
|
|
|
|
36
|
26
|
|
|
|
|
939
|
return $self->_data_line( $name . '_legend', $self->label(), $self->text_size(), $self->text_color() ); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
19
|
|
|
19
|
|
122
|
no Moose; |
|
19
|
|
|
|
|
34
|
|
|
19
|
|
|
|
|
127
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# ABSTRACT: A label for an axis |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Chart::OFC::AxisLabel - A label for an axis |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 0.12 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $label = Chart::OFC::AxisLabel->new( |
63
|
|
|
|
|
|
|
label => 'Some Text', |
64
|
|
|
|
|
|
|
text_color => 'blue', |
65
|
|
|
|
|
|
|
text_size => 15, |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This class represents a label for a whole axis, as opposed to the |
71
|
|
|
|
|
|
|
labels for the ticks on that axis. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This class has a number of attributes which may be passed to the |
76
|
|
|
|
|
|
|
C<new()> method. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 label |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The text for the label. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This attribute is required. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 text_color |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The default color of tick labels. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Defaults to "#000000" (black). |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 text_size |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The size of tick labels for the axis, in pixels. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Defaults to 20. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 ROLES |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This class does the C<Chart::OFC::Role::OFCDataLines> role. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHOR |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Dave Rolsky. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This is free software, licensed under: |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |