| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id$ |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Google::Chart::Marker; |
|
4
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
9
|
|
|
5
|
1
|
|
|
1
|
|
7365
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2351
|
use constant parameter_name => 'chm'; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
164
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Google::Chart::QueryComponent::Simple'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'markerset' => ( |
|
12
|
|
|
|
|
|
|
is => 'rw', |
|
13
|
|
|
|
|
|
|
isa => 'ArrayRef[Google::Chart::Marker::Item]', |
|
14
|
|
|
|
|
|
|
required => 1, |
|
15
|
|
|
|
|
|
|
default => sub { |
|
16
|
|
|
|
|
|
|
[ Google::Chart::Marker::Item->new ] ; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
21
|
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
6
|
no Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
23
|
1
|
|
|
1
|
|
226
|
no Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub BUILDARGS { |
|
26
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
27
|
0
|
|
|
|
|
|
my @markerset; |
|
28
|
|
|
|
|
|
|
my @markerargs; |
|
29
|
0
|
|
|
|
|
|
my %args; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
0
|
0
|
|
|
|
if (@_ == 1 && ref $_[0] eq 'ARRAY') { |
|
32
|
0
|
|
|
|
|
|
@markerargs = @{$_[0]}; |
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} else { |
|
34
|
0
|
|
|
|
|
|
%args = @_; |
|
35
|
0
|
|
|
|
|
|
my $arg = delete $args{markerset}; |
|
36
|
0
|
0
|
|
|
|
|
if (ref $arg eq 'ARRAY') { |
|
|
|
0
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
@markerargs = @{ $arg }; |
|
|
0
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} elsif (ref $arg eq 'HASH') { |
|
39
|
0
|
|
|
|
|
|
@markerargs = ( $arg ); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
@markerargs = ( {} ) unless @markerargs; |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
foreach my $marker ( @markerargs ) { |
|
47
|
0
|
0
|
|
|
|
|
if (! Scalar::Util::blessed $marker) { |
|
48
|
0
|
|
|
|
|
|
$marker = Google::Chart::Marker::Item->new($marker) |
|
49
|
|
|
|
|
|
|
} |
|
50
|
0
|
|
|
|
|
|
push @markerset, $marker; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
return { %args, markerset => \@markerset }; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub parameter_value { |
|
57
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
58
|
0
|
|
|
|
|
|
return join ('|', |
|
59
|
0
|
|
|
|
|
|
map {$_->as_string} @{$self->markerset} |
|
|
0
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
); |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
package # hide from PAUSE |
|
64
|
|
|
|
|
|
|
Google::Chart::Marker::Item; |
|
65
|
1
|
|
|
1
|
|
690
|
use Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
7
|
|
|
66
|
1
|
|
|
1
|
|
7857
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
67
|
1
|
|
|
1
|
|
2044
|
use Google::Chart::Types; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
9
|
|
|
68
|
1
|
|
|
1
|
|
209
|
use Google::Chart::Color; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
277
|
|
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
coerce 'Google::Chart::Marker::Item' |
|
71
|
|
|
|
|
|
|
=> from 'HashRef' |
|
72
|
|
|
|
|
|
|
=> via { |
|
73
|
|
|
|
|
|
|
Google::Chart::Marker::Item->new(%{$_}); |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
; |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
coerce 'Google::Chart::Marker::Item' |
|
78
|
|
|
|
|
|
|
=> from 'ArrayRef' |
|
79
|
|
|
|
|
|
|
=> via { |
|
80
|
|
|
|
|
|
|
Google::Chart::Marker::Item->new(%{$_}); |
|
81
|
|
|
|
|
|
|
} |
|
82
|
|
|
|
|
|
|
; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
enum 'Google::Chart::Marker::Item::Type' => ( |
|
85
|
|
|
|
|
|
|
'a', # arrow |
|
86
|
|
|
|
|
|
|
'c', # corrs |
|
87
|
|
|
|
|
|
|
'd', # diamond |
|
88
|
|
|
|
|
|
|
'o', # circle |
|
89
|
|
|
|
|
|
|
's', # square |
|
90
|
|
|
|
|
|
|
't', # text |
|
91
|
|
|
|
|
|
|
'v', # vertical line from x-axis to the data point |
|
92
|
|
|
|
|
|
|
'V', # vertical line to the top of the chart |
|
93
|
|
|
|
|
|
|
'h', # horizontal line across |
|
94
|
|
|
|
|
|
|
'x', # x shape |
|
95
|
|
|
|
|
|
|
'D', # Line and bar chart line styles |
|
96
|
|
|
|
|
|
|
); |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
has 'marker_type' => ( |
|
99
|
|
|
|
|
|
|
is => 'rw', |
|
100
|
|
|
|
|
|
|
isa => 'Google::Chart::Marker::Item::Type', |
|
101
|
|
|
|
|
|
|
required => 1, |
|
102
|
|
|
|
|
|
|
default => 'o' |
|
103
|
|
|
|
|
|
|
); |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
has 'color' => ( |
|
106
|
|
|
|
|
|
|
is => 'rw', |
|
107
|
|
|
|
|
|
|
isa => 'Google::Chart::Color::Data', |
|
108
|
|
|
|
|
|
|
required => 1, |
|
109
|
|
|
|
|
|
|
# XXX - Hack (for some reason moose didn't like a plain '000000') |
|
110
|
|
|
|
|
|
|
# will investigate later |
|
111
|
|
|
|
|
|
|
default => sub { return '000000' }, |
|
112
|
|
|
|
|
|
|
); |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
has 'dataset' => ( |
|
115
|
|
|
|
|
|
|
is => 'rw', |
|
116
|
|
|
|
|
|
|
isa => 'Int', |
|
117
|
|
|
|
|
|
|
required => 1, |
|
118
|
|
|
|
|
|
|
default => 0, |
|
119
|
|
|
|
|
|
|
); |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
has 'datapoint' => ( |
|
122
|
|
|
|
|
|
|
is => 'rw', |
|
123
|
|
|
|
|
|
|
isa => 'Num', |
|
124
|
|
|
|
|
|
|
required => 1, |
|
125
|
|
|
|
|
|
|
default => -1, |
|
126
|
|
|
|
|
|
|
); |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
has 'size' => ( |
|
129
|
|
|
|
|
|
|
is => 'rw', |
|
130
|
|
|
|
|
|
|
isa => 'Num', |
|
131
|
|
|
|
|
|
|
required => 1, |
|
132
|
|
|
|
|
|
|
default => 5, |
|
133
|
|
|
|
|
|
|
); |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
has 'priority' => ( |
|
136
|
|
|
|
|
|
|
is => 'rw', |
|
137
|
|
|
|
|
|
|
isa => 'Int', |
|
138
|
|
|
|
|
|
|
required => 1, |
|
139
|
|
|
|
|
|
|
default => 0, |
|
140
|
|
|
|
|
|
|
); |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
143
|
|
|
|
|
|
|
|
|
144
|
1
|
|
|
1
|
|
5
|
no Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
8
|
|
|
145
|
1
|
|
|
1
|
|
204
|
no Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
sub as_string { |
|
148
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
149
|
|
|
|
|
|
|
|
|
150
|
0
|
|
|
|
|
|
return join(',', |
|
151
|
0
|
|
|
|
|
|
map { $self->$_ } qw(marker_type color dataset datapoint size priority) ); |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
1; |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
__END__ |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 NAME |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Google::Chart::Marker - Google::Chart Marker |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head1 METHODS |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 parameter_value |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=cut |