| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id$ |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Google::Chart::Axis; |
|
4
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
11
|
|
|
5
|
1
|
|
|
1
|
|
7710
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
14
|
|
|
6
|
1
|
|
|
1
|
|
3685
|
use Google::Chart::Axis::Item; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
259
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Google::Chart::QueryComponent'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
coerce 'Google::Chart::Axis' |
|
11
|
|
|
|
|
|
|
=> from 'ArrayRef[HashRef]' |
|
12
|
|
|
|
|
|
|
=> via { |
|
13
|
|
|
|
|
|
|
Google::Chart::Axis->new(axes => $_); |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
subtype 'Google::Chart::Axis::ItemList' |
|
18
|
|
|
|
|
|
|
=> as 'ArrayRef[Google::Chart::Axis::Item]' |
|
19
|
|
|
|
|
|
|
; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
coerce 'Google::Chart::Axis::ItemList' |
|
22
|
|
|
|
|
|
|
=> from 'ArrayRef' |
|
23
|
|
|
|
|
|
|
=> via { |
|
24
|
|
|
|
|
|
|
my @list; |
|
25
|
|
|
|
|
|
|
foreach my $h (@$_) { |
|
26
|
|
|
|
|
|
|
push @list, Google::Chart::Axis::Item->new(%$h); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
return \@list; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has 'axes' => ( |
|
33
|
|
|
|
|
|
|
is => 'rw', |
|
34
|
|
|
|
|
|
|
isa => 'Google::Chart::Axis::ItemList', |
|
35
|
|
|
|
|
|
|
coerce => 1, |
|
36
|
|
|
|
|
|
|
auto_deref => 1, |
|
37
|
|
|
|
|
|
|
); |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
40
|
|
|
|
|
|
|
|
|
41
|
1
|
|
|
1
|
|
9
|
no Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
42
|
1
|
|
|
1
|
|
291
|
no Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub as_query { |
|
45
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my (@chxt, @chxl, @chxp, @chxr, @chxs); |
|
48
|
0
|
|
|
|
|
|
my %data = ( |
|
49
|
|
|
|
|
|
|
chxl => \@chxl, |
|
50
|
|
|
|
|
|
|
chxp => \@chxp, |
|
51
|
|
|
|
|
|
|
chxr => \@chxr, |
|
52
|
|
|
|
|
|
|
chxs => \@chxs |
|
53
|
|
|
|
|
|
|
); |
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
foreach my $axis ($self->axes) { |
|
56
|
0
|
|
|
|
|
|
push @chxt, $axis->location; |
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my $index = $#chxt; |
|
59
|
0
|
0
|
|
|
|
|
if (my @labels = $axis->labels) { |
|
60
|
0
|
|
|
|
|
|
push @chxl, join("|", "$index:", @labels); |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
0
|
0
|
|
|
|
|
if (my @label_positions = $axis->label_positions) { |
|
64
|
0
|
|
|
|
|
|
push @chxp, join(",", $index, @label_positions); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
0
|
0
|
|
|
|
|
if (my @range = $axis->range) { |
|
68
|
0
|
|
|
|
|
|
push @chxr, join(",", $index, @range); |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
0
|
0
|
|
|
|
|
if (my @styles = $axis->styles) { |
|
72
|
0
|
|
|
|
|
|
push @chxs, join(",", $index, map { $_->as_query } @styles); |
|
|
0
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
foreach my $key (keys %data) { |
|
77
|
0
|
|
|
|
|
|
$data{$key} = join('|', @{$data{ $key }}); |
|
|
0
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} |
|
79
|
0
|
|
|
|
|
|
$data{chxt} = join(',', @chxt); |
|
80
|
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
return %data; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 NAME |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Google::Chart::Axis - Google::Chart Axis Specification |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 METHODS |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 as_query |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |