line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chart::Clicker::Data::Series::Size; |
2
|
|
|
|
|
|
|
$Chart::Clicker::Data::Series::Size::VERSION = '2.90'; |
3
|
4
|
|
|
4
|
|
58815
|
use Moose; |
|
4
|
|
|
|
|
347390
|
|
|
4
|
|
|
|
|
28
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
extends 'Chart::Clicker::Data::Series'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Chart data with additional attributes for Size charts |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
21259
|
use List::Util qw(min max); |
|
4
|
|
|
|
|
57
|
|
|
4
|
|
|
|
|
1019
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'sizes' => ( |
13
|
|
|
|
|
|
|
traits => [ 'Array' ], |
14
|
|
|
|
|
|
|
is => 'rw', |
15
|
|
|
|
|
|
|
isa => 'ArrayRef', |
16
|
|
|
|
|
|
|
default => sub { [] }, |
17
|
|
|
|
|
|
|
handles => { |
18
|
|
|
|
|
|
|
'add_to_sizes' => 'push', |
19
|
|
|
|
|
|
|
'size_count' => 'count', |
20
|
|
|
|
|
|
|
'get_size' => 'get' |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has max_size => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
isa => 'Num', |
28
|
|
|
|
|
|
|
lazy => 1, |
29
|
|
|
|
|
|
|
default => sub { |
30
|
|
|
|
|
|
|
my ($self) = @_; |
31
|
|
|
|
|
|
|
return max(@{ $self->sizes }); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has min_size => ( |
37
|
|
|
|
|
|
|
is => 'ro', |
38
|
|
|
|
|
|
|
isa => 'Num', |
39
|
|
|
|
|
|
|
lazy => 1, |
40
|
|
|
|
|
|
|
default => sub { |
41
|
|
|
|
|
|
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
return min(@{ $self->sizes }); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
47
|
|
|
|
|
|
|
|
48
|
4
|
|
|
4
|
|
26
|
no Moose; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
19
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Chart::Clicker::Data::Series::Size - Chart data with additional attributes for Size charts |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
version 2.90 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SYNOPSIS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
use Chart::Clicker::Data::Series::Size; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my @keys = (); |
69
|
|
|
|
|
|
|
my @values = (); |
70
|
|
|
|
|
|
|
my @sizes = (); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $series = Chart::Clicker::Data::Series::Size->new({ |
73
|
|
|
|
|
|
|
keys => \@keys, |
74
|
|
|
|
|
|
|
values => \@values, |
75
|
|
|
|
|
|
|
sizes => \@sizes |
76
|
|
|
|
|
|
|
}); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DESCRIPTION |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Chart::Clicker::Data::Series::Size is an extension of the Series class |
81
|
|
|
|
|
|
|
that provides storage for a third variable called the size. This is useful |
82
|
|
|
|
|
|
|
for the Bubble renderer. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 sizes |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Set/Get the sizes for this series. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 max_size |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Gets the largest value from this Series' C<sizes>. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 min_size |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Gets the smallest value from this Series' C<sizes>. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 METHODS |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 add_to_sizes |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Adds a size to this series. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 get_size |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Get a size by it's index. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 size_count |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Gets the count of sizes in this series. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 AUTHOR |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Cory G Watson <gphat@cpan.org> |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Cory G Watson. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
121
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |