| 1 | package Chart::Plotly::Trace::Scatter::Fillpattern; | ||||||||||||||||||||||||||||
| 2 | 4 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 4 | ▶ | use MooseX::ExtraArgs; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 4 | ▶ | use Moose::Util::TypeConstraints qw(enum union); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 4 | ▶ | if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 6 | 0 | Moose::Util::TypeConstraints::type('PDL'); | |||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 4 | our $VERSION = '0.042'; # VERSION | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | # ABSTRACT: This attribute is one of the possible options for the trace scatter. | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub TO_JSON { | ||||||||||||||||||||||||||
|
Subroutine
TO_JSON: not called CC=9 SCAR=45.0
Pod
documented
| |||||||||||||||||||||||||||||
| 14 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 15 | 0 | ▶ | my $extra_args = $self->extra_args // {}; | ||||||||||||||||||||||||||
|
Condition0%0/2
$self->extra_args // {}
MC/DC0%0/1
$self->extra_args // {}
$self->extra_args
Truth table0%0/2
A
A= $self->extra_args
| |||||||||||||||||||||||||||||
| 16 | 0 | my $meta = $self->meta; | |||||||||||||||||||||||||||
| 17 | 0 | my %hash = %$self; | |||||||||||||||||||||||||||
| 18 | 0 | for my $name ( sort keys %hash ) { | |||||||||||||||||||||||||||
| 19 | 0 | my $attr = $meta->get_attribute($name); | |||||||||||||||||||||||||||
| 20 | 0 | ▶ | if ( defined $attr ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | 0 | my $value = $hash{$name}; | |||||||||||||||||||||||||||
| 22 | 0 | my $type = $attr->type_constraint; | |||||||||||||||||||||||||||
| 23 | 0 | ▶ | if ( $type && $type->equals('Bool') ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$type and $type->equals("Bool")
MC/DC0%0/2
$type and $type->equals("Bool")
$type
$type->equals("Bool")
Truth table0%0/3
A and B
A= $typeB= $type->equals("Bool")
| |||||||||||||||||||||||||||||
| 24 | 0 | ▶ | $hash{$name} = $value ? \1 : \0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | 0 | %hash = ( %hash, %$extra_args ); | |||||||||||||||||||||||||||
| 29 | 0 | delete $hash{'extra_args'}; | |||||||||||||||||||||||||||
| 30 | 0 | ▶ | if ( $self->can('type') && ( !defined $hash{'type'} ) ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->can("type") and not defined $hash{"type"}
MC/DC0%0/2
$self->can("type") and not defined $hash{"type"}
$self->can("type")
not defined $hash{"type"}
Truth table0%0/3
A and not(B)
A= $self->can("type")B= not defined $hash{"type"}
| |||||||||||||||||||||||||||||
| 31 | 0 | $hash{type} = $self->type(); | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | 0 | return \%hash; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 4 | has bgcolor => ( | |||||||||||||||||||||||||||
| 37 | is => "rw", | ||||||||||||||||||||||||||||
| 38 | isa => "Str|ArrayRef[Str]", | ||||||||||||||||||||||||||||
| 39 | documentation => | ||||||||||||||||||||||||||||
| 40 | "When there is no colorscale sets the color of background pattern fill. Defaults to a `marker.color` background when `fillmode` is *overlay*. Otherwise, defaults to a transparent background.", | ||||||||||||||||||||||||||||
| 41 | ); | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 4 | has bgcolorsrc => ( is => "rw", | |||||||||||||||||||||||||||
| 44 | isa => "Str", | ||||||||||||||||||||||||||||
| 45 | documentation => "Sets the source reference on Chart Studio Cloud for `bgcolor`.", | ||||||||||||||||||||||||||||
| 46 | ); | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 4 | has description => ( is => "ro", | |||||||||||||||||||||||||||
| 49 | default => "Sets the pattern within the marker.", ); | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | 4 | has fgcolor => ( | |||||||||||||||||||||||||||
| 52 | is => "rw", | ||||||||||||||||||||||||||||
| 53 | isa => "Str|ArrayRef[Str]", | ||||||||||||||||||||||||||||
| 54 | documentation => | ||||||||||||||||||||||||||||
| 55 | "When there is no colorscale sets the color of foreground pattern fill. Defaults to a `marker.color` background when `fillmode` is *replace*. Otherwise, defaults to dark grey or white to increase contrast with the `bgcolor`.", | ||||||||||||||||||||||||||||
| 56 | ); | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 4 | has fgcolorsrc => ( is => "rw", | |||||||||||||||||||||||||||
| 59 | isa => "Str", | ||||||||||||||||||||||||||||
| 60 | documentation => "Sets the source reference on Chart Studio Cloud for `fgcolor`.", | ||||||||||||||||||||||||||||
| 61 | ); | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | 4 | has fgopacity => ( | |||||||||||||||||||||||||||
| 64 | is => "rw", | ||||||||||||||||||||||||||||
| 65 | isa => "Num", | ||||||||||||||||||||||||||||
| 66 | documentation => | ||||||||||||||||||||||||||||
| 67 | "Sets the opacity of the foreground pattern fill. Defaults to a 0.5 when `fillmode` is *overlay*. Otherwise, defaults to 1.", | ||||||||||||||||||||||||||||
| 68 | ); | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | 4 | has fillmode => ( | |||||||||||||||||||||||||||
| 71 | is => "rw", | ||||||||||||||||||||||||||||
| 72 | isa => enum( [ "replace", "overlay" ] ), | ||||||||||||||||||||||||||||
| 73 | documentation => "Determines whether `marker.color` should be used as a default to `bgcolor` or a `fgcolor`.", | ||||||||||||||||||||||||||||
| 74 | ); | ||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||
| 76 | 4 | has shape => ( | |||||||||||||||||||||||||||
| 77 | is => "rw", | ||||||||||||||||||||||||||||
| 78 | isa => union( [ enum( [ "", "/", "\\", "x", "-", "|", "+", "." ] ), "ArrayRef" ] ), | ||||||||||||||||||||||||||||
| 79 | documentation => "Sets the shape of the pattern fill. By default, no pattern is used for filling the area.", | ||||||||||||||||||||||||||||
| 80 | ); | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 4 | has shapesrc => ( is => "rw", | |||||||||||||||||||||||||||
| 83 | isa => "Str", | ||||||||||||||||||||||||||||
| 84 | documentation => "Sets the source reference on Chart Studio Cloud for `shape`.", | ||||||||||||||||||||||||||||
| 85 | ); | ||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | 4 | has size => ( | |||||||||||||||||||||||||||
| 88 | is => "rw", | ||||||||||||||||||||||||||||
| 89 | isa => "Num|ArrayRef[Num]", | ||||||||||||||||||||||||||||
| 90 | documentation => | ||||||||||||||||||||||||||||
| 91 | "Sets the size of unit squares of the pattern fill in pixels, which corresponds to the interval of repetition of the pattern.", | ||||||||||||||||||||||||||||
| 92 | ); | ||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 4 | has sizesrc => ( is => "rw", | |||||||||||||||||||||||||||
| 95 | isa => "Str", | ||||||||||||||||||||||||||||
| 96 | documentation => "Sets the source reference on Chart Studio Cloud for `size`.", | ||||||||||||||||||||||||||||
| 97 | ); | ||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | 4 | has solidity => ( | |||||||||||||||||||||||||||
| 100 | is => "rw", | ||||||||||||||||||||||||||||
| 101 | isa => "Num|ArrayRef[Num]", | ||||||||||||||||||||||||||||
| 102 | documentation => | ||||||||||||||||||||||||||||
| 103 | "Sets the solidity of the pattern fill. Solidity is roughly the fraction of the area filled by the pattern. Solidity of 0 shows only the background color without pattern and solidty of 1 shows only the foreground color without pattern.", | ||||||||||||||||||||||||||||
| 104 | ); | ||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||
| 106 | 4 | has soliditysrc => ( is => "rw", | |||||||||||||||||||||||||||
| 107 | isa => "Str", | ||||||||||||||||||||||||||||
| 108 | documentation => "Sets the source reference on Chart Studio Cloud for `solidity`.", | ||||||||||||||||||||||||||||
| 109 | ); | ||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | 4 | __PACKAGE__->meta->make_immutable(); | |||||||||||||||||||||||||||
| 112 | 4 | 1; | |||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | __END__ | ||||||||||||||||||||||||||||