Clicker/Decoration/Plot.pm

filter: Statementstmt 77.1% 27 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 79.5% 35 / 44 CC 3 SCAR 13.9
CC
3
Cov
77%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.0
« Clicker/Axis/DivisionType/LinearRounded.pm ↑ Summary Clicker/Data/Series.pm »
1 package Chart::Clicker::Decoration::Plot;
2 8 $Chart::Clicker::Decoration::Plot::VERSION = '2.89';
3 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: Area on which renderers draw
6  
7 8 ▶use Layout::Manager::Axis;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 8 ▶use Layout::Manager::Single;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 8 ▶use Chart::Clicker::Decoration::Grid;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 extends 'Chart::Clicker::Container';
13  
14  
15 8 has 'clicker' => (
16 is => 'rw',
17 isa => 'Chart::Clicker',
18 );
19  
20  
21 has 'grid' => (
22 is => 'rw',
23 isa => 'Chart::Clicker::Decoration::Grid',
24 default => sub {
25 7 ▶ Chart::Clicker::Decoration::Grid->new( name => 'grid' )
Subroutine __ANON__: called CC=1 SCAR=0.0
26 }
27 8 );
28  
29  
30 has '+layout_manager' => (
31 7 ▶ default => sub { Layout::Manager::Axis->new }
Subroutine __ANON__: called CC=1 SCAR=0.0
32 8 );
33  
34  
35 has 'render_area' => (
36 is => 'rw',
37 isa => 'Chart::Clicker::Container',
38 default => sub {
39 7 ▶ Chart::Clicker::Container->new(
Subroutine __ANON__: called CC=1 SCAR=0.0
40 name => 'render_area',
41 layout_manager => Layout::Manager::Single->new
42 )
43 }
44 8 );
45  
46 override('prepare', sub {
47 0 ▶ my ($self) = @_;
Subroutine __ANON__: not called CC=3 SCAR=24.8
48  
49 # TODO This is also happening in Clicker.pm
50 0 foreach my $c (@{ $self->components }) {
51 0 $c->clicker($self->clicker);
52 }
53  
54 # TODO This is kinda messy...
55 0 foreach my $c (@{ $self->render_area->components }) {
56 0 $c->clicker($self->clicker);
57 }
58  
59 0 super;
60 8 });
61  
62 8 __PACKAGE__->meta->make_immutable;
63  
64 8 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
65  
66 8 1;
67  
68 __END__
69  
70 =pod
71  
72 =head1 NAME
73  
74 Chart::Clicker::Decoration::Plot - Area on which renderers draw
75  
76 =head1 VERSION
77  
78 version 2.89
79  
80 =head1 DESCRIPTION
81  
82 A Component that handles the rendering of data via Renderers. Also
83 handles rendering the markers that come from the Clicker object.
84  
85 =head1 ATTRIBUTES
86  
87 =head2 background_color
88  
89 Set/Get this Plot's background color.
90  
91 =head2 border
92  
93 Set/Get this Plot's border.
94  
95 =head2 grid
96  
97 Set/Get the Grid component used on this plot.
98  
99 =head2 layout_manager
100  
101 Set/Get the layout manager for this plot. Defaults to
102 L<Layout::Manager::Axis>.
103  
104 =head2 render_area
105  
106 Set/Get the container used to render within.
107  
108 =head1 AUTHOR
109  
110 Cory G Watson <gphat@cpan.org>
111  
112 =head1 COPYRIGHT AND LICENSE
113  
114 This software is copyright (c) 2016 by Cory G Watson.
115  
116 This is free software; you can redistribute it and/or modify it under
117 the same terms as the Perl 5 programming language system itself.
118  
119 =cut
« Clicker/Axis/DivisionType/LinearRounded.pm ↑ Summary Clicker/Data/Series.pm »