| 1 | package Chart::Plotly::Trace::Scatter::Marker; | ||||||||||||||||||||||||||||
| 2 | 5 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 5 | ▶ | use MooseX::ExtraArgs; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 5 | ▶ | use Moose::Util::TypeConstraints qw(enum union); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 5 | ▶ | if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 6 | 0 | Moose::Util::TypeConstraints::type('PDL'); | |||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 5 | ▶ | use Chart::Plotly::Trace::Scatter::Marker::Colorbar; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 5 | ▶ | use Chart::Plotly::Trace::Scatter::Marker::Gradient; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 5 | ▶ | use Chart::Plotly::Trace::Scatter::Marker::Line; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 5 | our $VERSION = '0.042'; # VERSION | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | # ABSTRACT: This attribute is one of the possible options for the trace scatter. | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | sub TO_JSON { | ||||||||||||||||||||||||||
|
Subroutine
TO_JSON: not called CC=9 SCAR=45.0
Pod
documented
| |||||||||||||||||||||||||||||
| 18 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 19 | 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
| |||||||||||||||||||||||||||||
| 20 | 0 | my $meta = $self->meta; | |||||||||||||||||||||||||||
| 21 | 0 | my %hash = %$self; | |||||||||||||||||||||||||||
| 22 | 0 | for my $name ( sort keys %hash ) { | |||||||||||||||||||||||||||
| 23 | 0 | my $attr = $meta->get_attribute($name); | |||||||||||||||||||||||||||
| 24 | 0 | ▶ | if ( defined $attr ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | 0 | my $value = $hash{$name}; | |||||||||||||||||||||||||||
| 26 | 0 | my $type = $attr->type_constraint; | |||||||||||||||||||||||||||
| 27 | 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")
| |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | $hash{$name} = $value ? \1 : \0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | 0 | %hash = ( %hash, %$extra_args ); | |||||||||||||||||||||||||||
| 33 | 0 | delete $hash{'extra_args'}; | |||||||||||||||||||||||||||
| 34 | 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"}
| |||||||||||||||||||||||||||||
| 35 | 0 | $hash{type} = $self->type(); | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | 0 | return \%hash; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 5 | has autocolorscale => ( | |||||||||||||||||||||||||||
| 41 | is => "rw", | ||||||||||||||||||||||||||||
| 42 | isa => "Bool", | ||||||||||||||||||||||||||||
| 43 | documentation => | ||||||||||||||||||||||||||||
| 44 | "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.", | ||||||||||||||||||||||||||||
| 45 | ); | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 5 | has cauto => ( | |||||||||||||||||||||||||||
| 48 | is => "rw", | ||||||||||||||||||||||||||||
| 49 | isa => "Bool", | ||||||||||||||||||||||||||||
| 50 | documentation => | ||||||||||||||||||||||||||||
| 51 | "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.", | ||||||||||||||||||||||||||||
| 52 | ); | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 5 | has cmax => ( | |||||||||||||||||||||||||||
| 55 | is => "rw", | ||||||||||||||||||||||||||||
| 56 | isa => "Num", | ||||||||||||||||||||||||||||
| 57 | documentation => | ||||||||||||||||||||||||||||
| 58 | "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.", | ||||||||||||||||||||||||||||
| 59 | ); | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | 5 | has cmid => ( | |||||||||||||||||||||||||||
| 62 | is => "rw", | ||||||||||||||||||||||||||||
| 63 | isa => "Num", | ||||||||||||||||||||||||||||
| 64 | documentation => | ||||||||||||||||||||||||||||
| 65 | "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`.", | ||||||||||||||||||||||||||||
| 66 | ); | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 5 | has cmin => ( | |||||||||||||||||||||||||||
| 69 | is => "rw", | ||||||||||||||||||||||||||||
| 70 | isa => "Num", | ||||||||||||||||||||||||||||
| 71 | documentation => | ||||||||||||||||||||||||||||
| 72 | "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.", | ||||||||||||||||||||||||||||
| 73 | ); | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | 5 | has color => ( | |||||||||||||||||||||||||||
| 76 | is => "rw", | ||||||||||||||||||||||||||||
| 77 | isa => "Str|ArrayRef[Str]", | ||||||||||||||||||||||||||||
| 78 | documentation => | ||||||||||||||||||||||||||||
| 79 | "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.", | ||||||||||||||||||||||||||||
| 80 | ); | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 5 | has coloraxis => ( | |||||||||||||||||||||||||||
| 83 | is => "rw", | ||||||||||||||||||||||||||||
| 84 | documentation => | ||||||||||||||||||||||||||||
| 85 | "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.", | ||||||||||||||||||||||||||||
| 86 | ); | ||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | 5 | has colorbar => ( is => "rw", | |||||||||||||||||||||||||||
| 89 | isa => "Maybe[HashRef]|Chart::Plotly::Trace::Scatter::Marker::Colorbar", ); | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 5 | has colorscale => ( | |||||||||||||||||||||||||||
| 92 | is => "rw", | ||||||||||||||||||||||||||||
| 93 | documentation => | ||||||||||||||||||||||||||||
| 94 | "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.", | ||||||||||||||||||||||||||||
| 95 | ); | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 5 | has colorsrc => ( is => "rw", | |||||||||||||||||||||||||||
| 98 | isa => "Str", | ||||||||||||||||||||||||||||
| 99 | documentation => "Sets the source reference on Chart Studio Cloud for `color`.", | ||||||||||||||||||||||||||||
| 100 | ); | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 5 | has gradient => ( is => "rw", | |||||||||||||||||||||||||||
| 103 | isa => "Maybe[HashRef]|Chart::Plotly::Trace::Scatter::Marker::Gradient", ); | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | 5 | has line => ( is => "rw", | |||||||||||||||||||||||||||
| 106 | isa => "Maybe[HashRef]|Chart::Plotly::Trace::Scatter::Marker::Line", ); | ||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | 5 | has maxdisplayed => ( | |||||||||||||||||||||||||||
| 109 | is => "rw", | ||||||||||||||||||||||||||||
| 110 | isa => "Num", | ||||||||||||||||||||||||||||
| 111 | documentation => "Sets a maximum number of points to be drawn on the graph. *0* corresponds to no limit.", | ||||||||||||||||||||||||||||
| 112 | ); | ||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | 5 | has opacity => ( is => "rw", | |||||||||||||||||||||||||||
| 115 | isa => "Num|ArrayRef[Num]", | ||||||||||||||||||||||||||||
| 116 | documentation => "Sets the marker opacity.", | ||||||||||||||||||||||||||||
| 117 | ); | ||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | 5 | has opacitysrc => ( is => "rw", | |||||||||||||||||||||||||||
| 120 | isa => "Str", | ||||||||||||||||||||||||||||
| 121 | documentation => "Sets the source reference on Chart Studio Cloud for `opacity`.", | ||||||||||||||||||||||||||||
| 122 | ); | ||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | 5 | has reversescale => ( | |||||||||||||||||||||||||||
| 125 | is => "rw", | ||||||||||||||||||||||||||||
| 126 | isa => "Bool", | ||||||||||||||||||||||||||||
| 127 | documentation => | ||||||||||||||||||||||||||||
| 128 | "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.", | ||||||||||||||||||||||||||||
| 129 | ); | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | 5 | has showscale => ( | |||||||||||||||||||||||||||
| 132 | is => "rw", | ||||||||||||||||||||||||||||
| 133 | isa => "Bool", | ||||||||||||||||||||||||||||
| 134 | documentation => | ||||||||||||||||||||||||||||
| 135 | "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.", | ||||||||||||||||||||||||||||
| 136 | ); | ||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | 5 | has size => ( is => "rw", | |||||||||||||||||||||||||||
| 139 | isa => "Num|ArrayRef[Num]", | ||||||||||||||||||||||||||||
| 140 | documentation => "Sets the marker size (in px).", | ||||||||||||||||||||||||||||
| 141 | ); | ||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | 5 | has sizemin => ( | |||||||||||||||||||||||||||
| 144 | is => "rw", | ||||||||||||||||||||||||||||
| 145 | isa => "Num", | ||||||||||||||||||||||||||||
| 146 | documentation => | ||||||||||||||||||||||||||||
| 147 | "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", | ||||||||||||||||||||||||||||
| 148 | ); | ||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||
| 150 | 5 | has sizemode => ( | |||||||||||||||||||||||||||
| 151 | is => "rw", | ||||||||||||||||||||||||||||
| 152 | isa => enum( [ "diameter", "area" ] ), | ||||||||||||||||||||||||||||
| 153 | documentation => | ||||||||||||||||||||||||||||
| 154 | "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", | ||||||||||||||||||||||||||||
| 155 | ); | ||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||
| 157 | 5 | has sizeref => ( | |||||||||||||||||||||||||||
| 158 | is => "rw", | ||||||||||||||||||||||||||||
| 159 | isa => "Num", | ||||||||||||||||||||||||||||
| 160 | documentation => | ||||||||||||||||||||||||||||
| 161 | "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", | ||||||||||||||||||||||||||||
| 162 | ); | ||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | 5 | has sizesrc => ( is => "rw", | |||||||||||||||||||||||||||
| 165 | isa => "Str", | ||||||||||||||||||||||||||||
| 166 | documentation => "Sets the source reference on Chart Studio Cloud for `size`.", | ||||||||||||||||||||||||||||
| 167 | ); | ||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||
| 169 | 5 | has symbol => ( | |||||||||||||||||||||||||||
| 170 | is => "rw", | ||||||||||||||||||||||||||||
| 171 | isa => "Maybe[ArrayRef]", | ||||||||||||||||||||||||||||
| 172 | documentation => | ||||||||||||||||||||||||||||
| 173 | "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", | ||||||||||||||||||||||||||||
| 174 | ); | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | 5 | has symbolsrc => ( is => "rw", | |||||||||||||||||||||||||||
| 177 | isa => "Str", | ||||||||||||||||||||||||||||
| 178 | documentation => "Sets the source reference on Chart Studio Cloud for `symbol`.", | ||||||||||||||||||||||||||||
| 179 | ); | ||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | 5 | __PACKAGE__->meta->make_immutable(); | |||||||||||||||||||||||||||
| 182 | 5 | 1; | |||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||
| 184 | __END__ | ||||||||||||||||||||||||||||