line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chart::OFC::Axis; |
2
|
|
|
|
|
|
|
$Chart::OFC::Axis::VERSION = '0.12'; |
3
|
18
|
|
|
18
|
|
13460
|
use strict; |
|
18
|
|
|
|
|
41
|
|
|
18
|
|
|
|
|
666
|
|
4
|
18
|
|
|
18
|
|
117
|
use warnings; |
|
18
|
|
|
|
|
37
|
|
|
18
|
|
|
|
|
512
|
|
5
|
|
|
|
|
|
|
|
6
|
18
|
|
|
18
|
|
112
|
use Moose; |
|
18
|
|
|
|
|
38
|
|
|
18
|
|
|
|
|
129
|
|
7
|
18
|
|
|
18
|
|
129047
|
use MooseX::StrictConstructor; |
|
18
|
|
|
|
|
49
|
|
|
18
|
|
|
|
|
178
|
|
8
|
18
|
|
|
18
|
|
61256
|
use Chart::OFC::Types; |
|
18
|
|
|
|
|
55
|
|
|
18
|
|
|
|
|
2885
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'Chart::OFC::Role::OFCDataLines'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has text_size => |
13
|
|
|
|
|
|
|
( is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'Int', |
15
|
|
|
|
|
|
|
default => 10, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has text_color => |
19
|
|
|
|
|
|
|
( is => 'ro', |
20
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Color', |
21
|
|
|
|
|
|
|
coerce => 1, |
22
|
|
|
|
|
|
|
default => '#784016' |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has axis_color => |
26
|
|
|
|
|
|
|
( is => 'ro', |
27
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Color', |
28
|
|
|
|
|
|
|
coerce => 1, |
29
|
|
|
|
|
|
|
predicate => '_has_axis_color', |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has grid_color => |
33
|
|
|
|
|
|
|
( is => 'ro', |
34
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Color', |
35
|
|
|
|
|
|
|
coerce => 1, |
36
|
|
|
|
|
|
|
predicate => '_has_grid_color', |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has axis_label => |
40
|
|
|
|
|
|
|
( is => 'ro', |
41
|
|
|
|
|
|
|
isa => 'Chart::OFC::AxisLabel', |
42
|
|
|
|
|
|
|
coerce => 1, |
43
|
|
|
|
|
|
|
required => 1, |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
|
|
sub _ofc_data_lines { die 'This is a virtual method' } |
47
|
|
|
|
|
|
|
|
48
|
18
|
|
|
18
|
|
109
|
no Moose; |
|
18
|
|
|
|
|
81
|
|
|
18
|
|
|
|
|
155
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# ABSTRACT: Base class for axis classes |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=pod |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Chart::OFC::Axis - Base class for axis classes |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 VERSION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
version 0.12 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This class is the base class for the X and Y axis classes. It provides |
71
|
|
|
|
|
|
|
several attributes which are shared between these two subclasses. |
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 text_size |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The size of tick labels for the axis, in pixels. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Defaults to 10. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 text_color |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The default color of tick labels. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Defaults to "#784016". |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 axis_color |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The color of the axis line itself |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This attribute is optional. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 grid_color |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The color of grid lines for this axis. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This attribute is optional. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 axis_label |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This is the label for the axis as a whole. This can be either a |
105
|
|
|
|
|
|
|
string, a hash reference or an a C<Chart::OFC::AxisLabel> object. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
If given a string or hash reference, the constructor will create a new |
108
|
|
|
|
|
|
|
C<Chart::OFC::AxisLabel> object. If just a string is given, this is |
109
|
|
|
|
|
|
|
used as the label text. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This attribute is required. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 ROLES |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This class does the C<Chart::OFC::Role::OFCDataLines> role. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 AUTHOR |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Dave Rolsky. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This is free software, licensed under: |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |