Chart/Plotly/Trace/Funnel/Marker/Line.pm

filter: Statementstmt 59.5% 25 / 42 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 42.8% 30 / 70 CC 9 SCAR 42.2
CC
9
Cov
43%
TO_JSON
90.0
BEGIN
1.0
BEGIN
1.0
CRAP 67.8
« Chart/Plotly/Trace/Scatter/Marker/Colorbar/Tickfont.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker/Line.pm »
1 package Chart::Plotly::Trace::Funnel::Marker::Line;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use MooseX::ExtraArgs;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Moose::Util::TypeConstraints qw(enum union);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined Moose::Util::TypeConstraints::find_type_constraint("PDL")) 0 1 1
6 0 Moose::Util::TypeConstraints::type('PDL');
7 }
8  
9 1 our $VERSION = '0.042'; # VERSION
10  
11 # ABSTRACT: This attribute is one of the possible options for the trace funnel.
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 1 has autocolorscale => (
37 is => "rw",
38 isa => "Bool",
39 documentation =>
40 "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color` is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.",
41 );
42  
43 1 has cauto => (
44 is => "rw",
45 isa => "Bool",
46 documentation =>
47 "Determines whether or not the color domain is computed with respect to the input data (here in `marker.line.color`) or the bounds set in `marker.line.cmin` and `marker.line.cmax` Has an effect only if in `marker.line.color` is set to a numerical array. Defaults to `false` when `marker.line.cmin` and `marker.line.cmax` are set by the user.",
48 );
49  
50 1 has cmax => (
51 is => "rw",
52 isa => "Num",
53 documentation =>
54 "Sets the upper bound of the color domain. Has an effect only if in `marker.line.color` is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well.",
55 );
56  
57 1 has cmid => (
58 is => "rw",
59 isa => "Num",
60 documentation =>
61 "Sets the mid-point of the color domain by scaling `marker.line.cmin` and/or `marker.line.cmax` to be equidistant to this point. Has an effect only if in `marker.line.color` is set to a numerical array. Value should have the same units as in `marker.line.color`. Has no effect when `marker.line.cauto` is `false`.",
62 );
63  
64 1 has cmin => (
65 is => "rw",
66 isa => "Num",
67 documentation =>
68 "Sets the lower bound of the color domain. Has an effect only if in `marker.line.color` is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well.",
69 );
70  
71 1 has color => (
72 is => "rw",
73 isa => "Str|ArrayRef[Str]",
74 documentation =>
75 "Sets the marker.line color. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set.",
76 );
77  
78 1 has coloraxis => (
79 is => "rw",
80 documentation =>
81 "Sets a reference to a shared color axis. References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.",
82 );
83  
84 1 has colorscale => (
85 is => "rw",
86 documentation =>
87 "Sets the colorscale. Has an effect only if in `marker.line.color` is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.line.cmin` and `marker.line.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.",
88 );
89  
90 1 has colorsrc => ( is => "rw",
91 isa => "Str",
92 documentation => "Sets the source reference on Chart Studio Cloud for `color`.",
93 );
94  
95 1 has reversescale => (
96 is => "rw",
97 isa => "Bool",
98 documentation =>
99 "Reverses the color mapping if true. Has an effect only if in `marker.line.color` is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color.",
100 );
101  
102 1 has width => ( is => "rw",
103 isa => "Num|ArrayRef[Num]",
104 documentation => "Sets the width (in px) of the lines bounding the marker points.",
105 );
106  
107 1 has widthsrc => ( is => "rw",
108 isa => "Str",
109 documentation => "Sets the source reference on Chart Studio Cloud for `width`.",
110 );
111  
112 1 __PACKAGE__->meta->make_immutable();
113 1 1;
114  
115 __END__
« Chart/Plotly/Trace/Scatter/Marker/Colorbar/Tickfont.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker/Line.pm »