| 1 | package Chart::GGPlot::Position; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | # ABSTRACT: The position role | ||||||||||||||
| 4 | |||||||||||||||
| 5 | 6 | ▶ | use Chart::GGPlot::Role; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 6 | ▶ | use namespace::autoclean; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 6 | our $VERSION = '0.002003'; # VERSION | |||||||||||||
| 9 | |||||||||||||||
| 10 | 6 | ▶ | use PDL::Primitive qw(which); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | 6 | ▶ | use Types::Standard qw(CodeRef); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 12 | 6 | ▶ | use namespace::autoclean; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | |||||||||||||||
| 14 | 6 | with qw(Chart::GGPlot::HasRequiredAes); | |||||||||||||
| 15 | |||||||||||||||
| 16 | 4 | ▶ | method setup_params($data) { return {}; } | ||||||||||||
|
Subroutine
setup_params: called CC=3 SCAR=11.2
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 17 | |||||||||||||||
| 18 | 5 | ▶ | method setup_data ($data, $params) { | ||||||||||||
|
Subroutine
setup_data: called CC=3 SCAR=11.2
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 19 | 5 | $self->check_required_aes($data->names); | |||||||||||||
| 20 | 5 | return $data; | |||||||||||||
| 21 | 6 | } | |||||||||||||
| 22 | |||||||||||||||
| 23 | 2 | ▶ | method compute_layer ($data, $params, $layout) { | ||||||||||||
|
Subroutine
compute_layer: called CC=4 SCAR=14.2
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 24 | 2 | my $panel_data = $data->at('PANEL'); | |||||||||||||
| 25 | 2 | my $splitted = $data->split($panel_data); | |||||||||||||
| 26 | |||||||||||||||
| 27 | 2 | my $new_df = Data::Frame->new(); | |||||||||||||
| 28 | 0 | for my $panel_id (sort { $a <=> $b } keys %$splitted) { | |||||||||||||
| 29 | 2 | ▶ | my $f = fun($df) { | ||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=14.3
Branch: 2 branches
| |||||||||||||||
| 30 | 2 | ▶ | return $df if ($df->isempty); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 31 | 2 | my $scales = $layout->get_scales($panel_id); | |||||||||||||
| 32 | 2 | return $self->compute_panel($df, $params, $scales); | |||||||||||||
| 33 | 2 | }; | |||||||||||||
| 34 | 2 | $new_df = $new_df->append($f->($splitted->{$panel_id})); | |||||||||||||
| 35 | } | ||||||||||||||
| 36 | 2 | return $new_df; | |||||||||||||
| 37 | 6 | } | |||||||||||||
| 38 | |||||||||||||||
| 39 | 0 | ▶ | method compute_panel($data, $params, $scales) { $data } | ||||||||||||
|
Subroutine
compute_panel: not called CC=3 SCAR=22.8
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 40 | |||||||||||||||
| 41 | |||||||||||||||
| 42 | 6 | 1; | |||||||||||||
| 43 | |||||||||||||||
| 44 | __END__ | ||||||||||||||