| 1 | package Chart::OFC::Dataset::Bar; | ||||||||||
| 2 | 25 | $Chart::OFC::Dataset::Bar::VERSION = '0.12'; | |||||||||
| 3 | 25 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 25 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 25 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 25 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 25 | ▶ | use Chart::OFC::Types; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 25 | extends 'Chart::OFC::Dataset'; | |||||||||
| 11 | |||||||||||
| 12 | 25 | has opacity => | |||||||||
| 13 | ( is => 'ro', | ||||||||||
| 14 | isa => 'Chart::OFC::Type::Opacity', | ||||||||||
| 15 | default => '80', | ||||||||||
| 16 | ); | ||||||||||
| 17 | |||||||||||
| 18 | 25 | has fill_color => | |||||||||
| 19 | ( is => 'ro', | ||||||||||
| 20 | isa => 'Chart::OFC::Type::Color', | ||||||||||
| 21 | coerce => 1, | ||||||||||
| 22 | default => '#999999', | ||||||||||
| 23 | ); | ||||||||||
| 24 | |||||||||||
| 25 | 25 | has label => | |||||||||
| 26 | ( is => 'ro', | ||||||||||
| 27 | isa => 'Str', | ||||||||||
| 28 | predicate => '_has_label', | ||||||||||
| 29 | ); | ||||||||||
| 30 | |||||||||||
| 31 | 25 | has text_size => | |||||||||
| 32 | ( is => 'ro', | ||||||||||
| 33 | isa => 'Chart::OFC::Type::Size', | ||||||||||
| 34 | default => 10, | ||||||||||
| 35 | ); | ||||||||||
| 36 | |||||||||||
| 37 | sub type | ||||||||||
| 38 | 9 | ▶ | { | ||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 39 | 9 | return 'bar'; | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | sub _parameters_for_type | ||||||||||
| 43 | 13 | ▶ | { | ||||||||
|
Subroutine
_parameters_for_type: called CC=2 SCAR=6.9
| |||||||||||
| 44 | 13 | my $self = shift; | |||||||||
| 45 | |||||||||||
| 46 | 13 | my @p = ( $self->opacity(), $self->fill_color() ); | |||||||||
| 47 | 13 | ▶ | push @p, ( $self->label(), $self->text_size() ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | if $self->_has_label(); | ||||||||||
| 49 | |||||||||||
| 50 | 13 | return @p; | |||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | 25 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 54 | |||||||||||
| 55 | 25 | __PACKAGE__->meta()->make_immutable(); | |||||||||
| 56 | |||||||||||
| 57 | 25 | 1; | |||||||||
| 58 | |||||||||||
| 59 | |||||||||||
| 60 | # ABSTRACT: A dataset represented as bars | ||||||||||
| 61 | |||||||||||
| 62 | __END__ | ||||||||||