Chart/Plotly/Trace/Scatter/Error_y.pm

filter: Statementstmt 60.4% 26 / 43 Branchbran 10.0% 1 / 10 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 43.6% 31 / 71 CC 9 SCAR 42.2
CC
9
Cov
44%
TO_JSON
90.0
BEGIN
1.0
BEGIN
1.0
CRAP 67.8
« Chart/Plotly/Trace/Scatter/Marker/Line.pm ↑ Summary Chart/Plotly/Trace/Scatter/Fillpattern.pm »
1 package Chart::Plotly::Trace::Scatter::Error_y;
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
BranchTrueFalseTotal
unless (defined Moose::Util::TypeConstraints::find_type_constraint("PDL")) 0 4 4
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 // {}
l!l
00
MC/DC0%0/1
$self->extra_args // {}
$self->extra_args
Truth table0%0/2
A
A= $self->extra_args
Aresult
11
00
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
BranchTrueFalseTotal
if (defined $attr) 0 0 0
21 0 my $value = $hash{$name};
22 0 my $type = $attr->type_constraint;
23 0 ▶ if ( $type && $type->equals('Bool') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type and $type->equals("Bool")) 0 0 0
Condition0%0/3
$type and $type->equals("Bool")
!ll&&!rl&&r
000
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")
ABresult
0X0
100
111
24 0 ▶ $hash{$name} = $value ? \1 : \0;
Branch: 1 branch
BranchTrueFalseTotal
$value ? : 0 0 0
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
BranchTrueFalseTotal
if ($self->can("type") and not defined $hash{"type"}) 0 0 0
Condition0%0/3
$self->can("type") and not defined $hash{"type"}
!ll&&!rl&&r
000
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"}
ABresult
0X0
100
111
31 0 $hash{type} = $self->type();
32 }
33 0 return \%hash;
34 }
35  
36 4 has array => (
37 is => "rw",
38 isa => "ArrayRef|PDL",
39 documentation =>
40 "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
41 );
42  
43 4 has arrayminus => (
44 is => "rw",
45 isa => "ArrayRef|PDL",
46 documentation =>
47 "Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.",
48 );
49  
50 4 has arrayminussrc => ( is => "rw",
51 isa => "Str",
52 documentation => "Sets the source reference on Chart Studio Cloud for `arrayminus`.",
53 );
54  
55 4 has arraysrc => ( is => "rw",
56 isa => "Str",
57 documentation => "Sets the source reference on Chart Studio Cloud for `array`.",
58 );
59  
60 4 has color => ( is => "rw",
61 isa => "Str",
62 documentation => "Sets the stoke color of the error bars.",
63 );
64  
65 4 has symmetric => (
66 is => "rw",
67 isa => "Bool",
68 documentation =>
69 "Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.",
70 );
71  
72 4 has thickness => ( is => "rw",
73 isa => "Num",
74 documentation => "Sets the thickness (in px) of the error bars.",
75 );
76  
77 4 has traceref => ( is => "rw",
78 isa => "Int", );
79  
80 4 has tracerefminus => ( is => "rw",
81 isa => "Int", );
82  
83 4 has value => (
84 is => "rw",
85 isa => "Num",
86 documentation =>
87 "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars.",
88 );
89  
90 4 has valueminus => (
91 is => "rw",
92 isa => "Num",
93 documentation =>
94 "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars",
95 );
96  
97 4 has visible => ( is => "rw",
98 isa => "Bool",
99 documentation => "Determines whether or not this set of error bars is visible.",
100 );
101  
102 4 has width => ( is => "rw",
103 isa => "Num",
104 documentation => "Sets the width (in px) of the cross-bar at both ends of the error bars.",
105 );
106  
107 4 __PACKAGE__->meta->make_immutable();
108 4 1;
109  
110 __END__
« Chart/Plotly/Trace/Scatter/Marker/Line.pm ↑ Summary Chart/Plotly/Trace/Scatter/Fillpattern.pm »