line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chart::OFC::Dataset::LineWithDots; |
2
|
|
|
|
|
|
|
$Chart::OFC::Dataset::LineWithDots::VERSION = '0.12'; |
3
|
16
|
|
|
16
|
|
98
|
use strict; |
|
16
|
|
|
|
|
33
|
|
|
16
|
|
|
|
|
646
|
|
4
|
16
|
|
|
16
|
|
91
|
use warnings; |
|
16
|
|
|
|
|
36
|
|
|
16
|
|
|
|
|
510
|
|
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
93
|
use Moose; |
|
16
|
|
|
|
|
42
|
|
|
16
|
|
|
|
|
131
|
|
7
|
16
|
|
|
16
|
|
130060
|
use MooseX::StrictConstructor; |
|
16
|
|
|
|
|
45
|
|
|
16
|
|
|
|
|
168
|
|
8
|
16
|
|
|
16
|
|
54667
|
use Chart::OFC::Types; |
|
16
|
|
|
|
|
43
|
|
|
16
|
|
|
|
|
3288
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Chart::OFC::Dataset::Line'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has solid_dots => |
13
|
|
|
|
|
|
|
( is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'Bool', |
15
|
|
|
|
|
|
|
default => 1, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has dot_size => |
19
|
|
|
|
|
|
|
( is => 'ro', |
20
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::PosInt', |
21
|
|
|
|
|
|
|
default => 5, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub type |
25
|
|
|
|
|
|
|
{ |
26
|
6
|
|
|
6
|
0
|
28
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
6
|
100
|
|
|
|
264
|
return $self->solid_dots() ? 'line_dot' : 'line_hollow'; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _parameters_for_type |
32
|
|
|
|
|
|
|
{ |
33
|
6
|
|
|
6
|
|
10
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
6
|
|
|
|
|
239
|
my @p = ( $self->width(), $self->color() ); |
36
|
6
|
100
|
|
|
|
282
|
push @p, ( $self->label(), $self->text_size(), $self->dot_size() ) |
37
|
|
|
|
|
|
|
if $self->_has_label(); |
38
|
|
|
|
|
|
|
|
39
|
6
|
|
|
|
|
45
|
return @p; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
16
|
|
|
16
|
|
113
|
no Moose; |
|
16
|
|
|
|
|
35
|
|
|
16
|
|
|
|
|
101
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# ABSTRACT: A dataset represented as a line with dots for each value |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=pod |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Chart::OFC::Dataset::LineWithDots - A dataset represented as a line with dots for each value |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
version 0.12 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SYNOPSIS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my @numbers = (1, 2, 3); |
66
|
|
|
|
|
|
|
my $line = Chart::OFC::Dataset::Line->new( |
67
|
|
|
|
|
|
|
values => \@numbers, |
68
|
|
|
|
|
|
|
width => 5, |
69
|
|
|
|
|
|
|
color => 'purple', |
70
|
|
|
|
|
|
|
label => 'Daily Sales in $', |
71
|
|
|
|
|
|
|
text_size => 12, |
72
|
|
|
|
|
|
|
solid_dots => 1, |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This class contains values to be charted as a line on a grid chart. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=for Pod::Coverage type |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This class has several attributes which may be passed to the C<new()> |
84
|
|
|
|
|
|
|
method. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
It is a subclass of C<Chart::OFC::Dataset::Line> and accepts all of |
87
|
|
|
|
|
|
|
that class's attributes as well as its own. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 solid_dots |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
If true, the dots are solid, if not they are hollow. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Defaults to true. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 dot_size |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The size of the dots in pixels. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Defaults to 5. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 ROLES |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This class does the C<Chart::OFC::Role::OFCDataLines> role. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Dave Rolsky. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This is free software, licensed under: |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |