Chart/Plotly/Trace/Funnel/Marker.pm

filter: Statementstmt 66.6% 34 / 51 Branchbran 10.0% 1 / 10 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 50.6% 41 / 81 CC 9 SCAR 40.6
CC
9
Cov
51%
TO_JSON
90.0
BEGIN
1.0
BEGIN
1.0
CRAP 58.2
« Chart/Plotly/Trace/Scatter/Unselected.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker.pm »
1 package Chart::Plotly::Trace::Funnel::Marker;
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 ▶use Chart::Plotly::Trace::Funnel::Marker::Colorbar;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Chart::Plotly::Trace::Funnel::Marker::Line;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our $VERSION = '0.042'; # VERSION
13  
14 # ABSTRACT: This attribute is one of the possible options for the trace funnel.
15  
16 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=9 SCAR=45.0
Pod documented
17 0 my $self = shift;
18 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
19 0 my $meta = $self->meta;
20 0 my %hash = %$self;
21 0 for my $name ( sort keys %hash ) {
22 0 my $attr = $meta->get_attribute($name);
23 0 ▶ if ( defined $attr ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $attr) 0 0 0
24 0 my $value = $hash{$name};
25 0 my $type = $attr->type_constraint;
26 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
27 0 ▶ $hash{$name} = $value ? \1 : \0;
Branch: 1 branch
BranchTrueFalseTotal
$value ? : 0 0 0
28 }
29 }
30 }
31 0 %hash = ( %hash, %$extra_args );
32 0 delete $hash{'extra_args'};
33 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
34 0 $hash{type} = $self->type();
35 }
36 0 return \%hash;
37 }
38  
39 1 has autocolorscale => (
40 is => "rw",
41 isa => "Bool",
42 documentation =>
43 "Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.colorscale`. Has an effect only if in `marker.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.",
44 );
45  
46 1 has cauto => (
47 is => "rw",
48 isa => "Bool",
49 documentation =>
50 "Determines whether or not the color domain is computed with respect to the input data (here in `marker.color`) or the bounds set in `marker.cmin` and `marker.cmax` Has an effect only if in `marker.color` is set to a numerical array. Defaults to `false` when `marker.cmin` and `marker.cmax` are set by the user.",
51 );
52  
53 1 has cmax => (
54 is => "rw",
55 isa => "Num",
56 documentation =>
57 "Sets the upper bound of the color domain. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmin` must be set as well.",
58 );
59  
60 1 has cmid => (
61 is => "rw",
62 isa => "Num",
63 documentation =>
64 "Sets the mid-point of the color domain by scaling `marker.cmin` and/or `marker.cmax` to be equidistant to this point. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color`. Has no effect when `marker.cauto` is `false`.",
65 );
66  
67 1 has cmin => (
68 is => "rw",
69 isa => "Num",
70 documentation =>
71 "Sets the lower bound of the color domain. Has an effect only if in `marker.color` is set to a numerical array. Value should have the same units as in `marker.color` and if set, `marker.cmax` must be set as well.",
72 );
73  
74 1 has color => (
75 is => "rw",
76 isa => "Str|ArrayRef[Str]",
77 documentation =>
78 "Sets the marker 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.cmin` and `marker.cmax` if set.",
79 );
80  
81 1 has coloraxis => (
82 is => "rw",
83 documentation =>
84 "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.",
85 );
86  
87 1 has colorbar => ( is => "rw",
88 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Funnel::Marker::Colorbar", );
89  
90 1 has colorscale => (
91 is => "rw",
92 documentation =>
93 "Sets the colorscale. Has an effect only if in `marker.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.cmin` and `marker.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.",
94 );
95  
96 1 has colorsrc => ( is => "rw",
97 isa => "Str",
98 documentation => "Sets the source reference on Chart Studio Cloud for `color`.",
99 );
100  
101 1 has line => ( is => "rw",
102 isa => "Maybe[HashRef]|Chart::Plotly::Trace::Funnel::Marker::Line", );
103  
104 1 has opacity => ( is => "rw",
105 isa => "Num|ArrayRef[Num]",
106 documentation => "Sets the opacity of the bars.",
107 );
108  
109 1 has opacitysrc => ( is => "rw",
110 isa => "Str",
111 documentation => "Sets the source reference on Chart Studio Cloud for `opacity`.",
112 );
113  
114 1 has reversescale => (
115 is => "rw",
116 isa => "Bool",
117 documentation =>
118 "Reverses the color mapping if true. Has an effect only if in `marker.color` is set to a numerical array. If true, `marker.cmin` will correspond to the last color in the array and `marker.cmax` will correspond to the first color.",
119 );
120  
121 1 has showscale => (
122 is => "rw",
123 isa => "Bool",
124 documentation =>
125 "Determines whether or not a colorbar is displayed for this trace. Has an effect only if in `marker.color` is set to a numerical array.",
126 );
127  
128 1 __PACKAGE__->meta->make_immutable();
129 1 1;
130  
131 __END__
« Chart/Plotly/Trace/Scatter/Unselected.pm ↑ Summary Chart/Plotly/Trace/Scatter/Marker.pm »