Clicker/Renderer/Bubble.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 72.2% 13 / 18 CC 1 SCAR 2.9
CC
1
Cov
73%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Clicker/Positioned.pm ↑ Summary Clicker/Renderer.pm »
1 package Chart::Clicker::Renderer::Bubble;
2 1 $Chart::Clicker::Renderer::Bubble::VERSION = '2.89';
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: Bubble render
6  
7 1 extends 'Chart::Clicker::Renderer::Point';
8  
9  
10 override('draw_point', sub {
11 0 ▶ my ($self, $x, $y, $series, $count) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
12  
13 0 my $shape = $self->shape->scale($series->get_size($count));
14 0 $shape->origin(Geometry::Primitive::Point->new(x => $x, y => $y));
15 0 $self->path->add_primitive($shape);
16 1 });
17  
18 1 __PACKAGE__->meta->make_immutable;
19  
20 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 1 1;
23  
24 __END__
25  
26 =pod
27  
28 =head1 NAME
29  
30 Chart::Clicker::Renderer::Bubble - Bubble render
31  
32 =head1 VERSION
33  
34 version 2.89
35  
36 =head1 SYNOPSIS
37  
38 my $pr = Chart::Clicker::Renderer::Bubble->new({
39 shape => Geometry::Primitive::Circle->new({
40 radius => 3
41 })
42 });
43  
44 =head1 DESCRIPTION
45  
46 Chart::Clicker::Renderer::Bubble is a subclass of the Point renderer where
47 the points' radiuses are determined by the size value of a Series::Size.
48  
49 Note: B<This renderer requires you to use a
50 Chart::Clicker::Data::Series::Size>.
51  
52 =for HTML <p><img src="http://gphat.github.com/chart-clicker/static/images/examples/bubble.png" width="500" height="250" alt="Bubble Chart" /></p>
53  
54 =head1 METHODS
55  
56 =head2 draw_point
57  
58 Called for each point. Implemented as a separate method so that subclasses
59 such as Bubble may override the drawing.
60  
61 =head1 AUTHOR
62  
63 Cory G Watson <gphat@cpan.org>
64  
65 =head1 COPYRIGHT AND LICENSE
66  
67 This software is copyright (c) 2016 by Cory G Watson.
68  
69 This is free software; you can redistribute it and/or modify it under
70 the same terms as the Perl 5 programming language system itself.
71  
72 =cut
« Clicker/Positioned.pm ↑ Summary Clicker/Renderer.pm »