| 1 | package Chart::GGPlot::Scale::SupportsSecondaryAxis; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | # ABSTRACT: Role for scales that support secondary axis | ||||||||||||||
| 4 | |||||||||||||||
| 5 | 4 | ▶ | use Chart::GGPlot::Role; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 4 | ▶ | use namespace::autoclean; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 4 | our $VERSION = '0.002003'; # VERSION | |||||||||||||
| 9 | |||||||||||||||
| 10 | 4 | ▶ | use Types::Standard qw(InstanceOf Maybe); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | |||||||||||||||
| 12 | 4 | has secondary_axis => ( | |||||||||||||
| 13 | is => 'ro', | ||||||||||||||
| 14 | isa => Maybe [ InstanceOf ['Chart::GGPlot::AxisSecondary'] ], | ||||||||||||||
| 15 | ); | ||||||||||||||
| 16 | |||||||||||||||
| 17 | 0 | ▶ | method sec_name () { | ||||||||||||
|
Subroutine
sec_name: not called CC=3 SCAR=24.8
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 18 | 0 | return $self->secondary_axis->$_call_if_can('name'); | |||||||||||||
| 19 | 4 | } | |||||||||||||
| 20 | |||||||||||||||
| 21 | 0 | ▶ | method make_sec_title ($title) { | ||||||||||||
|
Subroutine
make_sec_title: not called CC=4 SCAR=30.0
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 22 | 0 | ▶ | if ( defined $self->secondary_axis ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 23 | 0 | return $self->secondary_axis->make_title($title); | |||||||||||||
| 24 | } else { | ||||||||||||||
| 25 | 0 | return $self->SUPER::make_sec_title($title); | |||||||||||||
| 26 | } | ||||||||||||||
| 27 | 4 | } | |||||||||||||
| 28 | |||||||||||||||
| 29 | 4 | 1; | |||||||||||||
| 30 | |||||||||||||||
| 31 | __END__ | ||||||||||||||